nsxt.PolicyVmTags
Explore with Pulumi AI
Create PolicyVmTags Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyVmTags(name: string, args: PolicyVmTagsArgs, opts?: CustomResourceOptions);
@overload
def PolicyVmTags(resource_name: str,
args: PolicyVmTagsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicyVmTags(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
context: Optional[PolicyVmTagsContextArgs] = None,
policy_vm_tags_id: Optional[str] = None,
ports: Optional[Sequence[PolicyVmTagsPortArgs]] = None,
tags: Optional[Sequence[PolicyVmTagsTagArgs]] = None)
func NewPolicyVmTags(ctx *Context, name string, args PolicyVmTagsArgs, opts ...ResourceOption) (*PolicyVmTags, error)
public PolicyVmTags(string name, PolicyVmTagsArgs args, CustomResourceOptions? opts = null)
public PolicyVmTags(String name, PolicyVmTagsArgs args)
public PolicyVmTags(String name, PolicyVmTagsArgs args, CustomResourceOptions options)
type: nsxt:PolicyVmTags
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 PolicyVmTagsArgs
- 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 PolicyVmTagsArgs
- 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 PolicyVmTagsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyVmTagsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyVmTagsArgs
- 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 policyVmTagsResource = new Nsxt.PolicyVmTags("policyVmTagsResource", new()
{
InstanceId = "string",
Context = new Nsxt.Inputs.PolicyVmTagsContextArgs
{
ProjectId = "string",
},
PolicyVmTagsId = "string",
Ports = new[]
{
new Nsxt.Inputs.PolicyVmTagsPortArgs
{
SegmentPath = "string",
Tags = new[]
{
new Nsxt.Inputs.PolicyVmTagsPortTagArgs
{
Scope = "string",
Tag = "string",
},
},
},
},
Tags = new[]
{
new Nsxt.Inputs.PolicyVmTagsTagArgs
{
Scope = "string",
Tag = "string",
},
},
});
example, err := nsxt.NewPolicyVmTags(ctx, "policyVmTagsResource", &nsxt.PolicyVmTagsArgs{
InstanceId: pulumi.String("string"),
Context: &nsxt.PolicyVmTagsContextArgs{
ProjectId: pulumi.String("string"),
},
PolicyVmTagsId: pulumi.String("string"),
Ports: nsxt.PolicyVmTagsPortArray{
&nsxt.PolicyVmTagsPortArgs{
SegmentPath: pulumi.String("string"),
Tags: nsxt.PolicyVmTagsPortTagArray{
&nsxt.PolicyVmTagsPortTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
},
},
Tags: nsxt.PolicyVmTagsTagArray{
&nsxt.PolicyVmTagsTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
var policyVmTagsResource = new PolicyVmTags("policyVmTagsResource", PolicyVmTagsArgs.builder()
.instanceId("string")
.context(PolicyVmTagsContextArgs.builder()
.projectId("string")
.build())
.policyVmTagsId("string")
.ports(PolicyVmTagsPortArgs.builder()
.segmentPath("string")
.tags(PolicyVmTagsPortTagArgs.builder()
.scope("string")
.tag("string")
.build())
.build())
.tags(PolicyVmTagsTagArgs.builder()
.scope("string")
.tag("string")
.build())
.build());
policy_vm_tags_resource = nsxt.PolicyVmTags("policyVmTagsResource",
instance_id="string",
context={
"project_id": "string",
},
policy_vm_tags_id="string",
ports=[{
"segment_path": "string",
"tags": [{
"scope": "string",
"tag": "string",
}],
}],
tags=[{
"scope": "string",
"tag": "string",
}])
const policyVmTagsResource = new nsxt.PolicyVmTags("policyVmTagsResource", {
instanceId: "string",
context: {
projectId: "string",
},
policyVmTagsId: "string",
ports: [{
segmentPath: "string",
tags: [{
scope: "string",
tag: "string",
}],
}],
tags: [{
scope: "string",
tag: "string",
}],
});
type: nsxt:PolicyVmTags
properties:
context:
projectId: string
instanceId: string
policyVmTagsId: string
ports:
- segmentPath: string
tags:
- scope: string
tag: string
tags:
- scope: string
tag: string
PolicyVmTags 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 PolicyVmTags resource accepts the following input properties:
- Instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- Context
Policy
Vm Tags Context - The context which the object belongs to
- string
- Ports
List<Policy
Vm Tags Port> - Option to tag segment port auto-created for the VM on specified segment.
- List<Policy
Vm Tags Tag> - A list of scope + tag pairs to associate with this Virtual Machine.
- Instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- Context
Policy
Vm Tags Context Args - The context which the object belongs to
- string
- Ports
[]Policy
Vm Tags Port Args - Option to tag segment port auto-created for the VM on specified segment.
- []Policy
Vm Tags Tag Args - A list of scope + tag pairs to associate with this Virtual Machine.
- instance
Id String - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- context
Policy
Vm Tags Context - The context which the object belongs to
- String
- ports
List<Policy
Vm Tags Port> - Option to tag segment port auto-created for the VM on specified segment.
- List<Policy
Vm Tags Tag> - A list of scope + tag pairs to associate with this Virtual Machine.
- instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- context
Policy
Vm Tags Context - The context which the object belongs to
- string
- ports
Policy
Vm Tags Port[] - Option to tag segment port auto-created for the VM on specified segment.
- Policy
Vm Tags Tag[] - A list of scope + tag pairs to associate with this Virtual Machine.
- instance_
id str - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- context
Policy
Vm Tags Context Args - The context which the object belongs to
- str
- ports
Sequence[Policy
Vm Tags Port Args] - Option to tag segment port auto-created for the VM on specified segment.
- Sequence[Policy
Vm Tags Tag Args] - A list of scope + tag pairs to associate with this Virtual Machine.
- instance
Id String - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- context Property Map
- The context which the object belongs to
- String
- ports List<Property Map>
- Option to tag segment port auto-created for the VM on specified segment.
- List<Property Map>
- A list of scope + tag pairs to associate with this Virtual Machine.
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicyVmTags resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PolicyVmTags Resource
Get an existing PolicyVmTags 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?: PolicyVmTagsState, opts?: CustomResourceOptions): PolicyVmTags
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
context: Optional[PolicyVmTagsContextArgs] = None,
instance_id: Optional[str] = None,
policy_vm_tags_id: Optional[str] = None,
ports: Optional[Sequence[PolicyVmTagsPortArgs]] = None,
tags: Optional[Sequence[PolicyVmTagsTagArgs]] = None) -> PolicyVmTags
func GetPolicyVmTags(ctx *Context, name string, id IDInput, state *PolicyVmTagsState, opts ...ResourceOption) (*PolicyVmTags, error)
public static PolicyVmTags Get(string name, Input<string> id, PolicyVmTagsState? state, CustomResourceOptions? opts = null)
public static PolicyVmTags get(String name, Output<String> id, PolicyVmTagsState state, CustomResourceOptions options)
resources: _: type: nsxt:PolicyVmTags 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.
- Context
Policy
Vm Tags Context - The context which the object belongs to
- Instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- string
- Ports
List<Policy
Vm Tags Port> - Option to tag segment port auto-created for the VM on specified segment.
- List<Policy
Vm Tags Tag> - A list of scope + tag pairs to associate with this Virtual Machine.
- Context
Policy
Vm Tags Context Args - The context which the object belongs to
- Instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- string
- Ports
[]Policy
Vm Tags Port Args - Option to tag segment port auto-created for the VM on specified segment.
- []Policy
Vm Tags Tag Args - A list of scope + tag pairs to associate with this Virtual Machine.
- context
Policy
Vm Tags Context - The context which the object belongs to
- instance
Id String - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- String
- ports
List<Policy
Vm Tags Port> - Option to tag segment port auto-created for the VM on specified segment.
- List<Policy
Vm Tags Tag> - A list of scope + tag pairs to associate with this Virtual Machine.
- context
Policy
Vm Tags Context - The context which the object belongs to
- instance
Id string - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- string
- ports
Policy
Vm Tags Port[] - Option to tag segment port auto-created for the VM on specified segment.
- Policy
Vm Tags Tag[] - A list of scope + tag pairs to associate with this Virtual Machine.
- context
Policy
Vm Tags Context Args - The context which the object belongs to
- instance_
id str - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- str
- ports
Sequence[Policy
Vm Tags Port Args] - Option to tag segment port auto-created for the VM on specified segment.
- Sequence[Policy
Vm Tags Tag Args] - A list of scope + tag pairs to associate with this Virtual Machine.
- context Property Map
- The context which the object belongs to
- instance
Id String - ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
- String
- ports List<Property Map>
- Option to tag segment port auto-created for the VM on specified segment.
- List<Property Map>
- A list of scope + tag pairs to associate with this Virtual Machine.
Supporting Types
PolicyVmTagsContext, PolicyVmTagsContextArgs
- Project
Id string - The ID of the project which the object belongs to
- Project
Id string - The ID of the project which the object belongs to
- project
Id String - The ID of the project which the object belongs to
- project
Id string - The ID of the project which the object belongs to
- project_
id str - The ID of the project which the object belongs to
- project
Id String - The ID of the project which the object belongs to
PolicyVmTagsPort, PolicyVmTagsPortArgs
- Segment
Path string - Segment where the port is to be tagged.
- List<Policy
Vm Tags Port Tag> - A list of scope + tag pairs to associate with this segment port.
- Segment
Path string - Segment where the port is to be tagged.
- []Policy
Vm Tags Port Tag - A list of scope + tag pairs to associate with this segment port.
- segment
Path String - Segment where the port is to be tagged.
- List<Policy
Vm Tags Port Tag> - A list of scope + tag pairs to associate with this segment port.
- segment
Path string - Segment where the port is to be tagged.
- Policy
Vm Tags Port Tag[] - A list of scope + tag pairs to associate with this segment port.
- segment_
path str - Segment where the port is to be tagged.
- Sequence[Policy
Vm Tags Port Tag] - A list of scope + tag pairs to associate with this segment port.
- segment
Path String - Segment where the port is to be tagged.
- List<Property Map>
- A list of scope + tag pairs to associate with this segment port.
PolicyVmTagsPortTag, PolicyVmTagsPortTagArgs
PolicyVmTagsTag, PolicyVmTagsTagArgs
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.