1. Packages
  2. Nsxt Provider
  3. API Docs
  4. PolicyVmTags
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

nsxt.PolicyVmTags

Explore with Pulumi AI

nsxt logo
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

    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:

    InstanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    Context PolicyVmTagsContext
    The context which the object belongs to
    PolicyVmTagsId string
    Ports List<PolicyVmTagsPort>
    Option to tag segment port auto-created for the VM on specified segment.
    Tags List<PolicyVmTagsTag>
    A list of scope + tag pairs to associate with this Virtual Machine.
    InstanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    Context PolicyVmTagsContextArgs
    The context which the object belongs to
    PolicyVmTagsId string
    Ports []PolicyVmTagsPortArgs
    Option to tag segment port auto-created for the VM on specified segment.
    Tags []PolicyVmTagsTagArgs
    A list of scope + tag pairs to associate with this Virtual Machine.
    instanceId String
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    context PolicyVmTagsContext
    The context which the object belongs to
    policyVmTagsId String
    ports List<PolicyVmTagsPort>
    Option to tag segment port auto-created for the VM on specified segment.
    tags List<PolicyVmTagsTag>
    A list of scope + tag pairs to associate with this Virtual Machine.
    instanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    context PolicyVmTagsContext
    The context which the object belongs to
    policyVmTagsId string
    ports PolicyVmTagsPort[]
    Option to tag segment port auto-created for the VM on specified segment.
    tags PolicyVmTagsTag[]
    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 PolicyVmTagsContextArgs
    The context which the object belongs to
    policy_vm_tags_id str
    ports Sequence[PolicyVmTagsPortArgs]
    Option to tag segment port auto-created for the VM on specified segment.
    tags Sequence[PolicyVmTagsTagArgs]
    A list of scope + tag pairs to associate with this Virtual Machine.
    instanceId String
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    context Property Map
    The context which the object belongs to
    policyVmTagsId String
    ports List<Property Map>
    Option to tag segment port auto-created for the VM on specified segment.
    tags 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.
    The following state arguments are supported:
    Context PolicyVmTagsContext
    The context which the object belongs to
    InstanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    PolicyVmTagsId string
    Ports List<PolicyVmTagsPort>
    Option to tag segment port auto-created for the VM on specified segment.
    Tags List<PolicyVmTagsTag>
    A list of scope + tag pairs to associate with this Virtual Machine.
    Context PolicyVmTagsContextArgs
    The context which the object belongs to
    InstanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    PolicyVmTagsId string
    Ports []PolicyVmTagsPortArgs
    Option to tag segment port auto-created for the VM on specified segment.
    Tags []PolicyVmTagsTagArgs
    A list of scope + tag pairs to associate with this Virtual Machine.
    context PolicyVmTagsContext
    The context which the object belongs to
    instanceId String
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    policyVmTagsId String
    ports List<PolicyVmTagsPort>
    Option to tag segment port auto-created for the VM on specified segment.
    tags List<PolicyVmTagsTag>
    A list of scope + tag pairs to associate with this Virtual Machine.
    context PolicyVmTagsContext
    The context which the object belongs to
    instanceId string
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    policyVmTagsId string
    ports PolicyVmTagsPort[]
    Option to tag segment port auto-created for the VM on specified segment.
    tags PolicyVmTagsTag[]
    A list of scope + tag pairs to associate with this Virtual Machine.
    context PolicyVmTagsContextArgs
    The context which the object belongs to
    instance_id str
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    policy_vm_tags_id str
    ports Sequence[PolicyVmTagsPortArgs]
    Option to tag segment port auto-created for the VM on specified segment.
    tags Sequence[PolicyVmTagsTagArgs]
    A list of scope + tag pairs to associate with this Virtual Machine.
    context Property Map
    The context which the object belongs to
    instanceId String
    ID of the Virtual Machine. Can be the instance UUID or BIOS UUID.
    policyVmTagsId String
    ports List<Property Map>
    Option to tag segment port auto-created for the VM on specified segment.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this Virtual Machine.

    Supporting Types

    PolicyVmTagsContext, PolicyVmTagsContextArgs

    ProjectId string
    The ID of the project which the object belongs to
    ProjectId string
    The ID of the project which the object belongs to
    projectId String
    The ID of the project which the object belongs to
    projectId string
    The ID of the project which the object belongs to
    project_id str
    The ID of the project which the object belongs to
    projectId String
    The ID of the project which the object belongs to

    PolicyVmTagsPort, PolicyVmTagsPortArgs

    SegmentPath string
    Segment where the port is to be tagged.
    Tags List<PolicyVmTagsPortTag>
    A list of scope + tag pairs to associate with this segment port.
    SegmentPath string
    Segment where the port is to be tagged.
    Tags []PolicyVmTagsPortTag
    A list of scope + tag pairs to associate with this segment port.
    segmentPath String
    Segment where the port is to be tagged.
    tags List<PolicyVmTagsPortTag>
    A list of scope + tag pairs to associate with this segment port.
    segmentPath string
    Segment where the port is to be tagged.
    tags PolicyVmTagsPortTag[]
    A list of scope + tag pairs to associate with this segment port.
    segment_path str
    Segment where the port is to be tagged.
    tags Sequence[PolicyVmTagsPortTag]
    A list of scope + tag pairs to associate with this segment port.
    segmentPath String
    Segment where the port is to be tagged.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this segment port.

    PolicyVmTagsPortTag, PolicyVmTagsPortTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope String
    tag String
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope string
    tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope str
    tag str
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope String
    tag String
    A list of scope + tag pairs to associate with this Virtual Machine.

    PolicyVmTagsTag, PolicyVmTagsTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope String
    tag String
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope string
    tag string
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope str
    tag str
    A list of scope + tag pairs to associate with this Virtual Machine.
    scope String
    tag String
    A list of scope + tag pairs to associate with this Virtual Machine.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware