OpenSearchService / Client / detach_data_source

detach_data_source

OpenSearchService.Client.detach_data_source(**kwargs)

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

response = client.detach_data_source(
    id='string',
    dataSourceArn='string'
)
Parameters:
  • id (string) –

    [REQUIRED]

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

  • dataSourceArn (string) –

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

Return type:

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.

Exceptions

  • OpenSearchService.Client.exceptions.ValidationException

  • OpenSearchService.Client.exceptions.AccessDeniedException

  • OpenSearchService.Client.exceptions.InternalException

  • OpenSearchService.Client.exceptions.ConflictException

  • OpenSearchService.Client.exceptions.ResourceNotFoundException

  • OpenSearchService.Client.exceptions.DisabledOperationException