Amazon OpenSearch Service

2026/06/19 - Amazon OpenSearch Service - 4 new api methods

Changes  This release introduces data source attachment APIs, enabling users to attach and detach Amazon OpenSearch Service domains and Amazon OpenSearch Serverless collections to an OpenSearch application.

DescribeDataSourceAttachment (new) Link ¶

Returns the current status and details of a specific data source attachment for an OpenSearch application. Throws a ResourceNotFoundException if no attachment record exists for the specified application and data source combination.

See also: AWS API Documentation

Request Syntax

client.describe_data_source_attachment(
    id='string',
    dataSourceArn='string'
)
type id:

string

param id:

[REQUIRED]

The unique identifier or name of the OpenSearch application.

type dataSourceArn:

string

param 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.

rtype:

dict

returns:

Response Syntax

{
    'attachmentId': 'string',
    'id': 'string',
    'arn': 'string',
    'dataSourceArn': 'string',
    'status': 'PENDING'|'ATTACHED'|'FAILED'
}

Response Structure

  • (dict) --

    • attachmentId (string) --

      The unique identifier assigned to the data source attachment.

    • id (string) --

      The unique identifier of the OpenSearch application.

    • arn (string) --

      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.

    • dataSourceArn (string) --

      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.

    • status (string) --

      The status of the data source attachment. Valid values are PENDING, ATTACHED, and FAILED.

ListDataSourceAttachments (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_data_source_attachments(
    id='string',
    nextToken='string',
    maxResults=123
)
type id:

string

param id:

[REQUIRED]

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

type nextToken:

string

param nextToken:

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

type maxResults:

integer

param maxResults:

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

rtype:

dict

returns:

Response Syntax

{
    'attachments': [
        {
            'attachmentId': 'string',
            'dataSourceArn': 'string',
            'status': 'PENDING'|'ATTACHED'|'FAILED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • attachments (list) --

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

      • (dict) --

        Summary information about a data source attachment, including its identifier, data source ARN, and current status.

        • attachmentId (string) --

          The unique identifier assigned to the data source attachment.

        • dataSourceArn (string) --

          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.

        • status (string) --

          The current status of the data source attachment. Valid values are PENDING, ATTACHED, and FAILED.

    • nextToken (string) --

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

DetachDataSource (new) Link ¶

Removes a data source from an OpenSearch application. The application must be in the ACTIVE state. This operation removes the data source saved object from the application and deletes the attachment record. Throws a ConflictException if the specified data source has a PENDING attachment, and a ResourceNotFoundException if the data source is not currently attached to the application.

See also: AWS API Documentation

Request Syntax

client.detach_data_source(
    id='string',
    dataSourceArn='string'
)
type id:

string

param id:

[REQUIRED]

The unique identifier or name of the OpenSearch application to detach the data source from.

type dataSourceArn:

string

param 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.

rtype:

dict

returns:

Response Syntax

{
    'id': 'string',
    'arn': 'string',
    'dataSourceArn': 'string'
}

Response Structure

  • (dict) --

    • id (string) --

      The unique identifier of the OpenSearch application.

    • arn (string) --

      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.

    • dataSourceArn (string) --

      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.

AttachDataSource (new) Link ¶

Attaches a data source to an OpenSearch application. The data source can be an Amazon OpenSearch Service domain or an Amazon OpenSearch Serverless collection. If both the application and data source are in the ACTIVE state, the attachment completes immediately and returns a status of ATTACHED. If either resource is not yet active, the operation stores the request and returns a status of PENDING. A background process then completes the attachment when both resources become active. Pending attachments that are not completed within 24 hours are marked as FAILED. This operation is idempotent. If a data source is already attached or pending for the same application, the existing attachment is returned.

See also: AWS API Documentation

Request Syntax

client.attach_data_source(
    id='string',
    dataSourceArn='string',
    workspaceId='string',
    workspaceConfiguration={
        'name': 'string',
        'workspaceType': 'string'
    },
    clientToken='string'
)
type id:

string

param id:

[REQUIRED]

The unique identifier or name of the OpenSearch application to attach the data source to. This is the same identifier used with UpdateApplication, GetApplication, and DeleteApplication.

type dataSourceArn:

string

param 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.

type workspaceId:

string

param workspaceId:

The identifier of an existing workspace to update with the new data source. Mutually exclusive with workspaceConfiguration.

type workspaceConfiguration:

dict

param 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.

  • name (string) -- [REQUIRED]

    The name of the workspace to create. Must be between 1 and 40 characters and can contain alphanumeric characters, parentheses, brackets, hyphens, underscores, and spaces.

  • workspaceType (string) -- [REQUIRED]

    The type of workspace to create, which determines the use-case features enabled for the workspace. Valid values are OBSERVABILITY, SECURITY_ANALYTICS, and SEARCH.

type clientToken:

string

param 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.

rtype:

dict

returns:

Response Syntax

{
    'attachmentId': 'string',
    'id': 'string',
    'arn': 'string',
    'dataSourceArn': 'string',
    'status': 'PENDING'|'ATTACHED'|'FAILED'
}

Response Structure

  • (dict) --

    • attachmentId (string) --

      The unique identifier assigned to the data source attachment.

    • id (string) --

      The unique identifier of the OpenSearch application.

    • arn (string) --

      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.

    • dataSourceArn (string) --

      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.

    • status (string) --

      The status of the data source attachment. Valid values are PENDING (waiting for resources to become active), ATTACHED (successfully attached), and FAILED (attachment timed out or encountered a non-retryable error).