The resource to tag. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
Parameters:
-
resource_arn
(__string)
–
The Amazon Resource Name (ARN) associated with the resource.
-
tags
(__mapOf__string)
–
The tags to assign to the resource. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.
Raises:
Source code in docs_src/capo_mediatailor/_services/media_tailor.py
| def tag_resource(
self,
resource_arn: "capo_mediatailor.types.__string.__string",
tags: "capo_mediatailor.types.__map_of__string.__mapOf__string",
*,
config_overrides: Optional[MediaTailorClientConfig] = None,
) -> None:
"""<p>The resource to tag. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/tagging.html">Tagging AWS Elemental MediaTailor Resources</a>.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) associated with the resource.</p>
tags: <p>The tags to assign to the resource. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/tagging.html">Tagging AWS Elemental MediaTailor Resources</a>.</p>
Raises:
capo_mediatailor.errors.bad_request_exception.BadRequestException: <p>A request contains unexpected data.</p>
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediatailor.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[None]:
import capo_mediatailor._operations.media_tailor.tag_resource
output, http_response = (
capo_mediatailor._operations.media_tailor.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_mediatailor.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
|