1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. HaVipv2
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.vpc.HaVipv2

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a Vpc Ha Vip resource. Highly available virtual IP

    For information about Vpc Ha Vip and how to use it, see What is Ha Vip.

    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-testacc-example";
    const default = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const defaultVpc = new alicloud.vpc.Network("defaultVpc", {
        description: "tf-test-acc-vpc",
        vpcName: name,
        cidrBlock: "192.168.0.0/16",
    });
    const defaultVswitch = new alicloud.vpc.Switch("defaultVswitch", {
        vpcId: defaultVpc.id,
        cidrBlock: "192.168.0.0/21",
        vswitchName: `${name}1`,
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
        description: "tf-testacc-vswitch",
    });
    const defaultRg = new alicloud.resourcemanager.ResourceGroup("defaultRg", {
        displayName: "tf-testacc-rg819",
        resourceGroupName: `${name}2`,
    });
    const changeRg = new alicloud.resourcemanager.ResourceGroup("changeRg", {
        displayName: "tf-testacc-changerg670",
        resourceGroupName: `${name}3`,
    });
    const defaultHaVipv2 = new alicloud.vpc.HaVipv2("default", {
        description: "test",
        vswitchId: defaultVswitch.id,
        haVipName: name,
        ipAddress: "192.168.1.101",
        resourceGroupId: defaultRg.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-testacc-example"
    default = alicloud.get_zones(available_resource_creation="VSwitch")
    default_vpc = alicloud.vpc.Network("defaultVpc",
        description="tf-test-acc-vpc",
        vpc_name=name,
        cidr_block="192.168.0.0/16")
    default_vswitch = alicloud.vpc.Switch("defaultVswitch",
        vpc_id=default_vpc.id,
        cidr_block="192.168.0.0/21",
        vswitch_name=f"{name}1",
        zone_id=default.zones[0].id,
        description="tf-testacc-vswitch")
    default_rg = alicloud.resourcemanager.ResourceGroup("defaultRg",
        display_name="tf-testacc-rg819",
        resource_group_name=f"{name}2")
    change_rg = alicloud.resourcemanager.ResourceGroup("changeRg",
        display_name="tf-testacc-changerg670",
        resource_group_name=f"{name}3")
    default_ha_vipv2 = alicloud.vpc.HaVipv2("default",
        description="test",
        vswitch_id=default_vswitch.id,
        ha_vip_name=name,
        ip_address="192.168.1.101",
        resource_group_id=default_rg.id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"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-testacc-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultVpc, err := vpc.NewNetwork(ctx, "defaultVpc", &vpc.NetworkArgs{
    			Description: pulumi.String("tf-test-acc-vpc"),
    			VpcName:     pulumi.String(name),
    			CidrBlock:   pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultVswitch, err := vpc.NewSwitch(ctx, "defaultVswitch", &vpc.SwitchArgs{
    			VpcId:       defaultVpc.ID(),
    			CidrBlock:   pulumi.String("192.168.0.0/21"),
    			VswitchName: pulumi.Sprintf("%v1", name),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    			Description: pulumi.String("tf-testacc-vswitch"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultRg, err := resourcemanager.NewResourceGroup(ctx, "defaultRg", &resourcemanager.ResourceGroupArgs{
    			DisplayName:       pulumi.String("tf-testacc-rg819"),
    			ResourceGroupName: pulumi.Sprintf("%v2", name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = resourcemanager.NewResourceGroup(ctx, "changeRg", &resourcemanager.ResourceGroupArgs{
    			DisplayName:       pulumi.String("tf-testacc-changerg670"),
    			ResourceGroupName: pulumi.Sprintf("%v3", name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewHaVipv2(ctx, "default", &vpc.HaVipv2Args{
    			Description:     pulumi.String("test"),
    			VswitchId:       defaultVswitch.ID(),
    			HaVipName:       pulumi.String(name),
    			IpAddress:       pulumi.String("192.168.1.101"),
    			ResourceGroupId: defaultRg.ID(),
    		})
    		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-testacc-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultVpc = new AliCloud.Vpc.Network("defaultVpc", new()
        {
            Description = "tf-test-acc-vpc",
            VpcName = name,
            CidrBlock = "192.168.0.0/16",
        });
    
        var defaultVswitch = new AliCloud.Vpc.Switch("defaultVswitch", new()
        {
            VpcId = defaultVpc.Id,
            CidrBlock = "192.168.0.0/21",
            VswitchName = $"{name}1",
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            Description = "tf-testacc-vswitch",
        });
    
        var defaultRg = new AliCloud.ResourceManager.ResourceGroup("defaultRg", new()
        {
            DisplayName = "tf-testacc-rg819",
            ResourceGroupName = $"{name}2",
        });
    
        var changeRg = new AliCloud.ResourceManager.ResourceGroup("changeRg", new()
        {
            DisplayName = "tf-testacc-changerg670",
            ResourceGroupName = $"{name}3",
        });
    
        var defaultHaVipv2 = new AliCloud.Vpc.HaVipv2("default", new()
        {
            Description = "test",
            VswitchId = defaultVswitch.Id,
            HaVipName = name,
            IpAddress = "192.168.1.101",
            ResourceGroupId = defaultRg.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.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.resourcemanager.ResourceGroup;
    import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
    import com.pulumi.alicloud.vpc.HaVipv2;
    import com.pulumi.alicloud.vpc.HaVipv2Args;
    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-testacc-example");
            final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            var defaultVpc = new Network("defaultVpc", NetworkArgs.builder()
                .description("tf-test-acc-vpc")
                .vpcName(name)
                .cidrBlock("192.168.0.0/16")
                .build());
    
            var defaultVswitch = new Switch("defaultVswitch", SwitchArgs.builder()
                .vpcId(defaultVpc.id())
                .cidrBlock("192.168.0.0/21")
                .vswitchName(String.format("%s1", name))
                .zoneId(default_.zones()[0].id())
                .description("tf-testacc-vswitch")
                .build());
    
            var defaultRg = new ResourceGroup("defaultRg", ResourceGroupArgs.builder()
                .displayName("tf-testacc-rg819")
                .resourceGroupName(String.format("%s2", name))
                .build());
    
            var changeRg = new ResourceGroup("changeRg", ResourceGroupArgs.builder()
                .displayName("tf-testacc-changerg670")
                .resourceGroupName(String.format("%s3", name))
                .build());
    
            var defaultHaVipv2 = new HaVipv2("defaultHaVipv2", HaVipv2Args.builder()
                .description("test")
                .vswitchId(defaultVswitch.id())
                .haVipName(name)
                .ipAddress("192.168.1.101")
                .resourceGroupId(defaultRg.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-testacc-example
    resources:
      defaultVpc:
        type: alicloud:vpc:Network
        properties:
          description: tf-test-acc-vpc
          vpcName: ${name}
          cidrBlock: 192.168.0.0/16
      defaultVswitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${defaultVpc.id}
          cidrBlock: 192.168.0.0/21
          vswitchName: ${name}1
          zoneId: ${default.zones[0].id}
          description: tf-testacc-vswitch
      defaultRg:
        type: alicloud:resourcemanager:ResourceGroup
        properties:
          displayName: tf-testacc-rg819
          resourceGroupName: ${name}2
      changeRg:
        type: alicloud:resourcemanager:ResourceGroup
        properties:
          displayName: tf-testacc-changerg670
          resourceGroupName: ${name}3
      defaultHaVipv2:
        type: alicloud:vpc:HaVipv2
        name: default
        properties:
          description: test
          vswitchId: ${defaultVswitch.id}
          haVipName: ${name}
          ipAddress: 192.168.1.101
          resourceGroupId: ${defaultRg.id}
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    Create HaVipv2 Resource

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

    Constructor syntax

    new HaVipv2(name: string, args: HaVipv2Args, opts?: CustomResourceOptions);
    @overload
    def HaVipv2(resource_name: str,
                args: HaVipv2Args,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def HaVipv2(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                vswitch_id: Optional[str] = None,
                description: Optional[str] = None,
                ha_vip_name: Optional[str] = None,
                havip_name: Optional[str] = None,
                ip_address: Optional[str] = None,
                resource_group_id: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)
    func NewHaVipv2(ctx *Context, name string, args HaVipv2Args, opts ...ResourceOption) (*HaVipv2, error)
    public HaVipv2(string name, HaVipv2Args args, CustomResourceOptions? opts = null)
    public HaVipv2(String name, HaVipv2Args args)
    public HaVipv2(String name, HaVipv2Args args, CustomResourceOptions options)
    
    type: alicloud:vpc:HaVipv2
    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 HaVipv2Args
    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 HaVipv2Args
    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 HaVipv2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args HaVipv2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args HaVipv2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var haVipv2Resource = new AliCloud.Vpc.HaVipv2("haVipv2Resource", new()
    {
        VswitchId = "string",
        Description = "string",
        HaVipName = "string",
        IpAddress = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpc.NewHaVipv2(ctx, "haVipv2Resource", &vpc.HaVipv2Args{
    	VswitchId:       pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	HaVipName:       pulumi.String("string"),
    	IpAddress:       pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var haVipv2Resource = new HaVipv2("haVipv2Resource", HaVipv2Args.builder()
        .vswitchId("string")
        .description("string")
        .haVipName("string")
        .ipAddress("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    ha_vipv2_resource = alicloud.vpc.HaVipv2("haVipv2Resource",
        vswitch_id="string",
        description="string",
        ha_vip_name="string",
        ip_address="string",
        resource_group_id="string",
        tags={
            "string": "string",
        })
    
    const haVipv2Resource = new alicloud.vpc.HaVipv2("haVipv2Resource", {
        vswitchId: "string",
        description: "string",
        haVipName: "string",
        ipAddress: "string",
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:vpc:HaVipv2
    properties:
        description: string
        haVipName: string
        ipAddress: string
        resourceGroupId: string
        tags:
            string: string
        vswitchId: string
    

    HaVipv2 Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The HaVipv2 resource accepts the following input properties:

    VswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    HaVipName string
    The name of the HaVip instance.
    HavipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    IpAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    ResourceGroupId string
    The ID of the resource group.
    Tags Dictionary<string, string>
    The tags of HaVip.
    VswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    HaVipName string
    The name of the HaVip instance.
    HavipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    IpAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    ResourceGroupId string
    The ID of the resource group.
    Tags map[string]string
    The tags of HaVip.
    vswitchId String

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    description String
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipName String
    The name of the HaVip instance.
    havipName String
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress String
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String,String>
    The tags of HaVip.
    vswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipName string
    The name of the HaVip instance.
    havipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    resourceGroupId string
    The ID of the resource group.
    tags {[key: string]: string}
    The tags of HaVip.
    vswitch_id str

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    description str
    The description of the HaVip instance. The length is 2 to 256 characters.
    ha_vip_name str
    The name of the HaVip instance.
    havip_name str
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ip_address str
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    resource_group_id str
    The ID of the resource group.
    tags Mapping[str, str]
    The tags of HaVip.
    vswitchId String

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    description String
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipName String
    The name of the HaVip instance.
    havipName String
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress String
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String>
    The tags of HaVip.

    Outputs

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

    AssociatedEipAddresses List<string>
    EIP bound to HaVip.
    AssociatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    AssociatedInstances List<string>
    An ECS instance that is bound to HaVip.
    CreateTime string
    The creation time of the resource.
    HaVipId string
    The ID of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    MasterInstanceId string
    The primary instance ID bound to HaVip.
    Status string
    The status of this resource instance.
    VpcId string
    The VPC ID to which the HaVip instance belongs.
    AssociatedEipAddresses []string
    EIP bound to HaVip.
    AssociatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    AssociatedInstances []string
    An ECS instance that is bound to HaVip.
    CreateTime string
    The creation time of the resource.
    HaVipId string
    The ID of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    MasterInstanceId string
    The primary instance ID bound to HaVip.
    Status string
    The status of this resource instance.
    VpcId string
    The VPC ID to which the HaVip instance belongs.
    associatedEipAddresses List<String>
    EIP bound to HaVip.
    associatedInstanceType String
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances List<String>
    An ECS instance that is bound to HaVip.
    createTime String
    The creation time of the resource.
    haVipId String
    The ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    masterInstanceId String
    The primary instance ID bound to HaVip.
    status String
    The status of this resource instance.
    vpcId String
    The VPC ID to which the HaVip instance belongs.
    associatedEipAddresses string[]
    EIP bound to HaVip.
    associatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances string[]
    An ECS instance that is bound to HaVip.
    createTime string
    The creation time of the resource.
    haVipId string
    The ID of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    masterInstanceId string
    The primary instance ID bound to HaVip.
    status string
    The status of this resource instance.
    vpcId string
    The VPC ID to which the HaVip instance belongs.
    associated_eip_addresses Sequence[str]
    EIP bound to HaVip.
    associated_instance_type str
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associated_instances Sequence[str]
    An ECS instance that is bound to HaVip.
    create_time str
    The creation time of the resource.
    ha_vip_id str
    The ID of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    master_instance_id str
    The primary instance ID bound to HaVip.
    status str
    The status of this resource instance.
    vpc_id str
    The VPC ID to which the HaVip instance belongs.
    associatedEipAddresses List<String>
    EIP bound to HaVip.
    associatedInstanceType String
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances List<String>
    An ECS instance that is bound to HaVip.
    createTime String
    The creation time of the resource.
    haVipId String
    The ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    masterInstanceId String
    The primary instance ID bound to HaVip.
    status String
    The status of this resource instance.
    vpcId String
    The VPC ID to which the HaVip instance belongs.

    Look up Existing HaVipv2 Resource

    Get an existing HaVipv2 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?: HaVipv2State, opts?: CustomResourceOptions): HaVipv2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            associated_eip_addresses: Optional[Sequence[str]] = None,
            associated_instance_type: Optional[str] = None,
            associated_instances: Optional[Sequence[str]] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            ha_vip_id: Optional[str] = None,
            ha_vip_name: Optional[str] = None,
            havip_name: Optional[str] = None,
            ip_address: Optional[str] = None,
            master_instance_id: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None,
            vswitch_id: Optional[str] = None) -> HaVipv2
    func GetHaVipv2(ctx *Context, name string, id IDInput, state *HaVipv2State, opts ...ResourceOption) (*HaVipv2, error)
    public static HaVipv2 Get(string name, Input<string> id, HaVipv2State? state, CustomResourceOptions? opts = null)
    public static HaVipv2 get(String name, Output<String> id, HaVipv2State 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:
    AssociatedEipAddresses List<string>
    EIP bound to HaVip.
    AssociatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    AssociatedInstances List<string>
    An ECS instance that is bound to HaVip.
    CreateTime string
    The creation time of the resource.
    Description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    HaVipId string
    The ID of the resource.
    HaVipName string
    The name of the HaVip instance.
    HavipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    IpAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    MasterInstanceId string
    The primary instance ID bound to HaVip.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of this resource instance.
    Tags Dictionary<string, string>
    The tags of HaVip.
    VpcId string
    The VPC ID to which the HaVip instance belongs.
    VswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    AssociatedEipAddresses []string
    EIP bound to HaVip.
    AssociatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    AssociatedInstances []string
    An ECS instance that is bound to HaVip.
    CreateTime string
    The creation time of the resource.
    Description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    HaVipId string
    The ID of the resource.
    HaVipName string
    The name of the HaVip instance.
    HavipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    IpAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    MasterInstanceId string
    The primary instance ID bound to HaVip.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of this resource instance.
    Tags map[string]string
    The tags of HaVip.
    VpcId string
    The VPC ID to which the HaVip instance belongs.
    VswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    associatedEipAddresses List<String>
    EIP bound to HaVip.
    associatedInstanceType String
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances List<String>
    An ECS instance that is bound to HaVip.
    createTime String
    The creation time of the resource.
    description String
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipId String
    The ID of the resource.
    haVipName String
    The name of the HaVip instance.
    havipName String
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress String
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    masterInstanceId String
    The primary instance ID bound to HaVip.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of this resource instance.
    tags Map<String,String>
    The tags of HaVip.
    vpcId String
    The VPC ID to which the HaVip instance belongs.
    vswitchId String

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    associatedEipAddresses string[]
    EIP bound to HaVip.
    associatedInstanceType string
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances string[]
    An ECS instance that is bound to HaVip.
    createTime string
    The creation time of the resource.
    description string
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipId string
    The ID of the resource.
    haVipName string
    The name of the HaVip instance.
    havipName string
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress string
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    masterInstanceId string
    The primary instance ID bound to HaVip.
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of this resource instance.
    tags {[key: string]: string}
    The tags of HaVip.
    vpcId string
    The VPC ID to which the HaVip instance belongs.
    vswitchId string

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    associated_eip_addresses Sequence[str]
    EIP bound to HaVip.
    associated_instance_type str
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associated_instances Sequence[str]
    An ECS instance that is bound to HaVip.
    create_time str
    The creation time of the resource.
    description str
    The description of the HaVip instance. The length is 2 to 256 characters.
    ha_vip_id str
    The ID of the resource.
    ha_vip_name str
    The name of the HaVip instance.
    havip_name str
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ip_address str
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    master_instance_id str
    The primary instance ID bound to HaVip.
    resource_group_id str
    The ID of the resource group.
    status str
    The status of this resource instance.
    tags Mapping[str, str]
    The tags of HaVip.
    vpc_id str
    The VPC ID to which the HaVip instance belongs.
    vswitch_id str

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    associatedEipAddresses List<String>
    EIP bound to HaVip.
    associatedInstanceType String
    The type of the instance that is bound to the HaVip. Value:-EcsInstance: ECS instance.-NetworkInterface: ENI instance.
    associatedInstances List<String>
    An ECS instance that is bound to HaVip.
    createTime String
    The creation time of the resource.
    description String
    The description of the HaVip instance. The length is 2 to 256 characters.
    haVipId String
    The ID of the resource.
    haVipName String
    The name of the HaVip instance.
    havipName String
    Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    Deprecated: Field 'havip_name' has been deprecated from provider version 1.205.0. New field 'ha_vip_name' instead.

    ipAddress String
    The ip address of the HaVip. If not filled, the default will be assigned one from the vswitch.
    masterInstanceId String
    The primary instance ID bound to HaVip.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of this resource instance.
    tags Map<String>
    The tags of HaVip.
    vpcId String
    The VPC ID to which the HaVip instance belongs.
    vswitchId String

    The switch ID to which the HaVip instance belongs.

    The following arguments will be discarded. Please use new fields as soon as possible:

    Import

    Vpc Ha Vip can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/haVipv2:HaVipv2 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.66.0 published on Friday, Nov 15, 2024 by Pulumi