View a markdown version of this page

ListDataSourceAttachments - Amazon OpenSearch Service

ListDataSourceAttachments

Returns a paginated list of all data source attachments for an OpenSearch application, including attachments in all states (PENDING, ATTACHED, and FAILED).

Request Syntax

POST /2021-01-01/opensearch/application/id/listDataSourceAttachments HTTP/1.1 Content-type: application/json { "maxResults": number, "nextToken": "string" }

URI Request Parameters

The request uses the following URI parameters.

id

The unique identifier or name of the OpenSearch application to list attachments for.

Pattern: [a-z0-9]{3,30}

Required: Yes

Request Body

The request accepts the following data in JSON format.

maxResults

The maximum number of results to return per page. The default is 50.

Type: Integer

Required: No

nextToken

The pagination token from a previous call to retrieve the next set of results.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "attachments": [ { "attachmentId": "string", "dataSourceArn": "string", "status": "string" } ], "nextToken": "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.

attachments

A list of data source attachment summaries for the specified application.

Type: Array of DataSourceAttachmentSummary objects

nextToken

The pagination token to use in a subsequent call to retrieve the next set of results.

Type: String

Errors

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

AccessDeniedException

An error occurred because you don't have permissions to access the resource.

HTTP Status Code: 403

DisabledOperationException

An error occured because the client wanted to access an unsupported operation.

HTTP Status Code: 409

InternalException

Request processing failed because of an unknown error, exception, or internal failure.

HTTP Status Code: 500

ResourceNotFoundException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 409

ValidationException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 400

See Also

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