Getting Information About Tags Associated with a Resource

You can get information about tags associated with a resource.

In the case of a virtual machine (VM), you can also get information about associated tags from within the VM itself. For more information, see Accessing the Metadata and User Data of a VM.

Getting Information About Your Tags Using Cockpit v2

  1. Click inside the dashboard of the resource whose tags you want to get information about to make checkboxes appear.

  2. Check the box of the resource whose tags you want to get information about.
    The resource is selected and an action menu appears.

  3. Click IconTag Edit Tags.
    The EDIT TAGS dialog box appears with all the tags associated with the selected resource.

Getting Information About Your Tags Using Cockpit v1

  1. Click the page corresponding to the type of the resource you want tag information about.

  2. Select the resource you want to get information about.
    The resource is selected.

  3. Click Tags.
    A dialog box with all the tags associated with the selected resource appears.

    You can hover over the selected resource to make all its associated tags appear.

Getting Information About Your Tags Using OSC CLI

See the ReadTags command sample in the documentation of the OUTSCALE API.

Getting Information About Your Tags Using AWS CLI

To get information about tags associated with your resources, use the describe-tags command following this syntax:

Request sample
$ aws ec2 describe-tags \
    --profile YOUR_PROFILE \
    --filters Name=resource-id,Values=i-12345678 \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) filters: One or more filters, in the "Name=X,Values=Y" format.

    You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.

    The following filters are available:

    • key: The key of the tags.

    • resource-id: The ID of the resource.

    • resource-type: The resource type (instance | image | volume | snapshot | public-ip | security-group | route-table | network-interface | vpc | subnet | network-link | vpc-endpoint | nat-gateway | internet-gateway | customer-gateway | vpn-gateway | vpn-connection | dhcp-options | task).

    • value: The value of the tags.

      If you use this filter and set it to an empty string, you get information about all your tags with a value set to an empty string.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-tags command returns the following elements:

  • Tags: The tags associated to the resources.

    • ResourceType: The resource type.

    • ResourceId: The ID of the resource.

    • Value: The value of the tags.

    • Key: The key of the tags.

Result sample
{
    "Tags": [
        {
            "ResourceType": "instance",
            "ResourceId": "i-12345678",
            "Value": "Production",
            "Key": "Stack"
        },
        {
            "ResourceType": "instance",
            "ResourceId": "i-12345678",
            "Value": "Beta Server",
            "Key": "Name"
        }
    ]
}

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.