Attaches a data source to an OpenSearch application¶
Description¶
Attaches a data source to an OpenSearch application. The data source must be an Amazon OpenSearch Service domain. If both the application and the data source are active, the attachment completes immediately with a status of ATTACHED. Otherwise, the operation returns PENDING and completes the attachment automatically once both become active. If the attachment cannot be completed, its status becomes FAILED. This operation is idempotent: If the data source is already attached or pending, the operation returns the existing attachment.
Usage¶
opensearchservice_attach_data_source(id, dataSourceArn, workspaceId,
workspaceConfiguration, clientToken)
Arguments¶
id
[required] The unique identifier or name of the OpenSearch application to attach the data source to. This is the same identifier used with update_application, get_application, and delete_application.
dataSourceArn
[required] The Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities in Using Amazon Web Services Identity and Access Management for more information.
workspaceId
The identifier of an existing workspace to update with the new data source. Mutually exclusive with workspaceConfiguration.
workspaceConfiguration
Configuration for creating a new workspace during the attachment. If specified, a workspace is created and linked to the data source after the attachment completes. Mutually exclusive with workspaceId.
clientToken
A unique, case-sensitive identifier to ensure idempotency of the request. If you retry a request with the same client token and the same parameters, the retry succeeds without performing any further actions.
Value¶
A list with the following syntax:
list(
attachmentId = "string",
id = "string",
arn = "string",
dataSourceArn = "string",
status = "PENDING"|"ATTACHED"|"FAILED"
)