// *** 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.AliCloud.Vpc
{
    /// <summary>
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var fooCommonBandwithPackage = new AliCloud.Vpc.CommonBandwithPackage("fooCommonBandwithPackage", new()
    ///     {
    ///         Bandwidth = "2",
    ///         BandwidthPackageName = "test_common_bandwidth_package",
    ///         Description = "test_common_bandwidth_package",
    ///     });
    /// 
    ///     var fooEipAddress = new AliCloud.Ecs.EipAddress("fooEipAddress", new()
    ///     {
    ///         Bandwidth = "2",
    ///         InternetChargeType = "PayByBandwidth",
    ///     });
    /// 
    ///     var fooCommonBandwithPackageAttachment = new AliCloud.Vpc.CommonBandwithPackageAttachment("fooCommonBandwithPackageAttachment", new()
    ///     {
    ///         BandwidthPackageId = fooCommonBandwithPackage.Id,
    ///         InstanceId = fooEipAddress.Id,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// The common bandwidth package attachment can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpc/commonBandwithPackageAttachment:CommonBandwithPackageAttachment foo &lt;bandwidth_package_id&gt;:&lt;instance_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpc/commonBandwithPackageAttachment:CommonBandwithPackageAttachment")]
    public partial class CommonBandwithPackageAttachment : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.
        /// </summary>
        [Output("bandwidthPackageBandwidth")]
        public Output<string> BandwidthPackageBandwidth { get; private set; } = null!;

        /// <summary>
        /// The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Output("bandwidthPackageId")]
        public Output<string> BandwidthPackageId { get; private set; } = null!;

        /// <summary>
        /// Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.
        /// </summary>
        [Output("cancelCommonBandwidthPackageIpBandwidth")]
        public Output<bool?> CancelCommonBandwidthPackageIpBandwidth { get; private set; } = null!;

        /// <summary>
        /// The instance_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;


        /// <summary>
        /// Create a CommonBandwithPackageAttachment 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 CommonBandwithPackageAttachment(string name, CommonBandwithPackageAttachmentArgs args, CustomResourceOptions? options = null)
            : base("alicloud:vpc/commonBandwithPackageAttachment:CommonBandwithPackageAttachment", name, args ?? new CommonBandwithPackageAttachmentArgs(), MakeResourceOptions(options, ""))
        {
        }

        private CommonBandwithPackageAttachment(string name, Input<string> id, CommonBandwithPackageAttachmentState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:vpc/commonBandwithPackageAttachment:CommonBandwithPackageAttachment", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            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 CommonBandwithPackageAttachment 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 CommonBandwithPackageAttachment Get(string name, Input<string> id, CommonBandwithPackageAttachmentState? state = null, CustomResourceOptions? options = null)
        {
            return new CommonBandwithPackageAttachment(name, id, state, options);
        }
    }

    public sealed class CommonBandwithPackageAttachmentArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.
        /// </summary>
        [Input("bandwidthPackageBandwidth")]
        public Input<string>? BandwidthPackageBandwidth { get; set; }

        /// <summary>
        /// The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Input("bandwidthPackageId", required: true)]
        public Input<string> BandwidthPackageId { get; set; } = null!;

        /// <summary>
        /// Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.
        /// </summary>
        [Input("cancelCommonBandwidthPackageIpBandwidth")]
        public Input<bool>? CancelCommonBandwidthPackageIpBandwidth { get; set; }

        /// <summary>
        /// The instance_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        public CommonBandwithPackageAttachmentArgs()
        {
        }
        public static new CommonBandwithPackageAttachmentArgs Empty => new CommonBandwithPackageAttachmentArgs();
    }

    public sealed class CommonBandwithPackageAttachmentState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The maximum bandwidth for the EIP. This value cannot be larger than the maximum bandwidth of the EIP bandwidth plan. Unit: Mbit/s.
        /// </summary>
        [Input("bandwidthPackageBandwidth")]
        public Input<string>? BandwidthPackageBandwidth { get; set; }

        /// <summary>
        /// The bandwidth_package_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Input("bandwidthPackageId")]
        public Input<string>? BandwidthPackageId { get; set; }

        /// <summary>
        /// Whether to cancel the maximum bandwidth configuration for the EIP. Default: false.
        /// </summary>
        [Input("cancelCommonBandwidthPackageIpBandwidth")]
        public Input<bool>? CancelCommonBandwidthPackageIpBandwidth { get; set; }

        /// <summary>
        /// The instance_id of the common bandwidth package attachment, the field can't be changed.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        public CommonBandwithPackageAttachmentState()
        {
        }
        public static new CommonBandwithPackageAttachmentState Empty => new CommonBandwithPackageAttachmentState();
    }
}
