alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.vpc.Switch

Import

Vswitch can be imported using the id, e.g.

 $ pulumi import alicloud:vpc/switch:Switch example vsw-abc123456

Create Switch Resource

new Switch(name: string, args: SwitchArgs, opts?: CustomResourceOptions);
@overload
def Switch(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           availability_zone: Optional[str] = None,
           cidr_block: Optional[str] = None,
           description: Optional[str] = None,
           enable_ipv6: Optional[bool] = None,
           ipv6_cidr_block_mask: Optional[int] = None,
           name: Optional[str] = None,
           tags: Optional[Mapping[str, Any]] = None,
           vpc_id: Optional[str] = None,
           vswitch_name: Optional[str] = None,
           zone_id: Optional[str] = None)
@overload
def Switch(resource_name: str,
           args: SwitchArgs,
           opts: Optional[ResourceOptions] = None)
func NewSwitch(ctx *Context, name string, args SwitchArgs, opts ...ResourceOption) (*Switch, error)
public Switch(string name, SwitchArgs args, CustomResourceOptions? opts = null)
public Switch(String name, SwitchArgs args)
public Switch(String name, SwitchArgs args, CustomResourceOptions options)
type: alicloud:vpc:Switch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

CidrBlock string

The CIDR block for the switch.

VpcId string

The VPC ID.

AvailabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

Description string

The switch description. Defaults to null.

EnableIpv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

Ipv6CidrBlockMask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

Name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VswitchName string

The name of the switch. Defaults to null.

ZoneId string

The AZ for the switch. Note: Required for a VPC switch.

CidrBlock string

The CIDR block for the switch.

VpcId string

The VPC ID.

AvailabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

Description string

The switch description. Defaults to null.

EnableIpv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

Ipv6CidrBlockMask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

Name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VswitchName string

The name of the switch. Defaults to null.

ZoneId string

The AZ for the switch. Note: Required for a VPC switch.

cidrBlock String

The CIDR block for the switch.

vpcId String

The VPC ID.

availabilityZone String

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

description String

The switch description. Defaults to null.

enableIpv6 Boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlockMask Integer

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name String

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

tags Map<String,Object>

A mapping of tags to assign to the resource.

vswitchName String

The name of the switch. Defaults to null.

zoneId String

The AZ for the switch. Note: Required for a VPC switch.

cidrBlock string

The CIDR block for the switch.

vpcId string

The VPC ID.

availabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

description string

The switch description. Defaults to null.

enableIpv6 boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlockMask number

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

vswitchName string

The name of the switch. Defaults to null.

zoneId string

The AZ for the switch. Note: Required for a VPC switch.

cidr_block str

The CIDR block for the switch.

vpc_id str

The VPC ID.

availability_zone str

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

description str

The switch description. Defaults to null.

enable_ipv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6_cidr_block_mask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name str

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

vswitch_name str

The name of the switch. Defaults to null.

zone_id str

The AZ for the switch. Note: Required for a VPC switch.

cidrBlock String

The CIDR block for the switch.

vpcId String

The VPC ID.

availabilityZone String

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

description String

The switch description. Defaults to null.

enableIpv6 Boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlockMask Number

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name String

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

tags Map<Any>

A mapping of tags to assign to the resource.

vswitchName String

The name of the switch. Defaults to null.

zoneId String

The AZ for the switch. Note: Required for a VPC switch.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

Status string

(Available in 1.119.0+) The status of the switch.

Id string

The provider-assigned unique ID for this managed resource.

Ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

Status string

(Available in 1.119.0+) The status of the switch.

id String

The provider-assigned unique ID for this managed resource.

ipv6CidrBlock String

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

status String

(Available in 1.119.0+) The status of the switch.

id string

The provider-assigned unique ID for this managed resource.

ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

status string

(Available in 1.119.0+) The status of the switch.

id str

The provider-assigned unique ID for this managed resource.

ipv6_cidr_block str

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

status str

(Available in 1.119.0+) The status of the switch.

id String

The provider-assigned unique ID for this managed resource.

ipv6CidrBlock String

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

status String

(Available in 1.119.0+) The status of the switch.

Look up Existing Switch Resource

Get an existing Switch 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?: SwitchState, opts?: CustomResourceOptions): Switch
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        availability_zone: Optional[str] = None,
        cidr_block: Optional[str] = None,
        description: Optional[str] = None,
        enable_ipv6: Optional[bool] = None,
        ipv6_cidr_block: Optional[str] = None,
        ipv6_cidr_block_mask: Optional[int] = None,
        name: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None,
        vpc_id: Optional[str] = None,
        vswitch_name: Optional[str] = None,
        zone_id: Optional[str] = None) -> Switch
func GetSwitch(ctx *Context, name string, id IDInput, state *SwitchState, opts ...ResourceOption) (*Switch, error)
public static Switch Get(string name, Input<string> id, SwitchState? state, CustomResourceOptions? opts = null)
public static Switch get(String name, Output<String> id, SwitchState 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:
AvailabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

CidrBlock string

The CIDR block for the switch.

Description string

The switch description. Defaults to null.

EnableIpv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

Ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

Ipv6CidrBlockMask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

Name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

Status string

(Available in 1.119.0+) The status of the switch.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VpcId string

The VPC ID.

VswitchName string

The name of the switch. Defaults to null.

ZoneId string

The AZ for the switch. Note: Required for a VPC switch.

AvailabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

CidrBlock string

The CIDR block for the switch.

Description string

The switch description. Defaults to null.

EnableIpv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

Ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

Ipv6CidrBlockMask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

Name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

Status string

(Available in 1.119.0+) The status of the switch.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VpcId string

The VPC ID.

VswitchName string

The name of the switch. Defaults to null.

ZoneId string

The AZ for the switch. Note: Required for a VPC switch.

availabilityZone String

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

cidrBlock String

The CIDR block for the switch.

description String

The switch description. Defaults to null.

enableIpv6 Boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlock String

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

ipv6CidrBlockMask Integer

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name String

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

status String

(Available in 1.119.0+) The status of the switch.

tags Map<String,Object>

A mapping of tags to assign to the resource.

vpcId String

The VPC ID.

vswitchName String

The name of the switch. Defaults to null.

zoneId String

The AZ for the switch. Note: Required for a VPC switch.

availabilityZone string

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

cidrBlock string

The CIDR block for the switch.

description string

The switch description. Defaults to null.

enableIpv6 boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlock string

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

ipv6CidrBlockMask number

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name string

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

status string

(Available in 1.119.0+) The status of the switch.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

vpcId string

The VPC ID.

vswitchName string

The name of the switch. Defaults to null.

zoneId string

The AZ for the switch. Note: Required for a VPC switch.

availability_zone str

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

cidr_block str

The CIDR block for the switch.

description str

The switch description. Defaults to null.

enable_ipv6 bool

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6_cidr_block str

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

ipv6_cidr_block_mask int

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name str

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

status str

(Available in 1.119.0+) The status of the switch.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

vpc_id str

The VPC ID.

vswitch_name str

The name of the switch. Defaults to null.

zone_id str

The AZ for the switch. Note: Required for a VPC switch.

availabilityZone String

Field availability_zone has been deprecated from provider version 1.119.0. New field zone_id instead.

Deprecated:

Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.

cidrBlock String

The CIDR block for the switch.

description String

The switch description. Defaults to null.

enableIpv6 Boolean

Specifies whether to enable the IPv6 CIDR block. Valid values: false (Default): disables IPv6 CIDR blocks. true: enables IPv6 CIDR blocks.

ipv6CidrBlock String

(Available in 1.201.1+) The IPv6 CIDR block for the switch.

ipv6CidrBlockMask Number

The last 8 bits of the switch's IPv6 segment, taking values: 0~255. This parameter is only supported to be configured when the VPC to which the switch belongs is IPv6 enabled.

name String

Field name has been deprecated from provider version 1.119.0. New field vswitch_name instead.

Deprecated:

Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.

status String

(Available in 1.119.0+) The status of the switch.

tags Map<Any>

A mapping of tags to assign to the resource.

vpcId String

The VPC ID.

vswitchName String

The name of the switch. Defaults to null.

zoneId String

The AZ for the switch. Note: Required for a VPC switch.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.