Deletes the tags for a resource.
Parameters:
-
resource_arn
(ResourceArn)
–
The Amazon Resource Name (ARN) of the resource from which you want to remove tags.
-
tag_keys
(TagKeyList)
–
One or more tag keys. Specify only the tag keys, not the tag values.
Raises:
Source code in docs_src/capo_migrationhuborchestrator/_services/migration_hub_orchestrator.py
| def untag_resource(
self,
resource_arn: "capo_migrationhuborchestrator.types.resource_arn.ResourceArn",
tag_keys: "capo_migrationhuborchestrator.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[MigrationHubOrchestratorClientConfig] = None,
) -> "capo_migrationhuborchestrator.types.untag_resource_response.UntagResourceResponse":
"""<p>Deletes the tags for a resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource from which you want to remove tags.</p>
tag_keys: <p>One or more tag keys. Specify only the tag keys, not the tag values.</p>
Raises:
capo_migrationhuborchestrator.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource is not available.</p>
capo_migrationhuborchestrator.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_migrationhuborchestrator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_migrationhuborchestrator.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_migrationhuborchestrator.types.untag_resource_response.UntagResourceResponse"
]:
import capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.untag_resource
output, http_response = (
capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.untag_resource.untag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_migrationhuborchestrator.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|