AnycastEipAddressAttachment

class AnycastEipAddressAttachment : KotlinCustomResource

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 since 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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetZonesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.eipanycast.AnycastEipAddress;
import com.pulumi.alicloud.eipanycast.AnycastEipAddressArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetRegionsArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var defaultZones = SlbFunctions.getZones(GetZonesArgs.builder()
.availableSlbAddressType("vpc")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.0.0.0/8")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.1.0.0/16")
.vpcId(defaultNetwork.id())
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
.addressType("intranet")
.vswitchId(defaultSwitch.id())
.loadBalancerName(name)
.loadBalancerSpec("slb.s1.small")
.masterZoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultAnycastEipAddress = new AnycastEipAddress("defaultAnycastEipAddress", AnycastEipAddressArgs.builder()
.anycastEipAddressName(name)
.serviceLocation("ChineseMainland")
.build());
final var defaultRegions = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var defaultAnycastEipAddressAttachment = new AnycastEipAddressAttachment("defaultAnycastEipAddressAttachment", AnycastEipAddressAttachmentArgs.builder()
.bindInstanceId(defaultApplicationLoadBalancer.id())
.bindInstanceType("SlbInstance")
.bindInstanceRegionId(defaultRegions.applyValue(getRegionsResult -> getRegionsResult.regions()[0].id()))
.anycastId(defaultAnycastEipAddress.id())
.build());
}
}

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>

Properties

Link copied to clipboard
val anycastId: Output<String>

The ID of the Anycast EIP instance.

Link copied to clipboard
val associationMode: Output<String>

Binding mode, value:

Link copied to clipboard
val bindInstanceId: Output<String>

The ID of the cloud resource instance to be bound.

Link copied to clipboard

The region ID of the cloud resource instance to be bound.You can only bind cloud resource instances in some regions. You can call the describeanystserverregions operation to obtain the region ID of the cloud resource instances that can be bound.

Link copied to clipboard

The type of the cloud resource instance to be bound. Value:

Link copied to clipboard
val bindTime: Output<String>

Binding time.Time is expressed according to ISO8601 standard and UTC time is used. The format is: 'YYYY-MM-DDThh:mm:ssZ'.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The access point information of the associated access area when the cloud resource instance is bound.If you are binding for the first time, this parameter does not need to be configured, and the system automatically associates all access areas. See pop_locations below.

Link copied to clipboard
val privateIpAddress: Output<String>?

The secondary private IP address of the elastic network card to be bound.This parameter takes effect only when BindInstanceType is set to **NetworkInterface. When you do not enter, this parameter is the primary private IP of the ENI by default.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the bound cloud resource instance. Value:BINDING: BINDING.Bound: Bound.UNBINDING: UNBINDING.DELETED: DELETED.MODIFYING: being modified.

Link copied to clipboard
val urn: Output<String>