// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Tctest.Dcx
{
    [TctestResourceType("tctest:Dcx/instance:Instance")]
    public partial class Instance : Pulumi.CustomResource
    {
        /// <summary>
        /// Bandwidth of the DC.
        /// </summary>
        [Output("bandwidth")]
        public Output<int> Bandwidth { get; private set; } = null!;

        /// <summary>
        /// BGP ASN of the user. A required field within BGP.
        /// </summary>
        [Output("bgpAsn")]
        public Output<int> BgpAsn { get; private set; } = null!;

        /// <summary>
        /// BGP key of the user.
        /// </summary>
        [Output("bgpAuthKey")]
        public Output<string?> BgpAuthKey { get; private set; } = null!;

        /// <summary>
        /// Creation time of resource.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Interconnect IP of the DC within client.
        /// </summary>
        [Output("customerAddress")]
        public Output<string> CustomerAddress { get; private set; } = null!;

        /// <summary>
        /// ID of the DC to be queried, application deployment offline.
        /// </summary>
        [Output("dcId")]
        public Output<string> DcId { get; private set; } = null!;

        /// <summary>
        /// ID of the DC Gateway. Currently only new in the console.
        /// </summary>
        [Output("dcgId")]
        public Output<string> DcgId { get; private set; } = null!;

        /// <summary>
        /// Name of the dedicated tunnel.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Type of the network. Valid value: `VPC`, `BMVPC` and `CCN`. The default value is `VPC`.
        /// </summary>
        [Output("networkType")]
        public Output<string?> NetworkType { get; private set; } = null!;

        /// <summary>
        /// Static route, the network address of the user IDC. It can be modified after setting but cannot be deleted. AN unable
        /// field within BGP.
        /// </summary>
        [Output("routeFilterPrefixes")]
        public Output<ImmutableArray<string>> RouteFilterPrefixes { get; private set; } = null!;

        /// <summary>
        /// Type of the route, and available values include BGP and STATIC. The default value is `BGP`.
        /// </summary>
        [Output("routeType")]
        public Output<string?> RouteType { get; private set; } = null!;

        /// <summary>
        /// State of the dedicated tunnels. Valid value: `PENDING`, `ALLOCATING`, `ALLOCATED`, `ALTERING`, `DELETING`, `DELETED`,
        /// `COMFIRMING` and `REJECTED`.
        /// </summary>
        [Output("state")]
        public Output<string> State { get; private set; } = null!;

        /// <summary>
        /// Interconnect IP of the DC within Tencent.
        /// </summary>
        [Output("tencentAddress")]
        public Output<string> TencentAddress { get; private set; } = null!;

        /// <summary>
        /// Vlan of the dedicated tunnels. Valid value ranges: (0~3000). `0` means that only one tunnel can be created for the
        /// physical connect.
        /// </summary>
        [Output("vlan")]
        public Output<int?> Vlan { get; private set; } = null!;

        /// <summary>
        /// ID of the VPC or BMVPC.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;


        /// <summary>
        /// Create a Instance resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Instance(string name, InstanceArgs args, CustomResourceOptions? options = null)
            : base("tctest:Dcx/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Dcx/instance:Instance", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Instance resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Instance Get(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new Instance(name, id, state, options);
        }
    }

    public sealed class InstanceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Bandwidth of the DC.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// BGP ASN of the user. A required field within BGP.
        /// </summary>
        [Input("bgpAsn")]
        public Input<int>? BgpAsn { get; set; }

        /// <summary>
        /// BGP key of the user.
        /// </summary>
        [Input("bgpAuthKey")]
        public Input<string>? BgpAuthKey { get; set; }

        /// <summary>
        /// Interconnect IP of the DC within client.
        /// </summary>
        [Input("customerAddress")]
        public Input<string>? CustomerAddress { get; set; }

        /// <summary>
        /// ID of the DC to be queried, application deployment offline.
        /// </summary>
        [Input("dcId", required: true)]
        public Input<string> DcId { get; set; } = null!;

        /// <summary>
        /// ID of the DC Gateway. Currently only new in the console.
        /// </summary>
        [Input("dcgId", required: true)]
        public Input<string> DcgId { get; set; } = null!;

        /// <summary>
        /// Name of the dedicated tunnel.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Type of the network. Valid value: `VPC`, `BMVPC` and `CCN`. The default value is `VPC`.
        /// </summary>
        [Input("networkType")]
        public Input<string>? NetworkType { get; set; }

        [Input("routeFilterPrefixes")]
        private InputList<string>? _routeFilterPrefixes;

        /// <summary>
        /// Static route, the network address of the user IDC. It can be modified after setting but cannot be deleted. AN unable
        /// field within BGP.
        /// </summary>
        public InputList<string> RouteFilterPrefixes
        {
            get => _routeFilterPrefixes ?? (_routeFilterPrefixes = new InputList<string>());
            set => _routeFilterPrefixes = value;
        }

        /// <summary>
        /// Type of the route, and available values include BGP and STATIC. The default value is `BGP`.
        /// </summary>
        [Input("routeType")]
        public Input<string>? RouteType { get; set; }

        /// <summary>
        /// Interconnect IP of the DC within Tencent.
        /// </summary>
        [Input("tencentAddress")]
        public Input<string>? TencentAddress { get; set; }

        /// <summary>
        /// Vlan of the dedicated tunnels. Valid value ranges: (0~3000). `0` means that only one tunnel can be created for the
        /// physical connect.
        /// </summary>
        [Input("vlan")]
        public Input<int>? Vlan { get; set; }

        /// <summary>
        /// ID of the VPC or BMVPC.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        public InstanceArgs()
        {
        }
    }

    public sealed class InstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Bandwidth of the DC.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// BGP ASN of the user. A required field within BGP.
        /// </summary>
        [Input("bgpAsn")]
        public Input<int>? BgpAsn { get; set; }

        /// <summary>
        /// BGP key of the user.
        /// </summary>
        [Input("bgpAuthKey")]
        public Input<string>? BgpAuthKey { get; set; }

        /// <summary>
        /// Creation time of resource.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Interconnect IP of the DC within client.
        /// </summary>
        [Input("customerAddress")]
        public Input<string>? CustomerAddress { get; set; }

        /// <summary>
        /// ID of the DC to be queried, application deployment offline.
        /// </summary>
        [Input("dcId")]
        public Input<string>? DcId { get; set; }

        /// <summary>
        /// ID of the DC Gateway. Currently only new in the console.
        /// </summary>
        [Input("dcgId")]
        public Input<string>? DcgId { get; set; }

        /// <summary>
        /// Name of the dedicated tunnel.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Type of the network. Valid value: `VPC`, `BMVPC` and `CCN`. The default value is `VPC`.
        /// </summary>
        [Input("networkType")]
        public Input<string>? NetworkType { get; set; }

        [Input("routeFilterPrefixes")]
        private InputList<string>? _routeFilterPrefixes;

        /// <summary>
        /// Static route, the network address of the user IDC. It can be modified after setting but cannot be deleted. AN unable
        /// field within BGP.
        /// </summary>
        public InputList<string> RouteFilterPrefixes
        {
            get => _routeFilterPrefixes ?? (_routeFilterPrefixes = new InputList<string>());
            set => _routeFilterPrefixes = value;
        }

        /// <summary>
        /// Type of the route, and available values include BGP and STATIC. The default value is `BGP`.
        /// </summary>
        [Input("routeType")]
        public Input<string>? RouteType { get; set; }

        /// <summary>
        /// State of the dedicated tunnels. Valid value: `PENDING`, `ALLOCATING`, `ALLOCATED`, `ALTERING`, `DELETING`, `DELETED`,
        /// `COMFIRMING` and `REJECTED`.
        /// </summary>
        [Input("state")]
        public Input<string>? State { get; set; }

        /// <summary>
        /// Interconnect IP of the DC within Tencent.
        /// </summary>
        [Input("tencentAddress")]
        public Input<string>? TencentAddress { get; set; }

        /// <summary>
        /// Vlan of the dedicated tunnels. Valid value ranges: (0~3000). `0` means that only one tunnel can be created for the
        /// physical connect.
        /// </summary>
        [Input("vlan")]
        public Input<int>? Vlan { get; set; }

        /// <summary>
        /// ID of the VPC or BMVPC.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public InstanceState()
        {
        }
    }
}
