Skip to content

create_trusted_token_issuer

create_trusted_token_issuer(
    instance_arn: InstanceArn,
    name: TrustedTokenIssuerName,
    trusted_token_issuer_type: TrustedTokenIssuerType,
    trusted_token_issuer_configuration: TrustedTokenIssuerConfiguration,
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagList] = None,
) -> CreateTrustedTokenIssuerResponse

Creates a connection to a trusted token issuer in an instance of IAM Identity Center. A trusted token issuer enables trusted identity propagation to be used with applications that authenticate outside of Amazon Web Services.

This trusted token issuer describes an external identity provider (IdP) that can generate claims or assertions in the form of access tokens for a user. Applications enabled for IAM Identity Center can use these tokens for authentication.

Parameters:

  • instance_arn (InstanceArn) –

    Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.

  • name (TrustedTokenIssuerName) –

    Specifies the name of the new trusted token issuer configuration.

  • trusted_token_issuer_type (TrustedTokenIssuerType) –

    Specifies the type of the new trusted token issuer.

  • trusted_token_issuer_configuration (TrustedTokenIssuerConfiguration) –

    Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what TrustedTokenIssuerType you specify.

  • client_token (Optional[ClientToken], default: None ) –

    Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

    If you don't provide this value, then Amazon Web Services generates a random one for you.

    If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

  • tags (Optional[TagList], default: None ) –

    Specifies tags to be attached to the new trusted token issuer configuration.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

  • InternalServerException –

    The request processing has failed because of an unknown error, exception, or failure with an internal server.

  • ServiceQuotaExceededException –

    Indicates that the principal has crossed the permitted number of resources that can be created.

  • ThrottlingException –

    Indicates that the principal has crossed the throttling limits of the API operations.

  • ValidationException –

    The request failed because it contains a syntax error.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sso_admin/_services/sso_admin.py
def create_trusted_token_issuer(
    self,
    instance_arn: "capo_sso_admin.types.instance_arn.InstanceArn",
    name: "capo_sso_admin.types.trusted_token_issuer_name.TrustedTokenIssuerName",
    trusted_token_issuer_type: "capo_sso_admin.types.trusted_token_issuer_type.TrustedTokenIssuerType",
    trusted_token_issuer_configuration: "capo_sso_admin.types.trusted_token_issuer_configuration.TrustedTokenIssuerConfiguration",
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
    client_token: Optional["capo_sso_admin.types.client_token.ClientToken"] = None,
    tags: Optional["capo_sso_admin.types.tag_list.TagList"] = None,
) -> "capo_sso_admin.types.create_trusted_token_issuer_response.CreateTrustedTokenIssuerResponse":
    """<p>Creates a connection to a trusted token issuer in an instance of IAM Identity Center. A trusted token issuer enables trusted identity propagation to be used with applications that authenticate outside of Amazon Web Services.</p> <p>This trusted token issuer describes an external identity provider (IdP) that can generate claims or assertions in the form of access tokens for a user. Applications enabled for IAM Identity Center can use these tokens for authentication. </p>

    Args:
        instance_arn: <p>Specifies the ARN of the instance of IAM Identity Center to contain the new trusted token issuer configuration.</p>
        name: <p>Specifies the name of the new trusted token issuer configuration.</p>
        trusted_token_issuer_type: <p>Specifies the type of the new trusted token issuer.</p>
        trusted_token_issuer_configuration: <p>Specifies settings that apply to the new trusted token issuer configuration. The settings that are available depend on what <code>TrustedTokenIssuerType</code> you specify.</p>
        client_token: <p>Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>
        tags: <p>Specifies tags to be attached to the new trusted token issuer configuration.</p>

    Raises:
        capo_sso_admin.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sso_admin.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_sso_admin.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_sso_admin.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Indicates that the principal has crossed the permitted number of resources that can be created.</p>
        capo_sso_admin.errors.throttling_exception.ThrottlingException: <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
        capo_sso_admin.errors.validation_exception.ValidationException: <p>The request failed because it contains a syntax error.</p>
        capo_sso_admin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sso_admin.types.create_trusted_token_issuer_request.CreateTrustedTokenIssuerRequest]",
    ) -> OperationResponse[
        "capo_sso_admin.types.create_trusted_token_issuer_response.CreateTrustedTokenIssuerResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.create_trusted_token_issuer

        output, http_response = (
            capo_sso_admin._operations.swb_external_service.create_trusted_token_issuer.create_trusted_token_issuer(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateTrustedTokenIssuer")
    )
    input_: capo_sso_admin.types.create_trusted_token_issuer_request.CreateTrustedTokenIssuerRequest = {
        "instance_arn": instance_arn,
        "name": name,
        "trusted_token_issuer_type": trusted_token_issuer_type,
        "trusted_token_issuer_configuration": trusted_token_issuer_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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