Skip to content

update_trust_anchor async

update_trust_anchor(
    trust_anchor_id: TrustAnchorIdentifier,
    *,
    config_overrides: Optional[AsyncRolesAnywhereClientConfig] = None,
    name: Optional[ResourceName] = None,
    source: Optional[Source] = None,
    crl_dp_revocation_enabled: Optional[bool] = None,
    alias_name: Optional[AliasName] = None,
) -> TrustAnchorDetailResponse

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 (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.

  • 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.

  • crl_dp_revocation_enabled (Optional[bool], default: None ) –

    Specifies whether the trust anchor checks certificate revocation status against CRL distribution points.

  • alias_name (Optional[AliasName], default: None ) –

    The alias for the trust anchor.

    You can use this parameter in the following ways:

    • To set or change the alias, specify the new alias name. After the change, the previous alias ARN no longer identifies the resource. You can then assign the previous alias to another resource of the same type. A change can take a short time to take effect for requests that use an alias ARN.

    • To remove the alias, specify an empty string.

    • To keep the current alias, omit this parameter.

    An alias name contains 1 to 256 characters. It must begin with a letter (A-Z or a-z). It can contain only letters (A-Z and a-z), numbers (0-9), underscores (_), hyphens (-), and forward slashes (/). A forward slash can appear only between two other characters, so an alias name can't end with a forward slash or contain two in a row. Alias names that begin with aws/, in any combination of uppercase and lowercase letters, are reserved. Alias names are case sensitive.

    The alias name must be unique among resources of the same type in your account and Region. If another resource of the same type already has the alias, the request fails with a ValidationException. An invalid or reserved alias name also causes a ValidationException.

Raises:

Source code in docs_src/capo_rolesanywhere/_services/async_roles_anywhere.py
async def update_trust_anchor(
    self,
    trust_anchor_id: "capo_rolesanywhere.types.trust_anchor_identifier.TrustAnchorIdentifier",
    *,
    config_overrides: Optional[AsyncRolesAnywhereClientConfig] = None,
    name: Optional["capo_rolesanywhere.types.resource_name.ResourceName"] = None,
    source: Optional["capo_rolesanywhere.types.source.Source"] = None,
    crl_dp_revocation_enabled: Optional[bool] = None,
    alias_name: Optional["capo_rolesanywhere.types.alias_name.AliasName"] = 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 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>
        name: <p>The name of the trust anchor.</p>
        source: <p>The trust anchor type and its related certificate data.</p>
        crl_dp_revocation_enabled: <p>Specifies whether the trust anchor checks certificate revocation status against CRL distribution points.</p>
        alias_name: <p>The alias for the trust anchor.</p> <p>You can use this parameter in the following ways:</p> <ul> <li> <p>To set or change the alias, specify the new alias name. After the change, the previous alias ARN no longer identifies the resource. You can then assign the previous alias to another resource of the same type. A change can take a short time to take effect for requests that use an alias ARN.</p> </li> <li> <p>To remove the alias, specify an empty string.</p> </li> <li> <p>To keep the current alias, omit this parameter.</p> </li> </ul> <p>An alias name contains 1 to 256 characters. It must begin with a letter (A-Z or a-z). It can contain only letters (A-Z and a-z), numbers (0-9), underscores (_), hyphens (-), and forward slashes (/). A forward slash can appear only between two other characters, so an alias name can't end with a forward slash or contain two in a row. Alias names that begin with <code>aws/</code>, in any combination of uppercase and lowercase letters, are reserved. Alias names are case sensitive.</p> <p>The alias name must be unique among resources of the same type in your account and Region. If another resource of the same type already has the alias, the request fails with a <code>ValidationException</code>. An invalid or reserved alias name also causes a <code>ValidationException</code>.</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.validation_exception.ValidationException: <p>Validation exception error.</p>
        capo_rolesanywhere.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rolesanywhere.types.update_trust_anchor_request.UpdateTrustAnchorRequest]",
    ) -> AsyncOperationResponse[
        "capo_rolesanywhere.types.trust_anchor_detail_response.TrustAnchorDetailResponse"
    ]:
        import capo_rolesanywhere._operations.roles_anywhere.update_trust_anchor

        (
            output,
            http_response,
        ) = await capo_rolesanywhere._operations.roles_anywhere.update_trust_anchor.async_update_trust_anchor(
            req.options, req.input
        )
        return AsyncOperationResponse(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
    if crl_dp_revocation_enabled is not None:
        input_["crl_dp_revocation_enabled"] = crl_dp_revocation_enabled
    if alias_name is not None:
        input_["alias_name"] = alias_name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output