add_tags(
arn: ARN,
tag_list: TagList,
*,
config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> None
Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive key value pairs. An Elasticsearch domain may have up to 10 tags. See Tagging Amazon Elasticsearch Service Domains for more information.
Parameters:
-
arn
(ARN)
–
Specify the ARN for which you want to add the tags.
-
tag_list
(TagList)
–
List of Tag that need to be added for the Elasticsearch domain.
Raises:
-
BaseException
–
An error occurred while processing the request.
-
InternalException
–
The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.
-
LimitExceededException
–
An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.
-
ValidationException
–
An exception for missing / invalid input fields. Gives http status code of 400.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elasticsearch_service/_services/async_elasticsearch_service.py
| async def add_tags(
self,
arn: "capo_elasticsearch_service.types.arn.ARN",
tag_list: "capo_elasticsearch_service.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> None:
"""<p>Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive key value pairs. An Elasticsearch domain may have up to 10 tags. See <a href="http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-awsresorcetagging" target="_blank"> Tagging Amazon Elasticsearch Service Domains for more information.</a></p>
Args:
arn: <p> Specify the <code>ARN</code> for which you want to add the tags.</p>
tag_list: <p> List of <code>Tag</code> that need to be added for the Elasticsearch domain. </p>
Raises:
capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
capo_elasticsearch_service.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.</p>
capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elasticsearch_service.types.add_tags_request.AddTagsRequest]",
) -> AsyncOperationResponse[None]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.add_tags
(
output,
http_response,
) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.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_elasticsearch_service.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
|