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.
Parameters:
-
id
(Id)
–
The unique identifier or name of the OpenSearch application.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def describe_data_source_attachment(
self,
id: "capo_opensearch.types.id.Id",
data_source_arn: "capo_opensearch.types.arn.ARN",
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
) -> "capo_opensearch.types.describe_data_source_attachment_response.DescribeDataSourceAttachmentResponse":
"""<p>Returns the current status and details of a specific data source attachment for an OpenSearch application. Throws a <code>ResourceNotFoundException</code> if no attachment record exists for the specified application and data source combination.</p>
Args:
id: <p>The unique identifier or name of the OpenSearch application.</p>
Raises:
capo_opensearch.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because you don't have permissions to access the resource.</p>
capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_opensearch.types.describe_data_source_attachment_request.DescribeDataSourceAttachmentRequest]",
) -> OperationResponse[
"capo_opensearch.types.describe_data_source_attachment_response.DescribeDataSourceAttachmentResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.describe_data_source_attachment
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.describe_data_source_attachment.describe_data_source_attachment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeDataSourceAttachment")
)
input_: capo_opensearch.types.describe_data_source_attachment_request.DescribeDataSourceAttachmentRequest = {
"id": id,
"data_source_arn": data_source_arn,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|