<filename>sdk/dotnet/EipAnycast/AnycastEipAddressAttachment.cs// *** 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.EipAnycast
{
    /// <summary>
    /// Provides a Eipanycast Anycast Eip Address Attachment resource.
    /// 
    /// For information about Eipanycast Anycast Eip Address Attachment and how to use it, see [What is Anycast Eip Address Attachment](https://help.aliyun.com/document_detail/171857.html).
    /// 
    /// &gt; **NOTE:** Available in v1.113.0+.
    /// 
    /// &gt; **NOTE:** The following regions support currently while Slb instance support bound.
    /// [eu-west-1-gb33-a01,cn-hongkong-am4-c04,ap-southeast-os30-a01,us-west-ot7-a01,ap-south-in73-a01,ap-southeast-my88-a01]
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var exampleAnycastEipAddress = new AliCloud.EipAnycast.AnycastEipAddress("exampleAnycastEipAddress", new()
    ///     {
    ///         ServiceLocation = "international",
    ///     });
    /// 
    ///     var exampleAnycastEipAddressAttachment = new AliCloud.EipAnycast.AnycastEipAddressAttachment("exampleAnycastEipAddressAttachment", new()
    ///     {
    ///         AnycastId = exampleAnycastEipAddress.Id,
    ///         BindInstanceId = "lb-j6chlcr8lffy7********",
    ///         BindInstanceRegionId = "cn-hongkong",
    ///         BindInstanceType = "SlbInstance",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Eipanycast Anycast Eip Address Attachment can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:eipanycast/anycastEipAddressAttachment:AnycastEipAddressAttachment example `anycast_id`:`bind_instance_id`:`bind_instance_region_id`:`bind_instance_type`
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:eipanycast/anycastEipAddressAttachment:AnycastEipAddressAttachment")]
    public partial class AnycastEipAddressAttachment : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of Anycast EIP.
        /// </summary>
        [Output("anycastId")]
        public Output<string> AnycastId { get; private set; } = null!;

        /// <summary>
        /// The ID of bound instance.
        /// </summary>
        [Output("bindInstanceId")]
        public Output<string> BindInstanceId { get; private set; } = null!;

        /// <summary>
        /// The region ID of bound instance.
        /// </summary>
        [Output("bindInstanceRegionId")]
        public Output<string> BindInstanceRegionId { get; private set; } = null!;

        /// <summary>
        /// The type of bound instance. Valid value: `SlbInstance`.
        /// </summary>
        [Output("bindInstanceType")]
        public Output<string> BindInstanceType { get; private set; } = null!;

        /// <summary>
        /// The time of bound instance.
        /// </summary>
        [Output("bindTime")]
        public Output<string> BindTime { get; private set; } = null!;


        /// <summary>
        /// Create a AnycastEipAddressAttachment 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 AnycastEipAddressAttachment(string name, AnycastEipAddressAttachmentArgs args, CustomResourceOptions? options = null)
            : base("alicloud:eipanycast/anycastEipAddressAttachment:AnycastEipAddressAttachment", name, args ?? new AnycastEipAddressAttachmentArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AnycastEipAddressAttachment(string name, Input<string> id, AnycastEipAddressAttachmentState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:eipanycast/anycastEipAddressAttachment:AnycastEipAddressAttachment", 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 AnycastEipAddressAttachment 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 AnycastEipAddressAttachment Get(string name, Input<string> id, AnycastEipAddressAttachmentState? state = null, CustomResourceOptions? options = null)
        {
            return new AnycastEipAddressAttachment(name, id, state, options);
        }
    }

    public sealed class AnycastEipAddressAttachmentArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of Anycast EIP.
        /// </summary>
        [Input("anycastId", required: true)]
        public Input<string> AnycastId { get; set; } = null!;

        /// <summary>
        /// The ID of bound instance.
        /// </summary>
        [Input("bindInstanceId", required: true)]
        public Input<string> BindInstanceId { get; set; } = null!;

        /// <summary>
        /// The region ID of bound instance.
        /// </summary>
        [Input("bindInstanceRegionId", required: true)]
        public Input<string> BindInstanceRegionId { get; set; } = null!;

        /// <summary>
        /// The type of bound instance. Valid value: `SlbInstance`.
        /// </summary>
        [Input("bindInstanceType", required: true)]
        public Input<string> BindInstanceType { get; set; } = null!;

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

    public sealed class AnycastEipAddressAttachmentState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of Anycast EIP.
        /// </summary>
        [Input("anycastId")]
        public Input<string>? AnycastId { get; set; }

        /// <summary>
        /// The ID of bound instance.
        /// </summary>
        [Input("bindInstanceId")]
        public Input<string>? BindInstanceId { get; set; }

        /// <summary>
        /// The region ID of bound instance.
        /// </summary>
        [Input("bindInstanceRegionId")]
        public Input<string>? BindInstanceRegionId { get; set; }

        /// <summary>
        /// The type of bound instance. Valid value: `SlbInstance`.
        /// </summary>
        [Input("bindInstanceType")]
        public Input<string>? BindInstanceType { get; set; }

        /// <summary>
        /// The time of bound instance.
        /// </summary>
        [Input("bindTime")]
        public Input<string>? BindTime { get; set; }

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