alicloud.eipanycast.AnycastEipAddressAttachment

Explore with Pulumi AI

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.

NOTE: Available in v1.113.0+.

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

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    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",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eipanycast"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleAnycastEipAddress, err := eipanycast.NewAnycastEipAddress(ctx, "exampleAnycastEipAddress", &eipanycast.AnycastEipAddressArgs{
			ServiceLocation: pulumi.String("international"),
		})
		if err != nil {
			return err
		}
		_, err = eipanycast.NewAnycastEipAddressAttachment(ctx, "exampleAnycastEipAddressAttachment", &eipanycast.AnycastEipAddressAttachmentArgs{
			AnycastId:            exampleAnycastEipAddress.ID(),
			BindInstanceId:       pulumi.String("lb-j6chlcr8lffy7********"),
			BindInstanceRegionId: pulumi.String("cn-hongkong"),
			BindInstanceType:     pulumi.String("SlbInstance"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eipanycast.AnycastEipAddress;
import com.pulumi.alicloud.eipanycast.AnycastEipAddressArgs;
import com.pulumi.alicloud.eipanycast.AnycastEipAddressAttachment;
import com.pulumi.alicloud.eipanycast.AnycastEipAddressAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleAnycastEipAddress = new AnycastEipAddress("exampleAnycastEipAddress", AnycastEipAddressArgs.builder()        
            .serviceLocation("international")
            .build());

        var exampleAnycastEipAddressAttachment = new AnycastEipAddressAttachment("exampleAnycastEipAddressAttachment", AnycastEipAddressAttachmentArgs.builder()        
            .anycastId(exampleAnycastEipAddress.id())
            .bindInstanceId("lb-j6chlcr8lffy7********")
            .bindInstanceRegionId("cn-hongkong")
            .bindInstanceType("SlbInstance")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example_anycast_eip_address = alicloud.eipanycast.AnycastEipAddress("exampleAnycastEipAddress", service_location="international")
example_anycast_eip_address_attachment = alicloud.eipanycast.AnycastEipAddressAttachment("exampleAnycastEipAddressAttachment",
    anycast_id=example_anycast_eip_address.id,
    bind_instance_id="lb-j6chlcr8lffy7********",
    bind_instance_region_id="cn-hongkong",
    bind_instance_type="SlbInstance")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const exampleAnycastEipAddress = new alicloud.eipanycast.AnycastEipAddress("exampleAnycastEipAddress", {serviceLocation: "international"});
const exampleAnycastEipAddressAttachment = new alicloud.eipanycast.AnycastEipAddressAttachment("exampleAnycastEipAddressAttachment", {
    anycastId: exampleAnycastEipAddress.id,
    bindInstanceId: "lb-j6chlcr8lffy7********",
    bindInstanceRegionId: "cn-hongkong",
    bindInstanceType: "SlbInstance",
});
resources:
  exampleAnycastEipAddress:
    type: alicloud:eipanycast:AnycastEipAddress
    properties:
      serviceLocation: international
  exampleAnycastEipAddressAttachment:
    type: alicloud:eipanycast:AnycastEipAddressAttachment
    properties:
      anycastId: ${exampleAnycastEipAddress.id}
      bindInstanceId: lb-j6chlcr8lffy7********
      bindInstanceRegionId: cn-hongkong
      bindInstanceType: SlbInstance

Create AnycastEipAddressAttachment Resource

new AnycastEipAddressAttachment(name: string, args: AnycastEipAddressAttachmentArgs, opts?: CustomResourceOptions);
@overload
def AnycastEipAddressAttachment(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                anycast_id: Optional[str] = None,
                                bind_instance_id: Optional[str] = None,
                                bind_instance_region_id: Optional[str] = None,
                                bind_instance_type: Optional[str] = None)
@overload
def AnycastEipAddressAttachment(resource_name: str,
                                args: AnycastEipAddressAttachmentArgs,
                                opts: Optional[ResourceOptions] = None)
func NewAnycastEipAddressAttachment(ctx *Context, name string, args AnycastEipAddressAttachmentArgs, opts ...ResourceOption) (*AnycastEipAddressAttachment, error)
public AnycastEipAddressAttachment(string name, AnycastEipAddressAttachmentArgs args, CustomResourceOptions? opts = null)
public AnycastEipAddressAttachment(String name, AnycastEipAddressAttachmentArgs args)
public AnycastEipAddressAttachment(String name, AnycastEipAddressAttachmentArgs args, CustomResourceOptions options)
type: alicloud:eipanycast:AnycastEipAddressAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AnycastEipAddressAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AnycastEipAddressAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AnycastEipAddressAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AnycastEipAddressAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AnycastEipAddressAttachmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AnycastEipAddressAttachment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AnycastEipAddressAttachment resource accepts the following input properties:

AnycastId string

The ID of Anycast EIP.

BindInstanceId string

The ID of bound instance.

BindInstanceRegionId string

The region ID of bound instance.

BindInstanceType string

The type of bound instance. Valid value: SlbInstance.

AnycastId string

The ID of Anycast EIP.

BindInstanceId string

The ID of bound instance.

BindInstanceRegionId string

The region ID of bound instance.

BindInstanceType string

The type of bound instance. Valid value: SlbInstance.

anycastId String

The ID of Anycast EIP.

bindInstanceId String

The ID of bound instance.

bindInstanceRegionId String

The region ID of bound instance.

bindInstanceType String

The type of bound instance. Valid value: SlbInstance.

anycastId string

The ID of Anycast EIP.

bindInstanceId string

The ID of bound instance.

bindInstanceRegionId string

The region ID of bound instance.

bindInstanceType string

The type of bound instance. Valid value: SlbInstance.

anycast_id str

The ID of Anycast EIP.

bind_instance_id str

The ID of bound instance.

bind_instance_region_id str

The region ID of bound instance.

bind_instance_type str

The type of bound instance. Valid value: SlbInstance.

anycastId String

The ID of Anycast EIP.

bindInstanceId String

The ID of bound instance.

bindInstanceRegionId String

The region ID of bound instance.

bindInstanceType String

The type of bound instance. Valid value: SlbInstance.

Outputs

All input properties are implicitly available as output properties. Additionally, the AnycastEipAddressAttachment resource produces the following output properties:

BindTime string

The time of bound instance.

Id string

The provider-assigned unique ID for this managed resource.

BindTime string

The time of bound instance.

Id string

The provider-assigned unique ID for this managed resource.

bindTime String

The time of bound instance.

id String

The provider-assigned unique ID for this managed resource.

bindTime string

The time of bound instance.

id string

The provider-assigned unique ID for this managed resource.

bind_time str

The time of bound instance.

id str

The provider-assigned unique ID for this managed resource.

bindTime String

The time of bound instance.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing AnycastEipAddressAttachment Resource

Get an existing AnycastEipAddressAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AnycastEipAddressAttachmentState, opts?: CustomResourceOptions): AnycastEipAddressAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        anycast_id: Optional[str] = None,
        bind_instance_id: Optional[str] = None,
        bind_instance_region_id: Optional[str] = None,
        bind_instance_type: Optional[str] = None,
        bind_time: Optional[str] = None) -> AnycastEipAddressAttachment
func GetAnycastEipAddressAttachment(ctx *Context, name string, id IDInput, state *AnycastEipAddressAttachmentState, opts ...ResourceOption) (*AnycastEipAddressAttachment, error)
public static AnycastEipAddressAttachment Get(string name, Input<string> id, AnycastEipAddressAttachmentState? state, CustomResourceOptions? opts = null)
public static AnycastEipAddressAttachment get(String name, Output<String> id, AnycastEipAddressAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AnycastId string

The ID of Anycast EIP.

BindInstanceId string

The ID of bound instance.

BindInstanceRegionId string

The region ID of bound instance.

BindInstanceType string

The type of bound instance. Valid value: SlbInstance.

BindTime string

The time of bound instance.

AnycastId string

The ID of Anycast EIP.

BindInstanceId string

The ID of bound instance.

BindInstanceRegionId string

The region ID of bound instance.

BindInstanceType string

The type of bound instance. Valid value: SlbInstance.

BindTime string

The time of bound instance.

anycastId String

The ID of Anycast EIP.

bindInstanceId String

The ID of bound instance.

bindInstanceRegionId String

The region ID of bound instance.

bindInstanceType String

The type of bound instance. Valid value: SlbInstance.

bindTime String

The time of bound instance.

anycastId string

The ID of Anycast EIP.

bindInstanceId string

The ID of bound instance.

bindInstanceRegionId string

The region ID of bound instance.

bindInstanceType string

The type of bound instance. Valid value: SlbInstance.

bindTime string

The time of bound instance.

anycast_id str

The ID of Anycast EIP.

bind_instance_id str

The ID of bound instance.

bind_instance_region_id str

The region ID of bound instance.

bind_instance_type str

The type of bound instance. Valid value: SlbInstance.

bind_time str

The time of bound instance.

anycastId String

The ID of Anycast EIP.

bindInstanceId String

The ID of bound instance.

bindInstanceRegionId String

The region ID of bound instance.

bindInstanceType String

The type of bound instance. Valid value: SlbInstance.

bindTime String

The time of bound instance.

Import

Eipanycast Anycast Eip Address Attachment can be imported using the id, e.g.

 $ pulumi import alicloud:eipanycast/anycastEipAddressAttachment:AnycastEipAddressAttachment example `anycast_id`:`bind_instance_id`:`bind_instance_region_id`:`bind_instance_type`

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.