nsxt.LogicalPort
Explore with Pulumi AI
Create LogicalPort Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogicalPort(name: string, args: LogicalPortArgs, opts?: CustomResourceOptions);
@overload
def LogicalPort(resource_name: str,
args: LogicalPortArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LogicalPort(resource_name: str,
opts: Optional[ResourceOptions] = None,
logical_switch_id: Optional[str] = None,
admin_state: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
logical_port_id: Optional[str] = None,
switching_profile_ids: Optional[Sequence[LogicalPortSwitchingProfileIdArgs]] = None,
tags: Optional[Sequence[LogicalPortTagArgs]] = None)
func NewLogicalPort(ctx *Context, name string, args LogicalPortArgs, opts ...ResourceOption) (*LogicalPort, error)
public LogicalPort(string name, LogicalPortArgs args, CustomResourceOptions? opts = null)
public LogicalPort(String name, LogicalPortArgs args)
public LogicalPort(String name, LogicalPortArgs args, CustomResourceOptions options)
type: nsxt:LogicalPort
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 LogicalPortArgs
- 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 LogicalPortArgs
- 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 LogicalPortArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogicalPortArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogicalPortArgs
- 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 logicalPortResource = new Nsxt.LogicalPort("logicalPortResource", new()
{
LogicalSwitchId = "string",
AdminState = "string",
Description = "string",
DisplayName = "string",
LogicalPortId = "string",
SwitchingProfileIds = new[]
{
new Nsxt.Inputs.LogicalPortSwitchingProfileIdArgs
{
Key = "string",
Value = "string",
},
},
Tags = new[]
{
new Nsxt.Inputs.LogicalPortTagArgs
{
Scope = "string",
Tag = "string",
},
},
});
example, err := nsxt.NewLogicalPort(ctx, "logicalPortResource", &nsxt.LogicalPortArgs{
LogicalSwitchId: pulumi.String("string"),
AdminState: pulumi.String("string"),
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
LogicalPortId: pulumi.String("string"),
SwitchingProfileIds: nsxt.LogicalPortSwitchingProfileIdArray{
&nsxt.LogicalPortSwitchingProfileIdArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Tags: nsxt.LogicalPortTagArray{
&nsxt.LogicalPortTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
var logicalPortResource = new LogicalPort("logicalPortResource", LogicalPortArgs.builder()
.logicalSwitchId("string")
.adminState("string")
.description("string")
.displayName("string")
.logicalPortId("string")
.switchingProfileIds(LogicalPortSwitchingProfileIdArgs.builder()
.key("string")
.value("string")
.build())
.tags(LogicalPortTagArgs.builder()
.scope("string")
.tag("string")
.build())
.build());
logical_port_resource = nsxt.LogicalPort("logicalPortResource",
logical_switch_id="string",
admin_state="string",
description="string",
display_name="string",
logical_port_id="string",
switching_profile_ids=[{
"key": "string",
"value": "string",
}],
tags=[{
"scope": "string",
"tag": "string",
}])
const logicalPortResource = new nsxt.LogicalPort("logicalPortResource", {
logicalSwitchId: "string",
adminState: "string",
description: "string",
displayName: "string",
logicalPortId: "string",
switchingProfileIds: [{
key: "string",
value: "string",
}],
tags: [{
scope: "string",
tag: "string",
}],
});
type: nsxt:LogicalPort
properties:
adminState: string
description: string
displayName: string
logicalPortId: string
logicalSwitchId: string
switchingProfileIds:
- key: string
value: string
tags:
- scope: string
tag: string
LogicalPort 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 LogicalPort resource accepts the following input properties:
- Logical
Switch stringId - Logical switch ID for the logical port.
- Admin
State string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of this resource.
- Display
Name string - Display name, defaults to ID if not set.
- Logical
Port stringId - ID of the logical port.
- Switching
Profile List<LogicalIds Port Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Logical
Port Tag> - A list of scope + tag pairs to associate with this logical port.
- Logical
Switch stringId - Logical switch ID for the logical port.
- Admin
State string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of this resource.
- Display
Name string - Display name, defaults to ID if not set.
- Logical
Port stringId - ID of the logical port.
- Switching
Profile []LogicalIds Port Switching Profile Id Args - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- []Logical
Port Tag Args - A list of scope + tag pairs to associate with this logical port.
- logical
Switch StringId - Logical switch ID for the logical port.
- admin
State String - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of this resource.
- display
Name String - Display name, defaults to ID if not set.
- logical
Port StringId - ID of the logical port.
- switching
Profile List<LogicalIds Port Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Logical
Port Tag> - A list of scope + tag pairs to associate with this logical port.
- logical
Switch stringId - Logical switch ID for the logical port.
- admin
State string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description string
- Description of this resource.
- display
Name string - Display name, defaults to ID if not set.
- logical
Port stringId - ID of the logical port.
- switching
Profile LogicalIds Port Switching Profile Id[] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Logical
Port Tag[] - A list of scope + tag pairs to associate with this logical port.
- logical_
switch_ strid - Logical switch ID for the logical port.
- admin_
state str - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description str
- Description of this resource.
- display_
name str - Display name, defaults to ID if not set.
- logical_
port_ strid - ID of the logical port.
- switching_
profile_ Sequence[Logicalids Port Switching Profile Id Args] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Sequence[Logical
Port Tag Args] - A list of scope + tag pairs to associate with this logical port.
- logical
Switch StringId - Logical switch ID for the logical port.
- admin
State String - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of this resource.
- display
Name String - Display name, defaults to ID if not set.
- logical
Port StringId - ID of the logical port.
- switching
Profile List<Property Map>Ids - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Property Map>
- A list of scope + tag pairs to associate with this logical port.
Outputs
All input properties are implicitly available as output properties. Additionally, the LogicalPort resource produces the following output properties:
Look up Existing LogicalPort Resource
Get an existing LogicalPort 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?: LogicalPortState, opts?: CustomResourceOptions): LogicalPort
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
admin_state: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
logical_port_id: Optional[str] = None,
logical_switch_id: Optional[str] = None,
revision: Optional[float] = None,
switching_profile_ids: Optional[Sequence[LogicalPortSwitchingProfileIdArgs]] = None,
tags: Optional[Sequence[LogicalPortTagArgs]] = None) -> LogicalPort
func GetLogicalPort(ctx *Context, name string, id IDInput, state *LogicalPortState, opts ...ResourceOption) (*LogicalPort, error)
public static LogicalPort Get(string name, Input<string> id, LogicalPortState? state, CustomResourceOptions? opts = null)
public static LogicalPort get(String name, Output<String> id, LogicalPortState state, CustomResourceOptions options)
resources: _: type: nsxt:LogicalPort get: id: ${id}
- 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 string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of this resource.
- Display
Name string - Display name, defaults to ID if not set.
- Logical
Port stringId - ID of the logical port.
- Logical
Switch stringId - Logical switch ID for the logical port.
- Revision double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Switching
Profile List<LogicalIds Port Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Logical
Port Tag> - A list of scope + tag pairs to associate with this logical port.
- Admin
State string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- Description string
- Description of this resource.
- Display
Name string - Display name, defaults to ID if not set.
- Logical
Port stringId - ID of the logical port.
- Logical
Switch stringId - Logical switch ID for the logical port.
- Revision float64
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- Switching
Profile []LogicalIds Port Switching Profile Id Args - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- []Logical
Port Tag Args - A list of scope + tag pairs to associate with this logical port.
- admin
State String - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of this resource.
- display
Name String - Display name, defaults to ID if not set.
- logical
Port StringId - ID of the logical port.
- logical
Switch StringId - Logical switch ID for the logical port.
- revision Double
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile List<LogicalIds Port Switching Profile Id> - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Logical
Port Tag> - A list of scope + tag pairs to associate with this logical port.
- admin
State string - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description string
- Description of this resource.
- display
Name string - Display name, defaults to ID if not set.
- logical
Port stringId - ID of the logical port.
- logical
Switch stringId - Logical switch ID for the logical port.
- revision number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile LogicalIds Port Switching Profile Id[] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Logical
Port Tag[] - A list of scope + tag pairs to associate with this logical port.
- admin_
state str - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description str
- Description of this resource.
- display_
name str - Display name, defaults to ID if not set.
- logical_
port_ strid - ID of the logical port.
- logical_
switch_ strid - Logical switch ID for the logical port.
- revision float
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching_
profile_ Sequence[Logicalids Port Switching Profile Id Args] - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- Sequence[Logical
Port Tag Args] - A list of scope + tag pairs to associate with this logical port.
- admin
State String - Admin state for the logical port. Accepted values - 'UP' or 'DOWN'. The default value is 'UP'.
- description String
- Description of this resource.
- display
Name String - Display name, defaults to ID if not set.
- logical
Port StringId - ID of the logical port.
- logical
Switch StringId - Logical switch ID for the logical port.
- revision Number
- Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
- switching
Profile List<Property Map>Ids - List of IDs of switching profiles (of various types) to be associated with this switch. Default switching profiles will be used if not specified.
- List<Property Map>
- A list of scope + tag pairs to associate with this logical port.
Supporting Types
LogicalPortSwitchingProfileId, LogicalPortSwitchingProfileIdArgs
LogicalPortTag, LogicalPortTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.