NetworkFirewall / Client / list_tags_for_resource

list_tags_for_resource#

NetworkFirewall.Client.list_tags_for_resource(**kwargs)#

Retrieves the tags associated with the specified resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to “customer” and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.

You can tag the Amazon Web Services resources that you manage through Network Firewall: firewalls, firewall policies, and rule groups.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    NextToken='string',
    MaxResults=123,
    ResourceArn='string'
)
Parameters:
  • NextToken (string) – When you request a list of objects with a MaxResults setting, if the number of objects that are still available for retrieval exceeds the maximum you requested, Network Firewall returns a NextToken value in the response. To retrieve the next batch of objects, use the token returned from the prior request in your next request.

  • MaxResults (integer) – The maximum number of objects that you want Network Firewall to return for this request. If more objects are available, in the response, Network Firewall provides a NextToken value that you can use in a subsequent call to get the next batch of objects.

  • ResourceArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • NextToken (string) –

      When you request a list of objects with a MaxResults setting, if the number of objects that are still available for retrieval exceeds the maximum you requested, Network Firewall returns a NextToken value in the response. To retrieve the next batch of objects, use the token returned from the prior request in your next request.

    • Tags (list) –

      The tags that are associated with the resource.

      • (dict) –

        A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each Amazon Web Services resource.

        • Key (string) –

          The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as “customer.” Tag keys are case-sensitive.

        • Value (string) –

          The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as “companyA” or “companyB.” Tag values are case-sensitive.

Exceptions