RAM / Client / list_source_associations

list_source_associations

RAM.Client.list_source_associations(**kwargs)

Lists source associations for resource shares. Source associations control which sources can be used with service principals in resource shares. This operation provides visibility into source associations for resource share owners.

You can filter the results by resource share Amazon Resource Name (ARN), source ID, source type, or association status. We recommend using pagination to ensure that the operation returns quickly and successfully.

See also: AWS API Documentation

Request Syntax

response = client.list_source_associations(
    resourceShareArns=[
        'string',
    ],
    sourceId='string',
    sourceType='string',
    associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'SUSPENDED'|'SUSPENDING'|'RESTORING',
    nextToken='string',
    maxResults=123
)
Parameters:
  • resourceShareArns (list) –

    The Amazon Resource Names (ARNs) of the resource shares for which you want to retrieve source associations.

    • (string) –

  • sourceId (string) – The identifier of the source for which you want to retrieve associations. This can be an account ID, Amazon Resource Name (ARN), organization ID, or organization path.

  • sourceType (string) – The type of source for which you want to retrieve associations.

  • associationStatus (string) – The status of the source associations that you want to retrieve.

  • nextToken (string) – The pagination token that indicates the next set of results to retrieve.

  • maxResults (integer) – The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Return type:

dict

Returns:

Response Syntax

{
    'sourceAssociations': [
        {
            'resourceShareArn': 'string',
            'sourceId': 'string',
            'sourceType': 'string',
            'status': 'string',
            'lastUpdatedTime': datetime(2015, 1, 1),
            'creationTime': datetime(2015, 1, 1),
            'statusMessage': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • sourceAssociations (list) –

      Information about the source associations.

      • (dict) –

        Information about a source association in a resource share. Source associations control which sources can be used with service principals.

        • resourceShareArn (string) –

          The Amazon Resource Name (ARN) of the resource share that contains the source association.

        • sourceId (string) –

          The identifier of the source. This can be an account ID, Amazon Resource Name (ARN), organization ID, or organization path.

        • sourceType (string) –

          The type of source.

        • status (string) –

          The current status of the source association.

        • lastUpdatedTime (datetime) –

          The date and time when the source association was last updated.

        • creationTime (datetime) –

          The date and time when the source association was created.

        • statusMessage (string) –

          A message about the status of the source association.

    • nextToken (string) –

      The pagination token to use to retrieve the next page of results. This value is null when there are no more results to return.

Exceptions

  • RAM.Client.exceptions.UnknownResourceException

  • RAM.Client.exceptions.MalformedArnException

  • RAM.Client.exceptions.InvalidNextTokenException

  • RAM.Client.exceptions.InvalidParameterException

  • RAM.Client.exceptions.ServerInternalException

  • RAM.Client.exceptions.ServiceUnavailableException