add_tags(
arn: ARN,
tag_list: TagList,
*,
config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
) -> None
Attaches tags to an existing Amazon OpenSearch Service domain, data source, or application.
Tags are a set of case-sensitive key-value pairs. A domain, data source, or application can have up to 10 tags. For more information, see Tagging Amazon OpenSearch Service resources.
Parameters:
-
arn
(ARN)
–
Amazon Resource Name (ARN) for the OpenSearch Service domain, data source, or application to which you want to attach resource tags.
-
tag_list
(TagList)
–
Raises:
-
BaseException
–
An error occurred while processing the request.
-
InternalException
–
Request processing failed because of an unknown error, exception, or internal failure.
-
LimitExceededException
–
An exception for trying to create more than the allowed number of resources or sub-resources.
-
ValidationException
–
An exception for accessing or deleting a resource that doesn't exist.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_opensearch/_services/async_open_search.py
| async def add_tags(
self,
arn: "capo_opensearch.types.arn.ARN",
tag_list: "capo_opensearch.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
) -> None:
"""<p>Attaches tags to an existing Amazon OpenSearch Service domain, data source, or application. </p> <p>Tags are a set of case-sensitive key-value pairs. A domain, data source, or application can have up to 10 tags. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-awsresourcetagging.html">Tagging Amazon OpenSearch Service resources</a>. </p>
Args:
arn: <p>Amazon Resource Name (ARN) for the OpenSearch Service domain, data source, or application to which you want to attach resource tags.</p>
tag_list: <p>List of resource tags.</p>
Raises:
capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than the allowed number of resources or sub-resources.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_opensearch.types.add_tags_request.AddTagsRequest]",
) -> AsyncOperationResponse[None]:
import capo_opensearch._operations.amazon_open_search_service.add_tags
(
output,
http_response,
) = await capo_opensearch._operations.amazon_open_search_service.add_tags.async_add_tags(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AddTags")
)
input_: capo_opensearch.types.add_tags_request.AddTagsRequest = {
"arn": arn,
"tag_list": tag_list,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|