title: "Port" title_tag: "huaweicloud.Vpc.Port" meta_desc: "Documentation for the huaweicloud.Vpc.Port resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Create Port Resource {#create}
new Port(name: string, args: PortArgs, opts?: CustomResourceOptions);
@overload
def Port(resource_name: str,
opts: Optional[ResourceOptions] = None,
admin_state_up: Optional[bool] = None,
allowed_address_pairs: Optional[Sequence[_vpc.PortAllowedAddressPairArgs]] = None,
device_id: Optional[str] = None,
device_owner: Optional[str] = None,
extra_dhcp_options: Optional[Sequence[_vpc.PortExtraDhcpOptionArgs]] = None,
fixed_ips: Optional[Sequence[_vpc.PortFixedIpArgs]] = None,
mac_address: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
no_security_groups: Optional[bool] = None,
region: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
tenant_id: Optional[str] = None,
value_specs: Optional[Mapping[str, str]] = None)
@overload
def Port(resource_name: str,
args: PortArgs,
opts: Optional[ResourceOptions] = None)
func NewPort(ctx *Context, name string, args PortArgs, opts ...ResourceOption) (*Port, error)
public Port(string name, PortArgs args, CustomResourceOptions? opts = null)
type: huaweicloud:Vpc:Port
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PortArgs
- 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 PortArgs
- 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 PortArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PortArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PortArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Port Resource Properties {#properties}
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Port resource accepts the following input properties:
-
Network
Id string -
Admin
State boolUp -
Allowed
Address List<PortPairs Allowed Address Pair Args> -
Device
Id string -
Device
Owner string -
Extra
Dhcp List<PortOptions Extra Dhcp Option Args> -
Fixed
Ips List<PortFixed Ip Args> -
Mac
Address string - Name string
-
No
Security boolGroups - Region string
-
Security
Group List<string>Ids -
Tenant
Id string tenant_id is deprecated
-
Value
Specs Dictionary<string, string>
-
Network
Id string -
Admin
State boolUp -
Allowed
Address []PortPairs Allowed Address Pair Args -
Device
Id string -
Device
Owner string -
Extra
Dhcp []PortOptions Extra Dhcp Option Args -
Fixed
Ips []PortFixed Ip Args -
Mac
Address string - Name string
-
No
Security boolGroups - Region string
-
Security
Group []stringIds -
Tenant
Id string tenant_id is deprecated
-
Value
Specs map[string]string
-
network
Id String -
admin
State BooleanUp -
allowed
Address List<PortPairs Allowed Address Pair Args> -
device
Id String -
device
Owner String -
extra
Dhcp List<PortOptions Extra Dhcp Option Args> -
fixed
Ips List<PortFixed Ip Args> -
mac
Address String - name String
-
no
Security BooleanGroups - region String
-
security
Group List<String>Ids -
tenant
Id String tenant_id is deprecated
-
value
Specs Map<String,String>
-
network
Id string -
admin
State booleanUp -
allowed
Address PortPairs Allowed Address Pair Args[] -
device
Id string -
device
Owner string -
extra
Dhcp PortOptions Extra Dhcp Option Args[] -
fixed
Ips PortFixed Ip Args[] -
mac
Address string - name string
-
no
Security booleanGroups - region string
-
security
Group string[]Ids -
tenant
Id string tenant_id is deprecated
-
value
Specs {[key: string]: string}
-
network_
id str -
admin_
state_ boolup -
allowed_
address_ Portpairs Allowed Address Pair Args] -
device_
id str -
device_
owner str -
extra_
dhcp_ Portoptions Extra Dhcp Option Args] -
fixed_
ips PortFixed Ip Args] -
mac_
address str - name str
-
no_
security_ boolgroups - region str
-
security_
group_ Sequence[str]ids -
tenant_
id str tenant_id is deprecated
-
value_
specs Mapping[str, str]
-
network
Id String -
admin
State BooleanUp -
allowed
Address List<Property Map>Pairs -
device
Id String -
device
Owner String -
extra
Dhcp List<Property Map>Options -
fixed
Ips List<Property Map> -
mac
Address String - name String
-
no
Security BooleanGroups - region String
-
security
Group List<String>Ids -
tenant
Id String tenant_id is deprecated
-
value
Specs Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the Port resource produces the following output properties:
-
All
Fixed List<string>Ips -
All
Security List<string>Group Ids - Id string
The provider-assigned unique ID for this managed resource.
-
All
Fixed []stringIps -
All
Security []stringGroup Ids - Id string
The provider-assigned unique ID for this managed resource.
-
all
Fixed List<String>Ips -
all
Security List<String>Group Ids - id String
The provider-assigned unique ID for this managed resource.
-
all
Fixed string[]Ips -
all
Security string[]Group Ids - id string
The provider-assigned unique ID for this managed resource.
-
all_
fixed_ Sequence[str]ips -
all_
security_ Sequence[str]group_ ids - id str
The provider-assigned unique ID for this managed resource.
-
all
Fixed List<String>Ips -
all
Security List<String>Group Ids - id String
The provider-assigned unique ID for this managed resource.
Look up Existing Port Resource {#look-up}
Get an existing Port 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?: PortState, opts?: CustomResourceOptions): Port
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
admin_state_up: Optional[bool] = None,
all_fixed_ips: Optional[Sequence[str]] = None,
all_security_group_ids: Optional[Sequence[str]] = None,
allowed_address_pairs: Optional[Sequence[_vpc.PortAllowedAddressPairArgs]] = None,
device_id: Optional[str] = None,
device_owner: Optional[str] = None,
extra_dhcp_options: Optional[Sequence[_vpc.PortExtraDhcpOptionArgs]] = None,
fixed_ips: Optional[Sequence[_vpc.PortFixedIpArgs]] = None,
mac_address: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
no_security_groups: Optional[bool] = None,
region: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
tenant_id: Optional[str] = None,
value_specs: Optional[Mapping[str, str]] = None) -> Port
func GetPort(ctx *Context, name string, id IDInput, state *PortState, opts ...ResourceOption) (*Port, error)
public static Port Get(string name, Input<string> id, PortState? state, CustomResourceOptions? opts = null)
public static Port get(String name, Output<String> id, PortState 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.
-
Admin
State boolUp -
All
Fixed List<string>Ips -
All
Security List<string>Group Ids -
Allowed
Address List<PortPairs Allowed Address Pair Args> -
Device
Id string -
Device
Owner string -
Extra
Dhcp List<PortOptions Extra Dhcp Option Args> -
Fixed
Ips List<PortFixed Ip Args> -
Mac
Address string - Name string
-
Network
Id string -
No
Security boolGroups - Region string
-
Security
Group List<string>Ids -
Tenant
Id string tenant_id is deprecated
-
Value
Specs Dictionary<string, string>
-
Admin
State boolUp -
All
Fixed []stringIps -
All
Security []stringGroup Ids -
Allowed
Address []PortPairs Allowed Address Pair Args -
Device
Id string -
Device
Owner string -
Extra
Dhcp []PortOptions Extra Dhcp Option Args -
Fixed
Ips []PortFixed Ip Args -
Mac
Address string - Name string
-
Network
Id string -
No
Security boolGroups - Region string
-
Security
Group []stringIds -
Tenant
Id string tenant_id is deprecated
-
Value
Specs map[string]string
-
admin
State BooleanUp -
all
Fixed List<String>Ips -
all
Security List<String>Group Ids -
allowed
Address List<PortPairs Allowed Address Pair Args> -
device
Id String -
device
Owner String -
extra
Dhcp List<PortOptions Extra Dhcp Option Args> -
fixed
Ips List<PortFixed Ip Args> -
mac
Address String - name String
-
network
Id String -
no
Security BooleanGroups - region String
-
security
Group List<String>Ids -
tenant
Id String tenant_id is deprecated
-
value
Specs Map<String,String>
-
admin
State booleanUp -
all
Fixed string[]Ips -
all
Security string[]Group Ids -
allowed
Address PortPairs Allowed Address Pair Args[] -
device
Id string -
device
Owner string -
extra
Dhcp PortOptions Extra Dhcp Option Args[] -
fixed
Ips PortFixed Ip Args[] -
mac
Address string - name string
-
network
Id string -
no
Security booleanGroups - region string
-
security
Group string[]Ids -
tenant
Id string tenant_id is deprecated
-
value
Specs {[key: string]: string}
-
admin_
state_ boolup -
all_
fixed_ Sequence[str]ips -
all_
security_ Sequence[str]group_ ids -
allowed_
address_ Portpairs Allowed Address Pair Args] -
device_
id str -
device_
owner str -
extra_
dhcp_ Portoptions Extra Dhcp Option Args] -
fixed_
ips PortFixed Ip Args] -
mac_
address str - name str
-
network_
id str -
no_
security_ boolgroups - region str
-
security_
group_ Sequence[str]ids -
tenant_
id str tenant_id is deprecated
-
value_
specs Mapping[str, str]
-
admin
State BooleanUp -
all
Fixed List<String>Ips -
all
Security List<String>Group Ids -
allowed
Address List<Property Map>Pairs -
device
Id String -
device
Owner String -
extra
Dhcp List<Property Map>Options -
fixed
Ips List<Property Map> -
mac
Address String - name String
-
network
Id String -
no
Security BooleanGroups - region String
-
security
Group List<String>Ids -
tenant
Id String tenant_id is deprecated
-
value
Specs Map<String>
Supporting Types
PortAllowedAddressPair
-
Ip
Address string -
Mac
Address string
-
Ip
Address string -
Mac
Address string
-
ip
Address String -
mac
Address String
-
ip
Address string -
mac
Address string
-
ip_
address str -
mac_
address str
-
ip
Address String -
mac
Address String
PortExtraDhcpOption
- name str
- value str
-
ip_
version int
PortFixedIp
-
subnet_
id str -
ip_
address str
Package Details
- Repository
- https://github.com/huaweicloud/pulumi-huaweicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
huaweicloud
Terraform Provider.