1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eipanycast
  5. AnycastEipAddress
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.eipanycast.AnycastEipAddress

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    Provides a Eipanycast Anycast Eip Address resource. Anycast Elastic IP Address.

    For information about Eipanycast Anycast Eip Address and how to use it, see What is Anycast Eip Address.

    NOTE: Available since v1.113.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const _default = new alicloud.eipanycast.AnycastEipAddress("default", {
        anycastEipAddressName: name,
        description: name,
        bandwidth: 200,
        serviceLocation: "international",
        internetChargeType: "PayByTraffic",
        paymentType: "PayAsYouGo",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.eipanycast.AnycastEipAddress("default",
        anycast_eip_address_name=name,
        description=name,
        bandwidth=200,
        service_location="international",
        internet_charge_type="PayByTraffic",
        payment_type="PayAsYouGo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eipanycast"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := eipanycast.NewAnycastEipAddress(ctx, "default", &eipanycast.AnycastEipAddressArgs{
    			AnycastEipAddressName: pulumi.String(name),
    			Description:           pulumi.String(name),
    			Bandwidth:             pulumi.Int(200),
    			ServiceLocation:       pulumi.String("international"),
    			InternetChargeType:    pulumi.String("PayByTraffic"),
    			PaymentType:           pulumi.String("PayAsYouGo"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = new AliCloud.EipAnycast.AnycastEipAddress("default", new()
        {
            AnycastEipAddressName = name,
            Description = name,
            Bandwidth = 200,
            ServiceLocation = "international",
            InternetChargeType = "PayByTraffic",
            PaymentType = "PayAsYouGo",
        });
    
    });
    
    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 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("tf-example");
            var default_ = new AnycastEipAddress("default", AnycastEipAddressArgs.builder()
                .anycastEipAddressName(name)
                .description(name)
                .bandwidth(200)
                .serviceLocation("international")
                .internetChargeType("PayByTraffic")
                .paymentType("PayAsYouGo")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      default:
        type: alicloud:eipanycast:AnycastEipAddress
        properties:
          anycastEipAddressName: ${name}
          description: ${name}
          bandwidth: 200
          serviceLocation: international
          internetChargeType: PayByTraffic
          paymentType: PayAsYouGo
    

    Create AnycastEipAddress Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AnycastEipAddress(name: string, args: AnycastEipAddressArgs, opts?: CustomResourceOptions);
    @overload
    def AnycastEipAddress(resource_name: str,
                          args: AnycastEipAddressArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AnycastEipAddress(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          service_location: Optional[str] = None,
                          anycast_eip_address_name: Optional[str] = None,
                          bandwidth: Optional[int] = None,
                          description: Optional[str] = None,
                          internet_charge_type: Optional[str] = None,
                          payment_type: Optional[str] = None,
                          resource_group_id: Optional[str] = None,
                          tags: Optional[Mapping[str, Any]] = None)
    func NewAnycastEipAddress(ctx *Context, name string, args AnycastEipAddressArgs, opts ...ResourceOption) (*AnycastEipAddress, error)
    public AnycastEipAddress(string name, AnycastEipAddressArgs args, CustomResourceOptions? opts = null)
    public AnycastEipAddress(String name, AnycastEipAddressArgs args)
    public AnycastEipAddress(String name, AnycastEipAddressArgs args, CustomResourceOptions options)
    
    type: alicloud:eipanycast:AnycastEipAddress
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AnycastEipAddressArgs
    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 AnycastEipAddressArgs
    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 AnycastEipAddressArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AnycastEipAddressArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AnycastEipAddressArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var anycastEipAddressResource = new AliCloud.EipAnycast.AnycastEipAddress("anycastEipAddressResource", new()
    {
        ServiceLocation = "string",
        AnycastEipAddressName = "string",
        Bandwidth = 0,
        Description = "string",
        InternetChargeType = "string",
        PaymentType = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := eipanycast.NewAnycastEipAddress(ctx, "anycastEipAddressResource", &eipanycast.AnycastEipAddressArgs{
    	ServiceLocation:       pulumi.String("string"),
    	AnycastEipAddressName: pulumi.String("string"),
    	Bandwidth:             pulumi.Int(0),
    	Description:           pulumi.String("string"),
    	InternetChargeType:    pulumi.String("string"),
    	PaymentType:           pulumi.String("string"),
    	ResourceGroupId:       pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var anycastEipAddressResource = new AnycastEipAddress("anycastEipAddressResource", AnycastEipAddressArgs.builder()
        .serviceLocation("string")
        .anycastEipAddressName("string")
        .bandwidth(0)
        .description("string")
        .internetChargeType("string")
        .paymentType("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "any"))
        .build());
    
    anycast_eip_address_resource = alicloud.eipanycast.AnycastEipAddress("anycastEipAddressResource",
        service_location="string",
        anycast_eip_address_name="string",
        bandwidth=0,
        description="string",
        internet_charge_type="string",
        payment_type="string",
        resource_group_id="string",
        tags={
            "string": "any",
        })
    
    const anycastEipAddressResource = new alicloud.eipanycast.AnycastEipAddress("anycastEipAddressResource", {
        serviceLocation: "string",
        anycastEipAddressName: "string",
        bandwidth: 0,
        description: "string",
        internetChargeType: "string",
        paymentType: "string",
        resourceGroupId: "string",
        tags: {
            string: "any",
        },
    });
    
    type: alicloud:eipanycast:AnycastEipAddress
    properties:
        anycastEipAddressName: string
        bandwidth: 0
        description: string
        internetChargeType: string
        paymentType: string
        resourceGroupId: string
        serviceLocation: string
        tags:
            string: any
    

    AnycastEipAddress 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 AnycastEipAddress resource accepts the following input properties:

    ServiceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    AnycastEipAddressName string
    Anycast EIP instance name.
    Bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    Description string
    Anycast EIP instance description.
    InternetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    PaymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    ResourceGroupId string
    The ID of the resource group to which the instance belongs.
    Tags Dictionary<string, object>
    List of resource-bound tags.
    ServiceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    AnycastEipAddressName string
    Anycast EIP instance name.
    Bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    Description string
    Anycast EIP instance description.
    InternetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    PaymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    ResourceGroupId string
    The ID of the resource group to which the instance belongs.
    Tags map[string]interface{}
    List of resource-bound tags.
    serviceLocation String
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    anycastEipAddressName String
    Anycast EIP instance name.
    bandwidth Integer
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    description String
    Anycast EIP instance description.
    internetChargeType String
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType String
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId String
    The ID of the resource group to which the instance belongs.
    tags Map<String,Object>
    List of resource-bound tags.
    serviceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    anycastEipAddressName string
    Anycast EIP instance name.
    bandwidth number
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    description string
    Anycast EIP instance description.
    internetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId string
    The ID of the resource group to which the instance belongs.
    tags {[key: string]: any}
    List of resource-bound tags.
    service_location str
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    anycast_eip_address_name str
    Anycast EIP instance name.
    bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    description str
    Anycast EIP instance description.
    internet_charge_type str
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    payment_type str
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resource_group_id str
    The ID of the resource group to which the instance belongs.
    tags Mapping[str, Any]
    List of resource-bound tags.
    serviceLocation String
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    anycastEipAddressName String
    Anycast EIP instance name.
    bandwidth Number
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    description String
    Anycast EIP instance description.
    internetChargeType String
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType String
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId String
    The ID of the resource group to which the instance belongs.
    tags Map<Any>
    List of resource-bound tags.

    Outputs

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

    CreateTime string
    Anycast EIP instance creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    CreateTime string
    Anycast EIP instance creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    createTime String
    Anycast EIP instance creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    createTime string
    Anycast EIP instance creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    create_time str
    Anycast EIP instance creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    createTime String
    Anycast EIP instance creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing AnycastEipAddress Resource

    Get an existing AnycastEipAddress 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?: AnycastEipAddressState, opts?: CustomResourceOptions): AnycastEipAddress
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            anycast_eip_address_name: Optional[str] = None,
            bandwidth: Optional[int] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            internet_charge_type: Optional[str] = None,
            payment_type: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            service_location: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None) -> AnycastEipAddress
    func GetAnycastEipAddress(ctx *Context, name string, id IDInput, state *AnycastEipAddressState, opts ...ResourceOption) (*AnycastEipAddress, error)
    public static AnycastEipAddress Get(string name, Input<string> id, AnycastEipAddressState? state, CustomResourceOptions? opts = null)
    public static AnycastEipAddress get(String name, Output<String> id, AnycastEipAddressState 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:
    AnycastEipAddressName string
    Anycast EIP instance name.
    Bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    CreateTime string
    Anycast EIP instance creation time.
    Description string
    Anycast EIP instance description.
    InternetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    PaymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    ResourceGroupId string
    The ID of the resource group to which the instance belongs.
    ServiceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    Status string
    The status of the resource.
    Tags Dictionary<string, object>
    List of resource-bound tags.
    AnycastEipAddressName string
    Anycast EIP instance name.
    Bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    CreateTime string
    Anycast EIP instance creation time.
    Description string
    Anycast EIP instance description.
    InternetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    PaymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    ResourceGroupId string
    The ID of the resource group to which the instance belongs.
    ServiceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    Status string
    The status of the resource.
    Tags map[string]interface{}
    List of resource-bound tags.
    anycastEipAddressName String
    Anycast EIP instance name.
    bandwidth Integer
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    createTime String
    Anycast EIP instance creation time.
    description String
    Anycast EIP instance description.
    internetChargeType String
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType String
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId String
    The ID of the resource group to which the instance belongs.
    serviceLocation String
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    status String
    The status of the resource.
    tags Map<String,Object>
    List of resource-bound tags.
    anycastEipAddressName string
    Anycast EIP instance name.
    bandwidth number
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    createTime string
    Anycast EIP instance creation time.
    description string
    Anycast EIP instance description.
    internetChargeType string
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType string
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId string
    The ID of the resource group to which the instance belongs.
    serviceLocation string
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    status string
    The status of the resource.
    tags {[key: string]: any}
    List of resource-bound tags.
    anycast_eip_address_name str
    Anycast EIP instance name.
    bandwidth int
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    create_time str
    Anycast EIP instance creation time.
    description str
    Anycast EIP instance description.
    internet_charge_type str
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    payment_type str
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resource_group_id str
    The ID of the resource group to which the instance belongs.
    service_location str
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    status str
    The status of the resource.
    tags Mapping[str, Any]
    List of resource-bound tags.
    anycastEipAddressName String
    Anycast EIP instance name.
    bandwidth Number
    The peak bandwidth of the Anycast EIP instance, in Mbps.
    createTime String
    Anycast EIP instance creation time.
    description String
    Anycast EIP instance description.
    internetChargeType String
    The billing method of Anycast EIP instance. "PayByBandwidth": refers to the method of billing based on traffic.
    paymentType String
    The payment model of Anycast EIP instance. "PayAsYouGo": Refers to the post-paid mode.
    resourceGroupId String
    The ID of the resource group to which the instance belongs.
    serviceLocation String
    Anycast EIP instance access area. "international": Refers to areas outside of Mainland China.
    status String
    The status of the resource.
    tags Map<Any>
    List of resource-bound tags.

    Import

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

    $ pulumi import alicloud:eipanycast/anycastEipAddress:AnycastEipAddress example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi