AnycastEipAddressAttachmentArgs

data class AnycastEipAddressAttachmentArgs(val anycastId: Output<String>? = null, val associationMode: Output<String>? = null, val bindInstanceId: Output<String>? = null, val bindInstanceRegionId: Output<String>? = null, val bindInstanceType: Output<String>? = null, val popLocations: Output<List<AnycastEipAddressAttachmentPopLocationArgs>>? = null, val privateIpAddress: Output<String>? = null) : ConvertibleToJava<AnycastEipAddressAttachmentArgs>

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>

Constructors

Link copied to clipboard
fun AnycastEipAddressAttachmentArgs(anycastId: Output<String>? = null, associationMode: Output<String>? = null, bindInstanceId: Output<String>? = null, bindInstanceRegionId: Output<String>? = null, bindInstanceType: Output<String>? = null, popLocations: Output<List<AnycastEipAddressAttachmentPopLocationArgs>>? = null, privateIpAddress: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AnycastEipAddressAttachmentArgs

Properties

Link copied to clipboard
val anycastId: Output<String>? = null

The ID of the Anycast EIP instance.

Link copied to clipboard
val associationMode: Output<String>? = null

Binding mode, value:

Link copied to clipboard
val bindInstanceId: Output<String>? = null

The ID of the cloud resource instance to be bound.

Link copied to clipboard
val bindInstanceRegionId: Output<String>? = null

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
val bindInstanceType: Output<String>? = null

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

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>? = null

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.