REST API - list

vcenter compute policies tag usage: list

Returns information about the tags used by policies available in this vCenter server matching the vcenter.compute.policies.tag_usage.filter_spec in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This operation is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Request:

HTTP request

GET https://{server}/api/vcenter/compute/policies/tag-usage

?policies={value-1}
&policies={value-2}
&tags={value-1}
&tags={value-2}
&tag_types={value-1}
&tag_types={value-2}

Query Parameters:

Name Type Description
bold = required
policies string[] Identifiers that compute policies must have to match the filter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Optional. If unset or empty, then tags used by any policy match this filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vcenter.compute.Policy. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vcenter.compute.Policy.

tags string[] Identifiers that tags must have to match the filter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Optional. If unset or empty, then tags with any tag identifier match this filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.cis.tagging.Tag. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.cis.tagging.Tag.

tag_types string[] Identifiers that tag types must have to match the filter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Optional. If unset or empty, then tags of any type match this filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vapi.resource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vapi.resource.

Response:

HTTP Status Code: 200

Response Body Structure:

[
    {
        "category_name""string",
        "tag_type""obj-103",
        "tag_name""string",
        "tag""obj-103",
        "policy""obj-103"
    },
    {
        "category_name""string",
        "tag_type""obj-103",
        "tag_name""string",
        "tag""obj-103",
        "policy""obj-103"
    }
]

Headers:

None

Type:

Name Type Description
bold = required
- summary[] The list of tags used by policies available on this vCenter server matching the vcenter.compute.policies.tag_usage.filter_spec.
-[].policy string Identifier of the policy that uses the tag indicated by vcenter.compute.policies.tag_usage.summary.tag. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.compute.Policy. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

-[].tag_type string Identifier of the tag type used by the policy indicated by vcenter.compute.policies.tag_usage.summary.policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vapi.resource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vapi.resource.

-[].tag string Identifier of the tag used by the policy indicated by vcenter.compute.policies.tag_usage.summary.policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

When clients pass a value of this structure as a parameter, the field tag_type must contain the actual resource type. When operations return a value of this structure as a result, the field tag_type will contain the actual resource type.

-[].tag_name string Name of the tag used by the policy indicated by vcenter.compute.policies.tag_usage.summary.policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

-[].category_name string Name of the category that has vcenter.compute.policies.tag_usage.summary.tag. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Errors:

HTTP Status Code Type Description
403 unauthorized if the user doesn't have the required privileges, or when used beyond VMware Cloud on AWS.