Tags a contact or escalation plan. You can tag only contacts and escalation plans in the first region of your replication set.
Parameters:
-
resource_arn
(AmazonResourceName)
–
The Amazon Resource Name (ARN) of the contact or escalation plan.
-
tags
(TagsList)
–
A list of tags that you are adding to the contact or escalation plan.
Raises:
Source code in docs_src/capo_ssm_contacts/_services/ssm_contacts.py
| def tag_resource(
self,
resource_arn: "capo_ssm_contacts.types.amazon_resource_name.AmazonResourceName",
tags: "capo_ssm_contacts.types.tags_list.TagsList",
*,
config_overrides: Optional[SSMContactsClientConfig] = None,
) -> "capo_ssm_contacts.types.tag_resource_result.TagResourceResult":
"""<p>Tags a contact or escalation plan. You can tag only contacts and escalation plans in the first region of your replication set.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the contact or escalation plan.</p>
tags: <p>A list of tags that you are adding to the contact or escalation plan.</p>
Raises:
capo_ssm_contacts.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
capo_ssm_contacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred while processing the request.</p>
capo_ssm_contacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
capo_ssm_contacts.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
capo_ssm_contacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_ssm_contacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_ssm_contacts.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ssm_contacts.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_ssm_contacts.types.tag_resource_result.TagResourceResult"
]:
import capo_ssm_contacts._operations.ssm_contacts.tag_resource
output, http_response = (
capo_ssm_contacts._operations.ssm_contacts.tag_resource.tag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("TagResource")
)
input_: capo_ssm_contacts.types.tag_resource_request.TagResourceRequest = {
"resource_arn": resource_arn,
"tags": tags,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|