Skip to content

update_identity_pool

update_identity_pool(
    identity_pool_id: IdentityPoolId,
    identity_pool_name: IdentityPoolName,
    allow_unauthenticated_identities: IdentityPoolUnauthenticated,
    *,
    config_overrides: Optional[CognitoIdentityClientConfig] = None,
    allow_classic_flow: Optional[ClassicFlow] = None,
    supported_login_providers: Optional[IdentityProviders] = None,
    developer_provider_name: Optional[DeveloperProviderName] = None,
    open_id_connect_provider_ar_ns: Optional[OIDCProviderList] = None,
    cognito_identity_providers: Optional[CognitoIdentityProviderList] = None,
    saml_provider_ar_ns: Optional[SAMLProviderList] = None,
    identity_pool_tags: Optional[IdentityPoolTagsType] = None,
) -> IdentityPool

Updates the configuration of an identity pool.

If you don't provide a value for a parameter, Amazon Cognito sets it to its default value.

You must use Amazon Web Services developer credentials to call this operation.

Parameters:

  • identity_pool_id (IdentityPoolId) –

    An identity pool ID in the format REGION:GUID.

  • identity_pool_name (IdentityPoolName) –

    A string that you provide.

  • allow_unauthenticated_identities (IdentityPoolUnauthenticated) –

    TRUE if the identity pool supports unauthenticated logins.

  • allow_classic_flow (Optional[ClassicFlow], default: None ) –

    Enables or disables the Basic (Classic) authentication flow. For more information, see Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.

  • supported_login_providers (Optional[IdentityProviders], default: None ) –

    Optional key:value pairs mapping provider names to provider app IDs.

  • developer_provider_name (Optional[DeveloperProviderName], default: None ) –

    The "domain" by which Cognito will refer to your users.

  • open_id_connect_provider_ar_ns (Optional[OIDCProviderList], default: None ) –

    The ARNs of the OpenID Connect providers.

  • cognito_identity_providers (Optional[CognitoIdentityProviderList], default: None ) –

    A list representing an Amazon Cognito user pool and its client ID.

  • saml_provider_ar_ns (Optional[SAMLProviderList], default: None ) –

    An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

  • identity_pool_tags (Optional[IdentityPoolTagsType], default: None ) –

    The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

Raises:

Source code in docs_src/capo_cognito_identity/_services/cognito_identity.py
def update_identity_pool(
    self,
    identity_pool_id: "capo_cognito_identity.types.identity_pool_id.IdentityPoolId",
    identity_pool_name: "capo_cognito_identity.types.identity_pool_name.IdentityPoolName",
    allow_unauthenticated_identities: "capo_cognito_identity.types.identity_pool_unauthenticated.IdentityPoolUnauthenticated",
    *,
    config_overrides: Optional[CognitoIdentityClientConfig] = None,
    allow_classic_flow: Optional[
        "capo_cognito_identity.types.classic_flow.ClassicFlow"
    ] = None,
    supported_login_providers: Optional[
        "capo_cognito_identity.types.identity_providers.IdentityProviders"
    ] = None,
    developer_provider_name: Optional[
        "capo_cognito_identity.types.developer_provider_name.DeveloperProviderName"
    ] = None,
    open_id_connect_provider_ar_ns: Optional[
        "capo_cognito_identity.types.oidc_provider_list.OIDCProviderList"
    ] = None,
    cognito_identity_providers: Optional[
        "capo_cognito_identity.types.cognito_identity_provider_list.CognitoIdentityProviderList"
    ] = None,
    saml_provider_ar_ns: Optional[
        "capo_cognito_identity.types.saml_provider_list.SAMLProviderList"
    ] = None,
    identity_pool_tags: Optional[
        "capo_cognito_identity.types.identity_pool_tags_type.IdentityPoolTagsType"
    ] = None,
) -> "capo_cognito_identity.types.identity_pool.IdentityPool":
    """<p>Updates the configuration of an identity pool.</p> <important> <p>If you don't provide a value for a parameter, Amazon Cognito sets it to its default value. </p> </important> <p>You must use Amazon Web Services developer credentials to call this operation.</p>

    Args:
        identity_pool_id: <p>An identity pool ID in the format REGION:GUID.</p>
        identity_pool_name: <p>A string that you provide.</p>
        allow_unauthenticated_identities: <p>TRUE if the identity pool supports unauthenticated logins.</p>
        allow_classic_flow: <p>Enables or disables the Basic (Classic) authentication flow. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Identity Pools (Federated Identities) Authentication Flow</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
        supported_login_providers: <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
        developer_provider_name: <p>The "domain" by which Cognito will refer to your users.</p>
        open_id_connect_provider_ar_ns: <p>The ARNs of the OpenID Connect providers.</p>
        cognito_identity_providers: <p>A list representing an Amazon Cognito user pool and its client ID.</p>
        saml_provider_ar_ns: <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
        identity_pool_tags: <p>The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>

    Raises:
        capo_cognito_identity.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Thrown if there are parallel requests to modify a resource.</p>
        capo_cognito_identity.errors.internal_error_exception.InternalErrorException: <p>Thrown when the service encounters an error during processing the request.</p>
        capo_cognito_identity.errors.invalid_parameter_exception.InvalidParameterException: <p>Thrown for missing or bad input parameter(s).</p>
        capo_cognito_identity.errors.limit_exceeded_exception.LimitExceededException: <p>Thrown when the total number of user pools has exceeded a preset limit.</p>
        capo_cognito_identity.errors.not_authorized_exception.NotAuthorizedException: <p>Thrown when a user is not authorized to access the requested resource.</p>
        capo_cognito_identity.errors.resource_conflict_exception.ResourceConflictException: <p>Thrown when a user tries to use a login which is already linked to another account.</p>
        capo_cognito_identity.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource (for example, a dataset or record) does not exist.</p>
        capo_cognito_identity.errors.too_many_requests_exception.TooManyRequestsException: <p>Thrown when a request is throttled.</p>
        capo_cognito_identity.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cognito_identity.types.identity_pool.IdentityPool]",
    ) -> OperationResponse[
        "capo_cognito_identity.types.identity_pool.IdentityPool"
    ]:
        import capo_cognito_identity._operations.aws_cognito_identity_service.update_identity_pool

        output, http_response = (
            capo_cognito_identity._operations.aws_cognito_identity_service.update_identity_pool.update_identity_pool(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateIdentityPool")
    )
    input_: capo_cognito_identity.types.identity_pool.IdentityPool = {
        "identity_pool_id": identity_pool_id,
        "identity_pool_name": identity_pool_name,
        "allow_unauthenticated_identities": allow_unauthenticated_identities,
    }
    if allow_classic_flow is not None:
        input_["allow_classic_flow"] = allow_classic_flow
    if supported_login_providers is not None:
        input_["supported_login_providers"] = supported_login_providers
    if developer_provider_name is not None:
        input_["developer_provider_name"] = developer_provider_name
    if open_id_connect_provider_ar_ns is not None:
        input_["open_id_connect_provider_ar_ns"] = open_id_connect_provider_ar_ns
    if cognito_identity_providers is not None:
        input_["cognito_identity_providers"] = cognito_identity_providers
    if saml_provider_ar_ns is not None:
        input_["saml_provider_ar_ns"] = saml_provider_ar_ns
    if identity_pool_tags is not None:
        input_["identity_pool_tags"] = identity_pool_tags

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