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)
public Port(String name, PortArgs args)
public Port(String name, PortArgs args, CustomResourceOptions options)
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:

networkId string
adminStateUp boolean
allowedAddressPairs PortAllowedAddressPairArgs[]
deviceId string
deviceOwner string
extraDhcpOptions PortExtraDhcpOptionArgs[]
fixedIps PortFixedIpArgs[]
macAddress string
name string
noSecurityGroups boolean
region string
securityGroupIds string[]
tenantId string

Deprecated:

tenant_id is deprecated

valueSpecs {[key: string]: string}
networkId String
adminStateUp Boolean
allowedAddressPairs List<Property Map>
deviceId String
deviceOwner String
extraDhcpOptions List<Property Map>
fixedIps List<Property Map>
macAddress String
name String
noSecurityGroups Boolean
region String
securityGroupIds List<String>
tenantId String

Deprecated:

tenant_id is deprecated

valueSpecs Map<String>

Outputs

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

AllFixedIps List<string>
AllSecurityGroupIds List<string>
Id string

The provider-assigned unique ID for this managed resource.

AllFixedIps []string
AllSecurityGroupIds []string
Id string

The provider-assigned unique ID for this managed resource.

allFixedIps List<String>
allSecurityGroupIds List<String>
id String

The provider-assigned unique ID for this managed resource.

allFixedIps string[]
allSecurityGroupIds string[]
id string

The provider-assigned unique ID for this managed resource.

all_fixed_ips Sequence[str]
all_security_group_ids Sequence[str]
id str

The provider-assigned unique ID for this managed resource.

allFixedIps List<String>
allSecurityGroupIds List<String>
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.
The following state arguments are supported:
AdminStateUp bool
AllFixedIps List<string>
AllSecurityGroupIds List<string>
AllowedAddressPairs List<PortAllowedAddressPairArgs>
DeviceId string
DeviceOwner string
ExtraDhcpOptions List<PortExtraDhcpOptionArgs>
FixedIps List<PortFixedIpArgs>
MacAddress string
Name string
NetworkId string
NoSecurityGroups bool
Region string
SecurityGroupIds List<string>
TenantId string

Deprecated:

tenant_id is deprecated

ValueSpecs Dictionary<string, string>
adminStateUp Boolean
allFixedIps List<String>
allSecurityGroupIds List<String>
allowedAddressPairs List<PortAllowedAddressPairArgs>
deviceId String
deviceOwner String
extraDhcpOptions List<PortExtraDhcpOptionArgs>
fixedIps List<PortFixedIpArgs>
macAddress String
name String
networkId String
noSecurityGroups Boolean
region String
securityGroupIds List<String>
tenantId String

Deprecated:

tenant_id is deprecated

valueSpecs Map<String,String>
adminStateUp boolean
allFixedIps string[]
allSecurityGroupIds string[]
allowedAddressPairs PortAllowedAddressPairArgs[]
deviceId string
deviceOwner string
extraDhcpOptions PortExtraDhcpOptionArgs[]
fixedIps PortFixedIpArgs[]
macAddress string
name string
networkId string
noSecurityGroups boolean
region string
securityGroupIds string[]
tenantId string

Deprecated:

tenant_id is deprecated

valueSpecs {[key: string]: string}
adminStateUp Boolean
allFixedIps List<String>
allSecurityGroupIds List<String>
allowedAddressPairs List<Property Map>
deviceId String
deviceOwner String
extraDhcpOptions List<Property Map>
fixedIps List<Property Map>
macAddress String
name String
networkId String
noSecurityGroups Boolean
region String
securityGroupIds List<String>
tenantId String

Deprecated:

tenant_id is deprecated

valueSpecs Map<String>

Supporting Types

PortAllowedAddressPair

IpAddress string
MacAddress string
IpAddress string
MacAddress string
ipAddress String
macAddress String
ipAddress string
macAddress string
ipAddress String
macAddress String

PortExtraDhcpOption

Name string
Value string
IpVersion int
Name string
Value string
IpVersion int
name String
value String
ipVersion Integer
name string
value string
ipVersion number
name str
value str
ip_version int
name String
value String
ipVersion Number

PortFixedIp

SubnetId string
IpAddress string
SubnetId string
IpAddress string
subnetId String
ipAddress String
subnetId string
ipAddress string
subnetId String
ipAddress String

Package Details

Repository
https://github.com/huaweicloud/pulumi-huaweicloud
License
Apache-2.0
Notes

This Pulumi package is based on the huaweicloud Terraform Provider.