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:
- Cidr
Block string The CIDR block for the switch.
- Vpc
Id string The VPC ID.
- Availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.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.
- Enable
Ipv6 bool Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- Ipv6Cidr
Block intMask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vswitch
Name string The name of the switch. Defaults to null.
- Zone
Id string The AZ for the switch. Note: Required for a VPC switch.
- Cidr
Block string The CIDR block for the switch.
- Vpc
Id string The VPC ID.
- Availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.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.
- Enable
Ipv6 bool Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- Ipv6Cidr
Block intMask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vswitch
Name string The name of the switch. Defaults to null.
- Zone
Id string The AZ for the switch. Note: Required for a VPC switch.
- cidr
Block String The CIDR block for the switch.
- vpc
Id String The VPC ID.
- availability
Zone String Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.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.
- enable
Ipv6 Boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block IntegerMask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- Map<String,Object>
A mapping of tags to assign to the resource.
- vswitch
Name String The name of the switch. Defaults to null.
- zone
Id String The AZ for the switch. Note: Required for a VPC switch.
- cidr
Block string The CIDR block for the switch.
- vpc
Id string The VPC ID.
- availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.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.
- enable
Ipv6 boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block numberMask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vswitch
Name string The name of the switch. Defaults to null.
- zone
Id 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 fieldzone_id
instead.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_ intblock_ mask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- 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.
- cidr
Block String The CIDR block for the switch.
- vpc
Id String The VPC ID.
- availability
Zone String Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.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.
- enable
Ipv6 Boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block NumberMask 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 fieldvswitch_name
instead.Field 'name' has been deprecated from provider version 1.119.0. New field 'vswitch_name' instead.
- Map<Any>
A mapping of tags to assign to the resource.
- vswitch
Name String The name of the switch. Defaults to null.
- zone
Id 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.
- Ipv6Cidr
Block 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.
- Ipv6Cidr
Block 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.
- ipv6Cidr
Block 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.
- ipv6Cidr
Block 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_ strblock (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.
- ipv6Cidr
Block 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.
- Availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
- Cidr
Block string The CIDR block for the switch.
- Description string
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.- Ipv6Cidr
Block string (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- Ipv6Cidr
Block intMask 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 fieldvswitch_name
instead.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.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Vpc
Id string The VPC ID.
- Vswitch
Name string The name of the switch. Defaults to null.
- Zone
Id string The AZ for the switch. Note: Required for a VPC switch.
- Availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
- Cidr
Block string The CIDR block for the switch.
- Description string
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.- Ipv6Cidr
Block string (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- Ipv6Cidr
Block intMask 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 fieldvswitch_name
instead.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.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Vpc
Id string The VPC ID.
- Vswitch
Name string The name of the switch. Defaults to null.
- Zone
Id string The AZ for the switch. Note: Required for a VPC switch.
- availability
Zone String Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
- cidr
Block String The CIDR block for the switch.
- description String
The switch description. Defaults to null.
- enable
Ipv6 Boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block String (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- ipv6Cidr
Block IntegerMask 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 fieldvswitch_name
instead.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.
- Map<String,Object>
A mapping of tags to assign to the resource.
- vpc
Id String The VPC ID.
- vswitch
Name String The name of the switch. Defaults to null.
- zone
Id String The AZ for the switch. Note: Required for a VPC switch.
- availability
Zone string Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
- cidr
Block string The CIDR block for the switch.
- description string
The switch description. Defaults to null.
- enable
Ipv6 boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block string (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- ipv6Cidr
Block numberMask 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 fieldvswitch_name
instead.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.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- vpc
Id string The VPC ID.
- vswitch
Name string The name of the switch. Defaults to null.
- zone
Id 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 fieldzone_id
instead.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_ strblock (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- ipv6_
cidr_ intblock_ mask 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 fieldvswitch_name
instead.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.
- 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.
- availability
Zone String Field
availability_zone
has been deprecated from provider version 1.119.0. New fieldzone_id
instead.Field 'availability_zone' has been deprecated from provider version 1.119.0. New field 'zone_id' instead.
- cidr
Block String The CIDR block for the switch.
- description String
The switch description. Defaults to null.
- enable
Ipv6 Boolean Specifies whether to enable the IPv6 CIDR block. Valid values:
false
(Default): disables IPv6 CIDR blocks.true
: enables IPv6 CIDR blocks.- ipv6Cidr
Block String (Available in 1.201.1+) The IPv6 CIDR block for the switch.
- ipv6Cidr
Block NumberMask 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 fieldvswitch_name
instead.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.
- Map<Any>
A mapping of tags to assign to the resource.
- vpc
Id String The VPC ID.
- vswitch
Name String The name of the switch. Defaults to null.
- zone
Id 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.