Skip to content

update_identity_provider async

update_identity_provider(
    identity_provider_arn: SubresourceARN,
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    identity_provider_name: Optional[IdentityProviderName] = None,
    identity_provider_type: Optional[IdentityProviderType] = None,
    identity_provider_details: Optional[IdentityProviderDetails] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateIdentityProviderResponse

Updates the identity provider.

Parameters:

  • identity_provider_arn (SubresourceARN) –

    The ARN of the identity provider.

  • identity_provider_name (Optional[IdentityProviderName], default: None ) –

    The name of the identity provider.

  • identity_provider_type (Optional[IdentityProviderType], default: None ) –

    The type of the identity provider.

  • identity_provider_details (Optional[IdentityProviderDetails], default: None ) –

    The details of the identity provider. The following list describes the provider detail keys for each identity provider type.

    • For Google and Login with Amazon:

      • client_id

      • client_secret

      • authorize_scopes

    • For Facebook:

      • client_id

      • client_secret

      • authorize_scopes

      • api_version

    • For Sign in with Apple:

      • client_id

      • team_id

      • key_id

      • private_key

      • authorize_scopes

    • For OIDC providers:

      • client_id

      • client_secret

      • attributes_request_method

      • oidc_issuer

      • authorize_scopes

      • authorize_url if not available from discovery URL specified by oidc_issuer key

      • token_url if not available from discovery URL specified by oidc_issuer key

      • attributes_url if not available from discovery URL specified by oidc_issuer key

      • jwks_uri if not available from discovery URL specified by oidc_issuer key

    • For SAML providers:

      • MetadataFile OR MetadataURL

      • IDPSignout (boolean) optional

      • IDPInit (boolean) optional

      • RequestSigningAlgorithm (string) optional - Only accepts rsa-sha256

      • EncryptedResponses (boolean) optional

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request.

    If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

Raises:

Source code in docs_src/capo_workspaces_web/_services/async_work_spaces_web.py
async def update_identity_provider(
    self,
    identity_provider_arn: "capo_workspaces_web.types.subresource_arn.SubresourceARN",
    *,
    config_overrides: Optional[AsyncWorkSpacesWebClientConfig] = None,
    identity_provider_name: Optional[
        "capo_workspaces_web.types.identity_provider_name.IdentityProviderName"
    ] = None,
    identity_provider_type: Optional[
        "capo_workspaces_web.types.identity_provider_type.IdentityProviderType"
    ] = None,
    identity_provider_details: Optional[
        "capo_workspaces_web.types.identity_provider_details.IdentityProviderDetails"
    ] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
) -> "capo_workspaces_web.types.update_identity_provider_response.UpdateIdentityProviderResponse":
    """<p>Updates the identity provider. </p>

    Args:
        identity_provider_arn: <p>The ARN of the identity provider.</p>
        identity_provider_name: <p>The name of the identity provider.</p>
        identity_provider_type: <p>The type of the identity provider.</p>
        identity_provider_details: <p>The details of the identity provider. The following list describes the provider detail keys for each identity provider type. </p> <ul> <li> <p>For Google and Login with Amazon:</p> <ul> <li> <p> <code>client_id</code> </p> </li> <li> <p> <code>client_secret</code> </p> </li> <li> <p> <code>authorize_scopes</code> </p> </li> </ul> </li> <li> <p>For Facebook:</p> <ul> <li> <p> <code>client_id</code> </p> </li> <li> <p> <code>client_secret</code> </p> </li> <li> <p> <code>authorize_scopes</code> </p> </li> <li> <p> <code>api_version</code> </p> </li> </ul> </li> <li> <p>For Sign in with Apple:</p> <ul> <li> <p> <code>client_id</code> </p> </li> <li> <p> <code>team_id</code> </p> </li> <li> <p> <code>key_id</code> </p> </li> <li> <p> <code>private_key</code> </p> </li> <li> <p> <code>authorize_scopes</code> </p> </li> </ul> </li> <li> <p>For OIDC providers:</p> <ul> <li> <p> <code>client_id</code> </p> </li> <li> <p> <code>client_secret</code> </p> </li> <li> <p> <code>attributes_request_method</code> </p> </li> <li> <p> <code>oidc_issuer</code> </p> </li> <li> <p> <code>authorize_scopes</code> </p> </li> <li> <p> <code>authorize_url</code> <i>if not available from discovery URL specified by <code>oidc_issuer</code> key</i> </p> </li> <li> <p> <code>token_url</code> <i>if not available from discovery URL specified by <code>oidc_issuer</code> key</i> </p> </li> <li> <p> <code>attributes_url</code> <i>if not available from discovery URL specified by <code>oidc_issuer</code> key</i> </p> </li> <li> <p> <code>jwks_uri</code> <i>if not available from discovery URL specified by <code>oidc_issuer</code> key</i> </p> </li> </ul> </li> <li> <p>For SAML providers:</p> <ul> <li> <p> <code>MetadataFile</code> OR <code>MetadataURL</code> </p> </li> <li> <p> <code>IDPSignout</code> (boolean) <i>optional</i> </p> </li> <li> <p> <code>IDPInit</code> (boolean) <i>optional</i> </p> </li> <li> <p> <code>RequestSigningAlgorithm</code> (string) <i>optional</i> - Only accepts <code>rsa-sha256</code> </p> </li> <li> <p> <code>EncryptedResponses</code> (boolean) <i>optional</i> </p> </li> </ul> </li> </ul>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token return the result from the original successful request. </p> <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces_web.types.update_identity_provider_request.UpdateIdentityProviderRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces_web.types.update_identity_provider_response.UpdateIdentityProviderResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.update_identity_provider

        (
            output,
            http_response,
        ) = await capo_workspaces_web._operations.aws_ermine_control_plane_service.update_identity_provider.async_update_identity_provider(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_workspaces_web.types.update_identity_provider_request.UpdateIdentityProviderRequest",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.update_identity_provider_request

        return capo_workspaces_web.types.update_identity_provider_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_workspaces_web.types.update_identity_provider_response.UpdateIdentityProviderResponse",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.update_identity_provider_response

        return capo_workspaces_web.types.update_identity_provider_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateIdentityProvider",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workspaces_web.types.update_identity_provider_request.UpdateIdentityProviderRequest = {
        "identity_provider_arn": identity_provider_arn
    }
    if identity_provider_name is not None:
        input_["identity_provider_name"] = identity_provider_name
    if identity_provider_type is not None:
        input_["identity_provider_type"] = identity_provider_type
    if identity_provider_details is not None:
        input_["identity_provider_details"] = identity_provider_details
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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