RedshiftServerless / Client / list_role_associations

list_role_associations

RedshiftServerless.Client.list_role_associations(**kwargs)

Returns the role associations on Amazon Redshift Serverless with express configuration, grouped by role type. The response isn’t paginated: it contains at most five role types with up to 10 principals each.

See also: AWS API Documentation

Request Syntax

response = client.list_role_associations(
    targetArn='string',
    roleType='string'
)
Parameters:
  • targetArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the default endpoint. Only express-default is supported, and it must be in the same Amazon Web Services account as the caller. The ARN format is arn:aws-partition:redshift-serverless:region:account-id:workgroup/express/express-default, for example arn:aws:redshift-serverless:us-east-1:111122223333:workgroup/express/express-default.

  • roleType (string) – The case-sensitive system-defined role to list principals for. Valid values are sys:superuser, sys:operator, sys:dba, sys:secadmin, and sys:monitor. When omitted, returns all existing role associations for the target, grouped by role type.

Return type:

dict

Returns:

Response Syntax

{
    'targetArn': 'string',
    'roleAssociations': [
        {
            'roleType': 'string',
            'principals': [
                {
                    'iam': {
                        'arn': 'string',
                        'resolvedUniqueId': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • targetArn (string) –

      The Amazon Resource Name (ARN) of the default endpoint.

    • roleAssociations (list) –

      The existing role associations, grouped by role type. The list is empty when no associations match the request.

      • (dict) –

        A system-defined role and the principals associated with it.

        • roleType (string) –

          The system-defined role.

        • principals (list) –

          The principals associated with the role type.

          • (dict) –

            An identity principal returned in a role association.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: iam. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            
            • iam (dict) –

              An IAM role or IAM user.

              • arn (string) –

                The ARN of the IAM role or IAM user.

              • resolvedUniqueId (string) –

                The unique ID that IAM assigned to the principal. Amazon Redshift looks up this ID from the principal ARN when it creates the association. Role IDs begin with AROA, and user IDs begin with AIDA. The association is tied to this ID. A deleted and recreated IAM principal with the same ARN doesn’t inherit the previous principal’s association. The response omits this field when an idempotent DeleteRoleAssociation request finds no existing association.

Exceptions