CognitoSync / Client / set_identity_pool_configuration

set_identity_pool_configuration#

CognitoSync.Client.set_identity_pool_configuration(**kwargs)#

Sets the necessary configuration for push sync.

This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

See also: AWS API Documentation

Request Syntax

response = client.set_identity_pool_configuration(
    IdentityPoolId='string',
    PushSync={
        'ApplicationArns': [
            'string',
        ],
        'RoleArn': 'string'
    },
    CognitoStreams={
        'StreamName': 'string',
        'RoleArn': 'string',
        'StreamingStatus': 'ENABLED'|'DISABLED'
    }
)
Parameters:
  • IdentityPoolId (string) –

    [REQUIRED]

    A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool to modify.

  • PushSync (dict) –

    Options to apply to this identity pool for push synchronization.

    • ApplicationArns (list) –

      List of SNS platform application ARNs that could be used by clients.

      • (string) –

    • RoleArn (string) –

      A role configured to allow Cognito to call SNS on behalf of the developer.

  • CognitoStreams (dict) –

    Options to apply to this identity pool for Amazon Cognito streams.

    • StreamName (string) – The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

    • RoleArn (string) – The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

    • StreamingStatus (string) – Status of the Cognito streams. Valid values are:

      ENABLED - Streaming of updates to identity pool is enabled.

      DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Return type:

dict

Returns:

Response Syntax

{
    'IdentityPoolId': 'string',
    'PushSync': {
        'ApplicationArns': [
            'string',
        ],
        'RoleArn': 'string'
    },
    'CognitoStreams': {
        'StreamName': 'string',
        'RoleArn': 'string',
        'StreamingStatus': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) –

    The output for the SetIdentityPoolConfiguration operation

    • IdentityPoolId (string) –

      A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito.

    • PushSync (dict) –

      Options to apply to this identity pool for push synchronization.

      • ApplicationArns (list) –

        List of SNS platform application ARNs that could be used by clients.

        • (string) –

      • RoleArn (string) –

        A role configured to allow Cognito to call SNS on behalf of the developer.

    • CognitoStreams (dict) – Options to apply to this identity pool for Amazon Cognito streams.

      • StreamName (string) – The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.

      • RoleArn (string) – The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream.

      • StreamingStatus (string) – Status of the Cognito streams. Valid values are:

        ENABLED - Streaming of updates to identity pool is enabled.

        DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

Exceptions