Updates a trust anchor. You establish trust between IAM Roles Anywhere and your certificate authority (CA) by configuring a trust anchor. You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.
Required permissions: rolesanywhere:UpdateTrustAnchor.
Parameters:
-
trust_anchor_id
(Uuid)
–
The unique identifier of the trust anchor.
-
name
(Optional[ResourceName], default:
None
)
–
The name of the trust anchor.
-
source
(Optional[Source], default:
None
)
–
The trust anchor type and its related certificate data.
Raises:
Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
| def update_trust_anchor(
self,
trust_anchor_id: "capo_rolesanywhere.types.uuid.Uuid",
*,
config_overrides: Optional[RolesAnywhereClientConfig] = None,
name: Optional["capo_rolesanywhere.types.resource_name.ResourceName"] = None,
source: Optional["capo_rolesanywhere.types.source.Source"] = None,
) -> "capo_rolesanywhere.types.trust_anchor_detail_response.TrustAnchorDetailResponse":
"""<p>Updates a trust anchor. You establish trust between IAM Roles Anywhere and your certificate authority (CA) by configuring a trust anchor. You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.</p> <p> <b>Required permissions: </b> <code>rolesanywhere:UpdateTrustAnchor</code>. </p>
Args:
trust_anchor_id: <p>The unique identifier of the trust anchor.</p>
name: <p>The name of the trust anchor.</p>
source: <p>The trust anchor type and its related certificate data.</p>
Raises:
capo_rolesanywhere.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_rolesanywhere.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_rolesanywhere.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_rolesanywhere.types.update_trust_anchor_request.UpdateTrustAnchorRequest]",
) -> OperationResponse[
"capo_rolesanywhere.types.trust_anchor_detail_response.TrustAnchorDetailResponse"
]:
import capo_rolesanywhere._operations.roles_anywhere.update_trust_anchor
output, http_response = (
capo_rolesanywhere._operations.roles_anywhere.update_trust_anchor.update_trust_anchor(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateTrustAnchor")
)
input_: capo_rolesanywhere.types.update_trust_anchor_request.UpdateTrustAnchorRequest = {
"trust_anchor_id": trust_anchor_id
}
if name is not None:
input_["name"] = name
if source is not None:
input_["source"] = source
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|