CleanRoomsService / Client / create_analysis_template

create_analysis_template#

CleanRoomsService.Client.create_analysis_template(**kwargs)#

Creates a new analysis template.

See also: AWS API Documentation

Request Syntax

response = client.create_analysis_template(
    description='string',
    membershipIdentifier='string',
    name='string',
    format='SQL',
    source={
        'text': 'string'
    },
    tags={
        'string': 'string'
    },
    analysisParameters=[
        {
            'name': 'string',
            'type': 'SMALLINT'|'INTEGER'|'BIGINT'|'DECIMAL'|'REAL'|'DOUBLE_PRECISION'|'BOOLEAN'|'CHAR'|'VARCHAR'|'DATE'|'TIMESTAMP'|'TIMESTAMPTZ'|'TIME'|'TIMETZ'|'VARBYTE',
            'defaultValue': 'string'
        },
    ]
)
Parameters:
  • description (string) – The description of the analysis template.

  • membershipIdentifier (string) –

    [REQUIRED]

    The identifier for a membership resource.

  • name (string) –

    [REQUIRED]

    The name of the analysis template.

  • format (string) –

    [REQUIRED]

    The format of the analysis template.

  • source (dict) –

    [REQUIRED]

    The information in the analysis template. Currently supports text, the query text for the analysis template.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: text.

    • text (string) –

      The query text.

  • tags (dict) –

    An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.

    • (string) –

      • (string) –

  • analysisParameters (list) –

    The parameters of the analysis template.

    • (dict) –

      Optional. The member who can query can provide this placeholder for a literal data value in an analysis template.

      • name (string) – [REQUIRED]

        The name of the parameter. The name must use only alphanumeric, underscore (_), or hyphen (-) characters but cannot start or end with a hyphen.

      • type (string) – [REQUIRED]

        The type of parameter.

      • defaultValue (string) –

        Optional. The default value that is applied in the analysis template. The member who can query can override this value in the query editor.

Return type:

dict

Returns:

Response Syntax

{
    'analysisTemplate': {
        'id': 'string',
        'arn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'description': 'string',
        'name': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'schema': {
            'referencedTables': [
                'string',
            ]
        },
        'format': 'SQL',
        'source': {
            'text': 'string'
        },
        'analysisParameters': [
            {
                'name': 'string',
                'type': 'SMALLINT'|'INTEGER'|'BIGINT'|'DECIMAL'|'REAL'|'DOUBLE_PRECISION'|'BOOLEAN'|'CHAR'|'VARCHAR'|'DATE'|'TIMESTAMP'|'TIMESTAMPTZ'|'TIME'|'TIMETZ'|'VARBYTE',
                'defaultValue': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • analysisTemplate (dict) –

      The analysis template.

      • id (string) –

        The identifier for the analysis template.

      • arn (string) –

        The Amazon Resource Name (ARN) of the analysis template.

      • collaborationId (string) –

        The unique ID for the associated collaboration of the analysis template.

      • collaborationArn (string) –

        The unique ARN for the analysis template’s associated collaboration.

      • membershipId (string) –

        The identifier of a member who created the analysis template.

      • membershipArn (string) –

        The Amazon Resource Name (ARN) of the member who created the analysis template.

      • description (string) –

        The description of the analysis template.

      • name (string) –

        The name of the analysis template.

      • createTime (datetime) –

        The time that the analysis template was created.

      • updateTime (datetime) –

        The time that the analysis template was last updated.

      • schema (dict) –

        The entire schema object.

        • referencedTables (list) –

          The tables referenced in the analysis schema.

          • (string) –

      • format (string) –

        The format of the analysis template.

      • source (dict) –

        The source of the analysis template.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: text. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • text (string) –

          The query text.

      • analysisParameters (list) –

        The parameters of the analysis template.

        • (dict) –

          Optional. The member who can query can provide this placeholder for a literal data value in an analysis template.

          • name (string) –

            The name of the parameter. The name must use only alphanumeric, underscore (_), or hyphen (-) characters but cannot start or end with a hyphen.

          • type (string) –

            The type of parameter.

          • defaultValue (string) –

            Optional. The default value that is applied in the analysis template. The member who can query can override this value in the query editor.

Exceptions

  • CleanRoomsService.Client.exceptions.ConflictException

  • CleanRoomsService.Client.exceptions.ServiceQuotaExceededException

  • CleanRoomsService.Client.exceptions.ResourceNotFoundException

  • CleanRoomsService.Client.exceptions.InternalServerException

  • CleanRoomsService.Client.exceptions.ValidationException

  • CleanRoomsService.Client.exceptions.ThrottlingException

  • CleanRoomsService.Client.exceptions.AccessDeniedException