async def untag_certificate_authority(
self,
certificate_authority_arn: "capo_acm_pca.types.arn.Arn",
tags: "capo_acm_pca.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncACMPCAClientConfig] = None,
) -> None:
"""<p>Remove one or more tags from your private CA. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this action, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value. To add tags to a private CA, use the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html">TagCertificateAuthority</a>. Call the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListTags.html">ListTags</a> action to see what tags are associated with your CA. </p>
Args:
certificate_authority_arn: <p>The Amazon Resource Name (ARN) that was returned when you called <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a>. This must be of the form: </p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code> </p>
tags: <p>List of tags to be removed from the CA.</p>
Raises:
capo_acm_pca.errors.invalid_arn_exception.InvalidArnException: <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
capo_acm_pca.errors.invalid_state_exception.InvalidStateException: <p>The state of the private CA does not allow this action to occur.</p>
capo_acm_pca.errors.invalid_tag_exception.InvalidTagException: <p>The tag associated with the CA is not valid. The invalid argument is contained in the message field.</p>
capo_acm_pca.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.</p>
capo_acm_pca.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_acm_pca.types.untag_certificate_authority_request.UntagCertificateAuthorityRequest]",
) -> AsyncOperationResponse[None]:
if req.options.protocol == "awsJson1_1":
import capo_acm_pca._operations.acm_private_ca.aws_json1_1.untag_certificate_authority
(
output,
http_response,
) = await capo_acm_pca._operations.acm_private_ca.aws_json1_1.untag_certificate_authority.async_untag_certificate_authority(
req.options, req.input
)
elif req.options.protocol == "rpcv2Cbor":
import capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.untag_certificate_authority
(
output,
http_response,
) = await capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.untag_certificate_authority.async_untag_certificate_authority(
req.options, req.input
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagCertificateAuthority")
)
input_: capo_acm_pca.types.untag_certificate_authority_request.UntagCertificateAuthorityRequest = {
"certificate_authority_arn": certificate_authority_arn,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output