list_tags_for_resource

SSOAdmin.Client.list_tags_for_resource(**kwargs)

Lists the tags that are attached to a specified resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    InstanceArn='string',
    ResourceArn='string',
    NextToken='string'
)
Parameters
  • InstanceArn (string) --

    [REQUIRED]

    The ARN of the IAM Identity Center instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

  • ResourceArn (string) --

    [REQUIRED]

    The ARN of the resource with the tags to be listed.

  • NextToken (string) -- The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • Tags (list) --

      A set of key-value pairs that are used to manage the resource.

      • (dict) --

        A set of key-value pairs that are used to manage the resource. Tags can only be applied to permission sets and cannot be applied to corresponding roles that IAM Identity Center creates in AWS accounts.

        • Key (string) --

          The key for the tag.

        • Value (string) --

          The value of the tag.

    • NextToken (string) --

      The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Exceptions

  • SSOAdmin.Client.exceptions.ResourceNotFoundException
  • SSOAdmin.Client.exceptions.InternalServerException
  • SSOAdmin.Client.exceptions.ThrottlingException
  • SSOAdmin.Client.exceptions.ValidationException
  • SSOAdmin.Client.exceptions.AccessDeniedException