ListSourceAssociations - AWS RAM

ListSourceAssociations

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.

Request Syntax

POST /listsourceassociations HTTP/1.1 Content-type: application/json { "associationStatus": "string", "maxResults": number, "nextToken": "string", "resourceShareArns": [ "string" ], "sourceId": "string", "sourceType": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

associationStatus

The status of the source associations that you want to retrieve.

Type: String

Valid Values: ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED | SUSPENDED | SUSPENDING | RESTORING

Required: No

maxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 500.

Required: No

nextToken

The pagination token that indicates the next set of results to retrieve.

Type: String

Required: No

resourceShareArns

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

Type: Array of strings

Required: No

sourceId

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.

Type: String

Required: No

sourceType

The type of source for which you want to retrieve associations.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "sourceAssociations": [ { "creationTime": number, "lastUpdatedTime": number, "resourceShareArn": "string", "sourceId": "string", "sourceType": "string", "status": "string", "statusMessage": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken

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

Type: String

sourceAssociations

Information about the source associations.

Type: Array of AssociatedSource objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidNextTokenException

The operation failed because the specified value for NextToken isn't valid. You must specify a value you received in the NextToken response of a previous call to this operation.

HTTP Status Code: 400

InvalidParameterException

The operation failed because a parameter you specified isn't valid.

HTTP Status Code: 400

MalformedArnException

The operation failed because the specified Amazon Resource Name (ARN) has a format that isn't valid.

HTTP Status Code: 400

ServerInternalException

The operation failed because the service could not respond to the request due to an internal problem. Try again later.

HTTP Status Code: 500

ServiceUnavailableException

The operation failed because the service isn't available. Try again later.

HTTP Status Code: 503

UnknownResourceException

The operation failed because a specified resource couldn't be found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: