Skip to content

enable_trust_anchor

enable_trust_anchor(
    trust_anchor_id: TrustAnchorIdentifier,
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
) -> TrustAnchorDetailResponse

Enables a trust anchor. When enabled, certificates in the trust anchor chain are authorized for trust validation.

Required permissions: rolesanywhere:EnableTrustAnchor.

Parameters:

  • trust_anchor_id (TrustAnchorIdentifier) –

    The trust anchor to act on. You can specify one of the following:

    • The trust anchor ID.

    • The trust anchor ARN.

    • The alias ARN of the trust anchor.

    An ARN must be for a trust anchor in your account and Region.

Raises:

Source code in docs_src/capo_rolesanywhere/_services/roles_anywhere.py
def enable_trust_anchor(
    self,
    trust_anchor_id: "capo_rolesanywhere.types.trust_anchor_identifier.TrustAnchorIdentifier",
    *,
    config_overrides: Optional[RolesAnywhereClientConfig] = None,
) -> "capo_rolesanywhere.types.trust_anchor_detail_response.TrustAnchorDetailResponse":
    """<p>Enables a trust anchor. When enabled, certificates in the trust anchor chain are authorized for trust validation. </p> <p> <b>Required permissions: </b> <code>rolesanywhere:EnableTrustAnchor</code>. </p>

    Args:
        trust_anchor_id: <p>The trust anchor to act on. You can specify one of the following:</p> <ul> <li> <p>The trust anchor ID.</p> </li> <li> <p>The trust anchor ARN.</p> </li> <li> <p>The alias ARN of the trust anchor.</p> </li> </ul> <p>An ARN must be for a trust anchor in your account and Region.</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.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed due to a temporary failure of the service.</p>
        capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_rolesanywhere.types.scalar_trust_anchor_request.ScalarTrustAnchorRequest]",
    ) -> OperationResponse[
        "capo_rolesanywhere.types.trust_anchor_detail_response.TrustAnchorDetailResponse"
    ]:
        import capo_rolesanywhere._operations.roles_anywhere.enable_trust_anchor

        output, http_response = (
            capo_rolesanywhere._operations.roles_anywhere.enable_trust_anchor.enable_trust_anchor(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("EnableTrustAnchor")
    )
    input_: capo_rolesanywhere.types.scalar_trust_anchor_request.ScalarTrustAnchorRequest = {
        "trust_anchor_id": trust_anchor_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output