Tag an Amazon Bedrock Data Automation resource
Raises:
Source code in docs_src/capo_bedrock_data_automation_runtime/_services/bedrock_data_automation_runtime.py
| def tag_resource(
self,
resource_arn: "capo_bedrock_data_automation_runtime.types.taggable_resource_arn.TaggableResourceArn",
tags: "capo_bedrock_data_automation_runtime.types.tag_list.TagList",
*,
config_overrides: Optional[BedrockDataAutomationRuntimeClientConfig] = None,
) -> "capo_bedrock_data_automation_runtime.types.tag_resource_response.TagResourceResponse":
"""Tag an Amazon Bedrock Data Automation resource
Raises:
capo_bedrock_data_automation_runtime.errors.access_denied_exception.AccessDeniedException: This exception will be thrown when customer does not have access to API.
capo_bedrock_data_automation_runtime.errors.internal_server_exception.InternalServerException: This exception is for any internal un-expected service errors.
capo_bedrock_data_automation_runtime.errors.resource_not_found_exception.ResourceNotFoundException: This exception will be thrown when resource provided from customer not found.
capo_bedrock_data_automation_runtime.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: This exception will be thrown when service quota is exceeded.
capo_bedrock_data_automation_runtime.errors.throttling_exception.ThrottlingException: This exception will be thrown when customer reached API TPS limit.
capo_bedrock_data_automation_runtime.errors.validation_exception.ValidationException: This exception will be thrown when customer provided invalid parameters.
capo_bedrock_data_automation_runtime.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_bedrock_data_automation_runtime.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_bedrock_data_automation_runtime.types.tag_resource_response.TagResourceResponse"
]:
import capo_bedrock_data_automation_runtime._operations.amazon_bedrock_keystone_runtime_service.tag_resource
output, http_response = (
capo_bedrock_data_automation_runtime._operations.amazon_bedrock_keystone_runtime_service.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_bedrock_data_automation_runtime.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
|