AWS Clean Rooms Service

2024/07/24 - AWS Clean Rooms Service - 4 new14 updated api methods

Changes  Three enhancements to the AWS Clean Rooms: Disallowed Output Columns, Flexible Result Receivers, SQL as a Seed

UpdateConfiguredTableAssociationAnalysisRule (new) Link ¶

Updates the analysis rule for a configured table association.

See also: AWS API Documentation

Request Syntax

client.update_configured_table_association_analysis_rule(
    membershipIdentifier='string',
    configuredTableAssociationIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM',
    analysisRulePolicy={
        'v1': {
            'list': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            },
            'aggregation': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            },
            'custom': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            }
        }
    }
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership that the configured table association belongs to. Currently accepts the membership ID.

type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The identifier for the configured table association to update.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The analysis rule type that you want to update.

type analysisRulePolicy:

dict

param analysisRulePolicy:

[REQUIRED]

The updated analysis rule policy for the configured table association.

  • v1 (dict) --

    The policy for the configured table association analysis rule.

    • list (dict) --

      Analysis rule type that enables only list queries on a configured table.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        • (string) --

    • aggregation (dict) --

      Analysis rule type that enables only aggregation queries on a configured table.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        The allowedAdditionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

        • (string) --

    • custom (dict) --

      Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        • (string) --

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'membershipIdentifier': 'string',
        'configuredTableAssociationId': 'string',
        'configuredTableAssociationArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'aggregation': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'custom': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The updated analysis rule for the configured table association. In the console, the ConfiguredTableAssociationAnalysisRule is referred to as the collaboration analysis rule.

      • membershipIdentifier (string) --

        The membership identifier for the configured table association analysis rule.

      • configuredTableAssociationId (string) --

        The unique identifier for the configured table association.

      • configuredTableAssociationArn (string) --

        The Amazon Resource Name (ARN) of the configured table association.

      • policy (dict) --

        The policy of the configured table association analysis rule.

        • v1 (dict) --

          The policy for the configured table association analysis rule.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              The allowedAdditionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

              • (string) --

          • custom (dict) --

            Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

      • type (string) --

        The type of the configured table association analysis rule.

      • createTime (datetime) --

        The creation time of the configured table association analysis rule.

      • updateTime (datetime) --

        The update time of the configured table association analysis rule.

CreateConfiguredTableAssociationAnalysisRule (new) Link ¶

Creates a new analysis rule for an associated configured table.

See also: AWS API Documentation

Request Syntax

client.create_configured_table_association_analysis_rule(
    membershipIdentifier='string',
    configuredTableAssociationIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM',
    analysisRulePolicy={
        'v1': {
            'list': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            },
            'aggregation': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            },
            'custom': {
                'allowedResultReceivers': [
                    'string',
                ],
                'allowedAdditionalAnalyses': [
                    'string',
                ]
            }
        }
    }
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership that the configured table association belongs to. Currently accepts the membership ID.

type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The unique ID for the configured table association. Currently accepts the configured table association ID.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The type of analysis rule.

type analysisRulePolicy:

dict

param analysisRulePolicy:

[REQUIRED]

The analysis rule policy that was created for the configured table association.

  • v1 (dict) --

    The policy for the configured table association analysis rule.

    • list (dict) --

      Analysis rule type that enables only list queries on a configured table.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        • (string) --

    • aggregation (dict) --

      Analysis rule type that enables only aggregation queries on a configured table.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        The allowedAdditionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

        • (string) --

    • custom (dict) --

      Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

      • allowedResultReceivers (list) --

        The list of collaboration members who are allowed to receive results of queries run with this configured table.

        • (string) --

      • allowedAdditionalAnalyses (list) --

        The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

        • (string) --

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'membershipIdentifier': 'string',
        'configuredTableAssociationId': 'string',
        'configuredTableAssociationArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'aggregation': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'custom': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The analysis rule for the configured table association. In the console, the ConfiguredTableAssociationAnalysisRule is referred to as the collaboration analysis rule.

      • membershipIdentifier (string) --

        The membership identifier for the configured table association analysis rule.

      • configuredTableAssociationId (string) --

        The unique identifier for the configured table association.

      • configuredTableAssociationArn (string) --

        The Amazon Resource Name (ARN) of the configured table association.

      • policy (dict) --

        The policy of the configured table association analysis rule.

        • v1 (dict) --

          The policy for the configured table association analysis rule.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              The allowedAdditionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

              • (string) --

          • custom (dict) --

            Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

      • type (string) --

        The type of the configured table association analysis rule.

      • createTime (datetime) --

        The creation time of the configured table association analysis rule.

      • updateTime (datetime) --

        The update time of the configured table association analysis rule.

DeleteConfiguredTableAssociationAnalysisRule (new) Link ¶

Deletes an analysis rule for a configured table association.

See also: AWS API Documentation

Request Syntax

client.delete_configured_table_association_analysis_rule(
    membershipIdentifier='string',
    configuredTableAssociationIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM'
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership that the configured table association belongs to. Currently accepts the membership ID.

type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The identifier for the configured table association that's related to the analysis rule that you want to delete.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The type of the analysis rule that you want to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetConfiguredTableAssociationAnalysisRule (new) Link ¶

Retrieves the analysis rule for a configured table association.

See also: AWS API Documentation

Request Syntax

client.get_configured_table_association_analysis_rule(
    membershipIdentifier='string',
    configuredTableAssociationIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM'
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership that the configured table association belongs to. Currently accepts the membership ID.

type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The identifier for the configured table association that's related to the analysis rule.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The type of analysis rule that you want to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'membershipIdentifier': 'string',
        'configuredTableAssociationId': 'string',
        'configuredTableAssociationArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'aggregation': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                },
                'custom': {
                    'allowedResultReceivers': [
                        'string',
                    ],
                    'allowedAdditionalAnalyses': [
                        'string',
                    ]
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The analysis rule for the configured table association. In the console, the ConfiguredTableAssociationAnalysisRule is referred to as the collaboration analysis rule.

      • membershipIdentifier (string) --

        The membership identifier for the configured table association analysis rule.

      • configuredTableAssociationId (string) --

        The unique identifier for the configured table association.

      • configuredTableAssociationArn (string) --

        The Amazon Resource Name (ARN) of the configured table association.

      • policy (dict) --

        The policy of the configured table association analysis rule.

        • v1 (dict) --

          The policy for the configured table association analysis rule.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              The allowedAdditionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

              • (string) --

          • custom (dict) --

            Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedResultReceivers (list) --

              The list of collaboration members who are allowed to receive results of queries run with this configured table.

              • (string) --

            • allowedAdditionalAnalyses (list) --

              The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.

              • (string) --

      • type (string) --

        The type of the configured table association analysis rule.

      • createTime (datetime) --

        The creation time of the configured table association analysis rule.

      • updateTime (datetime) --

        The update time of the configured table association analysis rule.

BatchGetSchema (updated) Link ¶
Changes (response)
{'schemas': {'schemaStatusDetails': {'analysisType': 'DIRECT_ANALYSIS | '
                                                     'ADDITIONAL_ANALYSIS',
                                     'reasons': {'code': {'ADDITIONAL_ANALYSES_NOT_ALLOWED',
                                                          'ADDITIONAL_ANALYSES_NOT_CONFIGURED',
                                                          'ANALYSIS_RULE_TYPES_NOT_COMPATIBLE',
                                                          'COLLABORATION_ANALYSIS_RULE_NOT_CONFIGURED',
                                                          'RESULT_RECEIVERS_NOT_ALLOWED',
                                                          'RESULT_RECEIVERS_NOT_CONFIGURED'}}}}}

Retrieves multiple schemas by their identifiers.

See also: AWS API Documentation

Request Syntax

client.batch_get_schema(
    collaborationIdentifier='string',
    names=[
        'string',
    ]
)
type collaborationIdentifier:

string

param collaborationIdentifier:

[REQUIRED]

A unique identifier for the collaboration that the schemas belong to. Currently accepts collaboration ID.

type names:

list

param names:

[REQUIRED]

The names for the schema objects to retrieve.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'schemas': [
        {
            'columns': [
                {
                    'name': 'string',
                    'type': 'string'
                },
            ],
            'partitionKeys': [
                {
                    'name': 'string',
                    'type': 'string'
                },
            ],
            'analysisRuleTypes': [
                'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
            ],
            'analysisMethod': 'DIRECT_QUERY',
            'creatorAccountId': 'string',
            'name': 'string',
            'collaborationId': 'string',
            'collaborationArn': 'string',
            'description': 'string',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'type': 'TABLE'|'ID_MAPPING_TABLE',
            'schemaStatusDetails': [
                {
                    'status': 'READY'|'NOT_READY',
                    'reasons': [
                        {
                            'code': 'ANALYSIS_RULE_MISSING'|'ANALYSIS_TEMPLATES_NOT_CONFIGURED'|'ANALYSIS_PROVIDERS_NOT_CONFIGURED'|'DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED'|'ID_MAPPING_TABLE_NOT_POPULATED'|'COLLABORATION_ANALYSIS_RULE_NOT_CONFIGURED'|'ADDITIONAL_ANALYSES_NOT_CONFIGURED'|'RESULT_RECEIVERS_NOT_CONFIGURED'|'ADDITIONAL_ANALYSES_NOT_ALLOWED'|'RESULT_RECEIVERS_NOT_ALLOWED'|'ANALYSIS_RULE_TYPES_NOT_COMPATIBLE',
                            'message': 'string'
                        },
                    ],
                    'analysisRuleType': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
                    'configurations': [
                        'DIFFERENTIAL_PRIVACY',
                    ],
                    'analysisType': 'DIRECT_ANALYSIS'|'ADDITIONAL_ANALYSIS'
                },
            ],
            'schemaTypeProperties': {
                'idMappingTable': {
                    'idMappingTableInputSource': [
                        {
                            'idNamespaceAssociationId': 'string',
                            'type': 'SOURCE'|'TARGET'
                        },
                    ]
                }
            }
        },
    ],
    'errors': [
        {
            'name': 'string',
            'code': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • schemas (list) --

      The retrieved list of schemas.

      • (dict) --

        A schema is a relation within a collaboration.

        • columns (list) --

          The columns for the relation this schema represents.

          • (dict) --

            A column within a schema relation, derived from the underlying Glue table.

            • name (string) --

              The name of the column.

            • type (string) --

              The type of the column.

        • partitionKeys (list) --

          The partition keys for the dataset underlying this schema.

          • (dict) --

            A column within a schema relation, derived from the underlying Glue table.

            • name (string) --

              The name of the column.

            • type (string) --

              The type of the column.

        • analysisRuleTypes (list) --

          The analysis rule types associated with the schema. Currently, only one entry is present.

          • (string) --

        • analysisMethod (string) --

          The analysis method for the schema. The only valid value is currently DIRECT_QUERY.

        • creatorAccountId (string) --

          The unique account ID for the Amazon Web Services account that owns the schema.

        • name (string) --

          A name for the schema. The schema relation is referred to by this name when queried by a protected query.

        • collaborationId (string) --

          The unique ID for the collaboration that the schema belongs to.

        • collaborationArn (string) --

          The unique ARN for the collaboration that the schema belongs to.

        • description (string) --

          A description for the schema.

        • createTime (datetime) --

          The time the schema was created.

        • updateTime (datetime) --

          The time the schema was last updated.

        • type (string) --

          The type of schema. The only valid value is currently TABLE.

        • schemaStatusDetails (list) --

          Details about the status of the schema. Currently, only one entry is present.

          • (dict) --

            Information about the schema status.

            A status of READY means that based on the schema analysis rule, queries of the given analysis rule type are properly configured to run queries on this schema.

            • status (string) --

              The status of the schema, indicating if it is ready to query.

            • reasons (list) --

              The reasons why the schema status is set to its current state.

              • (dict) --

                A reason why the schema status is set to its current value.

                • code (string) --

                  The schema status reason code.

                • message (string) --

                  An explanation of the schema status reason code.

            • analysisRuleType (string) --

              The analysis rule type for which the schema status has been evaluated.

            • configurations (list) --

              The configuration details of the schema analysis rule for the given type.

              • (string) --

            • analysisType (string) --

              The type of analysis that can be performed on the schema.

              A schema can have an analysisType of DIRECT_ANALYSIS, ADDITIONAL_ANALYSIS_FOR_AUDIENCE_GENERATION, or both.

        • schemaTypeProperties (dict) --

          The schema type properties.

          • idMappingTable (dict) --

            The ID mapping table for the schema type properties.

            • idMappingTableInputSource (list) --

              Defines which ID namespace associations are used to create the ID mapping table.

              • (dict) --

                The input source of the ID mapping table.

                • idNamespaceAssociationId (string) --

                  The unique identifier of the ID namespace association.

                • type (string) --

                  The type of the input source of the ID mapping table.

    • errors (list) --

      Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved.

      • (dict) --

        An error describing why a schema could not be fetched.

        • name (string) --

          An error name for the error.

        • code (string) --

          An error code for the error.

        • message (string) --

          An error message for the error.

BatchGetSchemaAnalysisRule (updated) Link ¶
Changes (response)
{'analysisRules': {'policy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                           '| '
                                                                           'REQUIRED '
                                                                           '| '
                                                                           'NOT_ALLOWED'},
                                     'custom': {'additionalAnalyses': 'ALLOWED '
                                                                      '| '
                                                                      'REQUIRED '
                                                                      '| '
                                                                      'NOT_ALLOWED',
                                                'disallowedOutputColumns': ['string']},
                                     'list': {'additionalAnalyses': 'ALLOWED | '
                                                                    'REQUIRED '
                                                                    '| '
                                                                    'NOT_ALLOWED'}}}}}

Retrieves multiple analysis rule schemas.

See also: AWS API Documentation

Request Syntax

client.batch_get_schema_analysis_rule(
    collaborationIdentifier='string',
    schemaAnalysisRuleRequests=[
        {
            'name': 'string',
            'type': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE'
        },
    ]
)
type collaborationIdentifier:

string

param collaborationIdentifier:

[REQUIRED]

The unique identifier of the collaboration that contains the schema analysis rule.

type schemaAnalysisRuleRequests:

list

param schemaAnalysisRuleRequests:

[REQUIRED]

The information that's necessary to retrieve a schema analysis rule.

  • (dict) --

    Defines the information that's necessary to retrieve an analysis rule schema. Schema analysis rules are uniquely identified by a combination of the schema name and the analysis rule type for a given collaboration.

    • name (string) -- [REQUIRED]

      The name of the analysis rule schema that you are requesting.

    • type (string) -- [REQUIRED]

      The type of analysis rule schema that you are requesting.

rtype:

dict

returns:

Response Syntax

{
    'analysisRules': [
        {
            'collaborationId': 'string',
            'type': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
            'name': 'string',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'policy': {
                'v1': {
                    'list': {
                        'joinColumns': [
                            'string',
                        ],
                        'allowedJoinOperators': [
                            'OR'|'AND',
                        ],
                        'listColumns': [
                            'string',
                        ],
                        'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                    },
                    'aggregation': {
                        'aggregateColumns': [
                            {
                                'columnNames': [
                                    'string',
                                ],
                                'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                            },
                        ],
                        'joinColumns': [
                            'string',
                        ],
                        'joinRequired': 'QUERY_RUNNER',
                        'allowedJoinOperators': [
                            'OR'|'AND',
                        ],
                        'dimensionColumns': [
                            'string',
                        ],
                        'scalarFunctions': [
                            'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                        ],
                        'outputConstraints': [
                            {
                                'columnName': 'string',
                                'minimum': 123,
                                'type': 'COUNT_DISTINCT'
                            },
                        ],
                        'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                    },
                    'custom': {
                        'allowedAnalyses': [
                            'string',
                        ],
                        'allowedAnalysisProviders': [
                            'string',
                        ],
                        'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                        'disallowedOutputColumns': [
                            'string',
                        ],
                        'differentialPrivacy': {
                            'columns': [
                                {
                                    'name': 'string'
                                },
                            ]
                        }
                    },
                    'idMappingTable': {
                        'joinColumns': [
                            'string',
                        ],
                        'queryConstraints': [
                            {
                                'requireOverlap': {
                                    'columns': [
                                        'string',
                                    ]
                                }
                            },
                        ],
                        'dimensionColumns': [
                            'string',
                        ]
                    }
                }
            }
        },
    ],
    'errors': [
        {
            'name': 'string',
            'type': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
            'code': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • analysisRules (list) --

      The retrieved list of analysis rules.

      • (dict) --

        A specification about how data from the configured table can be used in a query.

        • collaborationId (string) --

          The unique ID for the associated collaboration.

        • type (string) --

          The type of analysis rule.

        • name (string) --

          The name for the analysis rule.

        • createTime (datetime) --

          The time the analysis rule was created.

        • updateTime (datetime) --

          The time the analysis rule was last updated.

        • policy (dict) --

          A policy that describes the associated data usage limitations.

          • v1 (dict) --

            Controls on the query specifications that can be run on configured table.

            • list (dict) --

              Analysis rule type that enables only list queries on a configured table.

              • joinColumns (list) --

                Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

                • (string) --

              • allowedJoinOperators (list) --

                The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

                • (string) --

              • listColumns (list) --

                Columns that can be listed in the output.

                • (string) --

              • additionalAnalyses (string) --

                An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

            • aggregation (dict) --

              Analysis rule type that enables only aggregation queries on a configured table.

              • aggregateColumns (list) --

                The columns that query runners are allowed to use in aggregation queries.

                • (dict) --

                  Column in configured table that can be used in aggregate function in query.

                  • columnNames (list) --

                    Column names in configured table of aggregate columns.

                    • (string) --

                  • function (string) --

                    Aggregation function that can be applied to aggregate column in query.

              • joinColumns (list) --

                Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

                • (string) --

              • joinRequired (string) --

                Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

              • allowedJoinOperators (list) --

                Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

                • (string) --

              • dimensionColumns (list) --

                The columns that query runners are allowed to select, group by, or filter by.

                • (string) --

              • scalarFunctions (list) --

                Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

                • (string) --

              • outputConstraints (list) --

                Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

                • (dict) --

                  Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

                  • columnName (string) --

                    Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

                  • minimum (integer) --

                    The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

                  • type (string) --

                    The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

              • additionalAnalyses (string) --

                An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

                The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

            • custom (dict) --

              Analysis rule type that enables custom SQL queries on a configured table.

              • allowedAnalyses (list) --

                The ARN of the analysis templates that are allowed by the custom analysis rule.

                • (string) --

              • allowedAnalysisProviders (list) --

                The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

                • (string) --

              • additionalAnalyses (string) --

                An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

              • disallowedOutputColumns (list) --

                A list of columns that aren't allowed to be shown in the query output.

                • (string) --

              • differentialPrivacy (dict) --

                The differential privacy configuration.

                • columns (list) --

                  The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                  • (dict) --

                    Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                    • name (string) --

                      The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

            • idMappingTable (dict) --

              The ID mapping table.

              • joinColumns (list) --

                The columns that query runners are allowed to use in an INNER JOIN statement.

                • (string) --

              • queryConstraints (list) --

                The query constraints of the analysis rule ID mapping table.

                • (dict) --

                  Provides any necessary query constraint information.

                  • requireOverlap (dict) --

                    An array of column names that specifies which columns are required in the JOIN statement.

                    • columns (list) --

                      The columns that are required to overlap.

                      • (string) --

              • dimensionColumns (list) --

                The columns that query runners are allowed to select, group by, or filter by.

                • (string) --

    • errors (list) --

      Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved.

      • (dict) --

        An error that describes why a schema could not be fetched.

        • name (string) --

          An error name for the error.

        • type (string) --

          The analysis rule type.

        • code (string) --

          An error code for the error.

        • message (string) --

          A description of why the call failed.

CreateConfiguredTableAnalysisRule (updated) Link ¶
Changes (request, response)
Request
{'analysisRulePolicy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED'},
                               'custom': {'additionalAnalyses': 'ALLOWED | '
                                                                'REQUIRED | '
                                                                'NOT_ALLOWED',
                                          'disallowedOutputColumns': ['string']},
                               'list': {'additionalAnalyses': 'ALLOWED | '
                                                              'REQUIRED | '
                                                              'NOT_ALLOWED'}}}}
Response
{'analysisRule': {'policy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                          '| '
                                                                          'REQUIRED '
                                                                          '| '
                                                                          'NOT_ALLOWED'},
                                    'custom': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED',
                                               'disallowedOutputColumns': ['string']},
                                    'list': {'additionalAnalyses': 'ALLOWED | '
                                                                   'REQUIRED | '
                                                                   'NOT_ALLOWED'}}}}}

Creates a new analysis rule for a configured table. Currently, only one analysis rule can be created for a given configured table.

See also: AWS API Documentation

Request Syntax

client.create_configured_table_analysis_rule(
    configuredTableIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM',
    analysisRulePolicy={
        'v1': {
            'list': {
                'joinColumns': [
                    'string',
                ],
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'listColumns': [
                    'string',
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
            },
            'aggregation': {
                'aggregateColumns': [
                    {
                        'columnNames': [
                            'string',
                        ],
                        'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                    },
                ],
                'joinColumns': [
                    'string',
                ],
                'joinRequired': 'QUERY_RUNNER',
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'dimensionColumns': [
                    'string',
                ],
                'scalarFunctions': [
                    'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                ],
                'outputConstraints': [
                    {
                        'columnName': 'string',
                        'minimum': 123,
                        'type': 'COUNT_DISTINCT'
                    },
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
            },
            'custom': {
                'allowedAnalyses': [
                    'string',
                ],
                'allowedAnalysisProviders': [
                    'string',
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                'disallowedOutputColumns': [
                    'string',
                ],
                'differentialPrivacy': {
                    'columns': [
                        {
                            'name': 'string'
                        },
                    ]
                }
            }
        }
    }
)
type configuredTableIdentifier:

string

param configuredTableIdentifier:

[REQUIRED]

The identifier for the configured table to create the analysis rule for. Currently accepts the configured table ID.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The type of analysis rule.

type analysisRulePolicy:

dict

param analysisRulePolicy:

[REQUIRED]

The analysis rule policy that was created for the configured table.

  • v1 (dict) --

    Controls on the query specifications that can be run on a configured table.

    • list (dict) --

      Analysis rule type that enables only list queries on a configured table.

      • joinColumns (list) -- [REQUIRED]

        Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

        • (string) --

      • allowedJoinOperators (list) --

        The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

        • (string) --

      • listColumns (list) -- [REQUIRED]

        Columns that can be listed in the output.

        • (string) --

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

    • aggregation (dict) --

      Analysis rule type that enables only aggregation queries on a configured table.

      • aggregateColumns (list) -- [REQUIRED]

        The columns that query runners are allowed to use in aggregation queries.

        • (dict) --

          Column in configured table that can be used in aggregate function in query.

          • columnNames (list) -- [REQUIRED]

            Column names in configured table of aggregate columns.

            • (string) --

          • function (string) -- [REQUIRED]

            Aggregation function that can be applied to aggregate column in query.

      • joinColumns (list) -- [REQUIRED]

        Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

        • (string) --

      • joinRequired (string) --

        Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

      • allowedJoinOperators (list) --

        Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

        • (string) --

      • dimensionColumns (list) -- [REQUIRED]

        The columns that query runners are allowed to select, group by, or filter by.

        • (string) --

      • scalarFunctions (list) -- [REQUIRED]

        Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

        • (string) --

      • outputConstraints (list) -- [REQUIRED]

        Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

        • (dict) --

          Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

          • columnName (string) -- [REQUIRED]

            Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

          • minimum (integer) -- [REQUIRED]

            The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

          • type (string) -- [REQUIRED]

            The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

        The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

    • custom (dict) --

      A type of analysis rule that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

      • allowedAnalyses (list) -- [REQUIRED]

        The ARN of the analysis templates that are allowed by the custom analysis rule.

        • (string) --

      • allowedAnalysisProviders (list) --

        The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

        • (string) --

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

      • disallowedOutputColumns (list) --

        A list of columns that aren't allowed to be shown in the query output.

        • (string) --

      • differentialPrivacy (dict) --

        The differential privacy configuration.

        • columns (list) -- [REQUIRED]

          The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

          • (dict) --

            Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

            • name (string) -- [REQUIRED]

              The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'joinColumns': [
                        'string',
                    ],
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'listColumns': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                    'disallowedOutputColumns': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': 'string'
                            },
                        ]
                    }
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The analysis rule that was created for the configured table.

      • configuredTableId (string) --

        The unique ID for the configured table.

      • configuredTableArn (string) --

        The unique ARN for the configured table.

      • policy (dict) --

        The policy that controls SQL query rules.

        • v1 (dict) --

          Controls on the query specifications that can be run on a configured table.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • joinColumns (list) --

              Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

              • (string) --

            • allowedJoinOperators (list) --

              The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • listColumns (list) --

              Columns that can be listed in the output.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • aggregateColumns (list) --

              The columns that query runners are allowed to use in aggregation queries.

              • (dict) --

                Column in configured table that can be used in aggregate function in query.

                • columnNames (list) --

                  Column names in configured table of aggregate columns.

                  • (string) --

                • function (string) --

                  Aggregation function that can be applied to aggregate column in query.

            • joinColumns (list) --

              Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

              • (string) --

            • joinRequired (string) --

              Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

            • allowedJoinOperators (list) --

              Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • dimensionColumns (list) --

              The columns that query runners are allowed to select, group by, or filter by.

              • (string) --

            • scalarFunctions (list) --

              Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

              • (string) --

            • outputConstraints (list) --

              Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

              • (dict) --

                Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

                • columnName (string) --

                  Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

                • minimum (integer) --

                  The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

                • type (string) --

                  The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

              The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

          • custom (dict) --

            A type of analysis rule that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedAnalyses (list) --

              The ARN of the analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

              The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

            • disallowedOutputColumns (list) --

              A list of columns that aren't allowed to be shown in the query output.

              • (string) --

            • differentialPrivacy (dict) --

              The differential privacy configuration.

              • columns (list) --

                The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                • (dict) --

                  Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                  • name (string) --

                    The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

      • type (string) --

        The type of configured table analysis rule.

      • createTime (datetime) --

        The time the configured table analysis rule was created.

      • updateTime (datetime) --

        The time the configured table analysis rule was last updated.

CreateConfiguredTableAssociation (updated) Link ¶
Changes (response)
{'configuredTableAssociation': {'analysisRuleTypes': ['AGGREGATION | LIST | '
                                                      'CUSTOM']}}

Creates a configured table association. A configured table association links a configured table with a collaboration.

See also: AWS API Documentation

Request Syntax

client.create_configured_table_association(
    name='string',
    description='string',
    membershipIdentifier='string',
    configuredTableIdentifier='string',
    roleArn='string',
    tags={
        'string': 'string'
    }
)
type name:

string

param name:

[REQUIRED]

The name of the configured table association. This name is used to query the underlying configured table.

type description:

string

param description:

A description for the configured table association.

type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The configured table is associated to the collaboration that this membership belongs to. Currently accepts a membership ID.

type configuredTableIdentifier:

string

param configuredTableIdentifier:

[REQUIRED]

A unique identifier for the configured table to be associated to. Currently accepts a configured table ID.

type roleArn:

string

param roleArn:

[REQUIRED]

The service will assume this role to access catalog metadata and query the table.

type tags:

dict

param tags:

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) --

rtype:

dict

returns:

Response Syntax

{
    'configuredTableAssociation': {
        'arn': 'string',
        'id': 'string',
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'roleArn': 'string',
        'name': 'string',
        'description': 'string',
        'analysisRuleTypes': [
            'AGGREGATION'|'LIST'|'CUSTOM',
        ],
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredTableAssociation (dict) --

      The configured table association.

      • arn (string) --

        The unique ARN for the configured table association.

      • id (string) --

        The unique ID for the configured table association.

      • configuredTableId (string) --

        The unique ID for the configured table that the association refers to.

      • configuredTableArn (string) --

        The unique ARN for the configured table that the association refers to.

      • membershipId (string) --

        The unique ID for the membership this configured table association belongs to.

      • membershipArn (string) --

        The unique ARN for the membership this configured table association belongs to.

      • roleArn (string) --

        The service will assume this role to access catalog metadata and query the table.

      • name (string) --

        The name of the configured table association, in lowercase. The table is identified by this name when running protected queries against the underlying data.

      • description (string) --

        A description of the configured table association.

      • analysisRuleTypes (list) --

        The analysis rule types for the configured table association.

        • (string) --

      • createTime (datetime) --

        The time the configured table association was created.

      • updateTime (datetime) --

        The time the configured table association was last updated.

GetConfiguredTableAnalysisRule (updated) Link ¶
Changes (response)
{'analysisRule': {'policy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                          '| '
                                                                          'REQUIRED '
                                                                          '| '
                                                                          'NOT_ALLOWED'},
                                    'custom': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED',
                                               'disallowedOutputColumns': ['string']},
                                    'list': {'additionalAnalyses': 'ALLOWED | '
                                                                   'REQUIRED | '
                                                                   'NOT_ALLOWED'}}}}}

Retrieves a configured table analysis rule.

See also: AWS API Documentation

Request Syntax

client.get_configured_table_analysis_rule(
    configuredTableIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM'
)
type configuredTableIdentifier:

string

param configuredTableIdentifier:

[REQUIRED]

The unique identifier for the configured table to retrieve. Currently accepts the configured table ID.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The analysis rule to be retrieved. Configured table analysis rules are uniquely identified by their configured table identifier and analysis rule type.

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'joinColumns': [
                        'string',
                    ],
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'listColumns': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                    'disallowedOutputColumns': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': 'string'
                            },
                        ]
                    }
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The entire analysis rule output.

      • configuredTableId (string) --

        The unique ID for the configured table.

      • configuredTableArn (string) --

        The unique ARN for the configured table.

      • policy (dict) --

        The policy that controls SQL query rules.

        • v1 (dict) --

          Controls on the query specifications that can be run on a configured table.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • joinColumns (list) --

              Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

              • (string) --

            • allowedJoinOperators (list) --

              The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • listColumns (list) --

              Columns that can be listed in the output.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • aggregateColumns (list) --

              The columns that query runners are allowed to use in aggregation queries.

              • (dict) --

                Column in configured table that can be used in aggregate function in query.

                • columnNames (list) --

                  Column names in configured table of aggregate columns.

                  • (string) --

                • function (string) --

                  Aggregation function that can be applied to aggregate column in query.

            • joinColumns (list) --

              Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

              • (string) --

            • joinRequired (string) --

              Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

            • allowedJoinOperators (list) --

              Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • dimensionColumns (list) --

              The columns that query runners are allowed to select, group by, or filter by.

              • (string) --

            • scalarFunctions (list) --

              Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

              • (string) --

            • outputConstraints (list) --

              Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

              • (dict) --

                Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

                • columnName (string) --

                  Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

                • minimum (integer) --

                  The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

                • type (string) --

                  The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

              The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

          • custom (dict) --

            A type of analysis rule that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedAnalyses (list) --

              The ARN of the analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

              The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

            • disallowedOutputColumns (list) --

              A list of columns that aren't allowed to be shown in the query output.

              • (string) --

            • differentialPrivacy (dict) --

              The differential privacy configuration.

              • columns (list) --

                The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                • (dict) --

                  Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                  • name (string) --

                    The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

      • type (string) --

        The type of configured table analysis rule.

      • createTime (datetime) --

        The time the configured table analysis rule was created.

      • updateTime (datetime) --

        The time the configured table analysis rule was last updated.

GetConfiguredTableAssociation (updated) Link ¶
Changes (response)
{'configuredTableAssociation': {'analysisRuleTypes': ['AGGREGATION | LIST | '
                                                      'CUSTOM']}}

Retrieves a configured table association.

See also: AWS API Documentation

Request Syntax

client.get_configured_table_association(
    configuredTableAssociationIdentifier='string',
    membershipIdentifier='string'
)
type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The unique ID for the configured table association to retrieve. Currently accepts the configured table ID.

type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership that the configured table association belongs to. Currently accepts the membership ID.

rtype:

dict

returns:

Response Syntax

{
    'configuredTableAssociation': {
        'arn': 'string',
        'id': 'string',
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'roleArn': 'string',
        'name': 'string',
        'description': 'string',
        'analysisRuleTypes': [
            'AGGREGATION'|'LIST'|'CUSTOM',
        ],
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredTableAssociation (dict) --

      The entire configured table association object.

      • arn (string) --

        The unique ARN for the configured table association.

      • id (string) --

        The unique ID for the configured table association.

      • configuredTableId (string) --

        The unique ID for the configured table that the association refers to.

      • configuredTableArn (string) --

        The unique ARN for the configured table that the association refers to.

      • membershipId (string) --

        The unique ID for the membership this configured table association belongs to.

      • membershipArn (string) --

        The unique ARN for the membership this configured table association belongs to.

      • roleArn (string) --

        The service will assume this role to access catalog metadata and query the table.

      • name (string) --

        The name of the configured table association, in lowercase. The table is identified by this name when running protected queries against the underlying data.

      • description (string) --

        A description of the configured table association.

      • analysisRuleTypes (list) --

        The analysis rule types for the configured table association.

        • (string) --

      • createTime (datetime) --

        The time the configured table association was created.

      • updateTime (datetime) --

        The time the configured table association was last updated.

GetProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'resultConfiguration': {'outputConfiguration': {'member': {'accountId': 'string'}}}}}

Returns query processing metadata.

See also: AWS API Documentation

Request Syntax

client.get_protected_query(
    membershipIdentifier='string',
    protectedQueryIdentifier='string'
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

The identifier for a membership in a protected query instance.

type protectedQueryIdentifier:

string

param protectedQueryIdentifier:

[REQUIRED]

The identifier for a protected query instance.

rtype:

dict

returns:

Response Syntax

{
    'protectedQuery': {
        'id': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'sqlParameters': {
            'queryString': 'string',
            'analysisTemplateArn': 'string',
            'parameters': {
                'string': 'string'
            }
        },
        'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
        'resultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                },
                'member': {
                    'accountId': 'string'
                }
            }
        },
        'statistics': {
            'totalDurationInMillis': 123
        },
        'result': {
            'output': {
                's3': {
                    'location': 'string'
                },
                'memberList': [
                    {
                        'accountId': 'string'
                    },
                ]
            }
        },
        'error': {
            'message': 'string',
            'code': 'string'
        },
        'differentialPrivacy': {
            'sensitivityParameters': [
                {
                    'aggregationType': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                    'aggregationExpression': 'string',
                    'userContributionLimit': 123,
                    'minColumnValue': ...,
                    'maxColumnValue': ...
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • protectedQuery (dict) --

      The query processing metadata.

      • id (string) --

        The identifier for a protected query instance.

      • membershipId (string) --

        The identifier for the membership.

      • membershipArn (string) --

        The ARN of the membership.

      • createTime (datetime) --

        The time at which the protected query was created.

      • sqlParameters (dict) --

        The protected query SQL parameters.

        • queryString (string) --

          The query string to be submitted.

        • analysisTemplateArn (string) --

          The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

        • parameters (dict) --

          The protected query SQL parameters.

          • (string) --

            • (string) --

      • status (string) --

        The status of the query.

      • resultConfiguration (dict) --

        Contains any details needed to write the query results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Required configuration for a protected query with an s3 output type.

            • resultFormat (string) --

              Intended file format of the result.

            • bucket (string) --

              The S3 bucket to unload the protected query results.

            • keyPrefix (string) --

              The S3 prefix to unload the protected query results.

          • member (dict) --

            Required configuration for a protected query with a member output type.

            • accountId (string) --

              The unique identifier for the account.

      • statistics (dict) --

        Statistics about protected query execution.

        • totalDurationInMillis (integer) --

          The duration of the protected query, from creation until query completion.

      • result (dict) --

        The result of the protected query.

        • output (dict) --

          The output of the protected query.

          • s3 (dict) --

            If present, the output for a protected query with an S3 output type.

            • location (string) --

              The S3 location of the result.

          • memberList (list) --

            The list of member Amazon Web Services account(s) that received the results of the query.

            • (dict) --

              Details about the member who received the query result.

              • accountId (string) --

                The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.

      • error (dict) --

        An error thrown by the protected query.

        • message (string) --

          A description of why the query failed.

        • code (string) --

          An error code for the error.

      • differentialPrivacy (dict) --

        The sensitivity parameters of the differential privacy results of the protected query.

        • sensitivityParameters (list) --

          Provides the sensitivity parameters that you can use to better understand the total amount of noise in query results.

          • (dict) --

            Provides the sensitivity parameters.

            • aggregationType (string) --

              The type of aggregation function that was run.

            • aggregationExpression (string) --

              The aggregation expression that was run.

            • userContributionLimit (integer) --

              The maximum number of rows contributed by a user in a SQL query.

            • minColumnValue (float) --

              The lower bound of the aggregation expression.

            • maxColumnValue (float) --

              The upper bound of the aggregation expression.

GetSchema (updated) Link ¶
Changes (response)
{'schema': {'schemaStatusDetails': {'analysisType': 'DIRECT_ANALYSIS | '
                                                    'ADDITIONAL_ANALYSIS',
                                    'reasons': {'code': {'ADDITIONAL_ANALYSES_NOT_ALLOWED',
                                                         'ADDITIONAL_ANALYSES_NOT_CONFIGURED',
                                                         'ANALYSIS_RULE_TYPES_NOT_COMPATIBLE',
                                                         'COLLABORATION_ANALYSIS_RULE_NOT_CONFIGURED',
                                                         'RESULT_RECEIVERS_NOT_ALLOWED',
                                                         'RESULT_RECEIVERS_NOT_CONFIGURED'}}}}}

Retrieves the schema for a relation within a collaboration.

See also: AWS API Documentation

Request Syntax

client.get_schema(
    collaborationIdentifier='string',
    name='string'
)
type collaborationIdentifier:

string

param collaborationIdentifier:

[REQUIRED]

A unique identifier for the collaboration that the schema belongs to. Currently accepts a collaboration ID.

type name:

string

param name:

[REQUIRED]

The name of the relation to retrieve the schema for.

rtype:

dict

returns:

Response Syntax

{
    'schema': {
        'columns': [
            {
                'name': 'string',
                'type': 'string'
            },
        ],
        'partitionKeys': [
            {
                'name': 'string',
                'type': 'string'
            },
        ],
        'analysisRuleTypes': [
            'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
        ],
        'analysisMethod': 'DIRECT_QUERY',
        'creatorAccountId': 'string',
        'name': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'description': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'type': 'TABLE'|'ID_MAPPING_TABLE',
        'schemaStatusDetails': [
            {
                'status': 'READY'|'NOT_READY',
                'reasons': [
                    {
                        'code': 'ANALYSIS_RULE_MISSING'|'ANALYSIS_TEMPLATES_NOT_CONFIGURED'|'ANALYSIS_PROVIDERS_NOT_CONFIGURED'|'DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED'|'ID_MAPPING_TABLE_NOT_POPULATED'|'COLLABORATION_ANALYSIS_RULE_NOT_CONFIGURED'|'ADDITIONAL_ANALYSES_NOT_CONFIGURED'|'RESULT_RECEIVERS_NOT_CONFIGURED'|'ADDITIONAL_ANALYSES_NOT_ALLOWED'|'RESULT_RECEIVERS_NOT_ALLOWED'|'ANALYSIS_RULE_TYPES_NOT_COMPATIBLE',
                        'message': 'string'
                    },
                ],
                'analysisRuleType': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
                'configurations': [
                    'DIFFERENTIAL_PRIVACY',
                ],
                'analysisType': 'DIRECT_ANALYSIS'|'ADDITIONAL_ANALYSIS'
            },
        ],
        'schemaTypeProperties': {
            'idMappingTable': {
                'idMappingTableInputSource': [
                    {
                        'idNamespaceAssociationId': 'string',
                        'type': 'SOURCE'|'TARGET'
                    },
                ]
            }
        }
    }
}

Response Structure

  • (dict) --

    • schema (dict) --

      The entire schema object.

      • columns (list) --

        The columns for the relation this schema represents.

        • (dict) --

          A column within a schema relation, derived from the underlying Glue table.

          • name (string) --

            The name of the column.

          • type (string) --

            The type of the column.

      • partitionKeys (list) --

        The partition keys for the dataset underlying this schema.

        • (dict) --

          A column within a schema relation, derived from the underlying Glue table.

          • name (string) --

            The name of the column.

          • type (string) --

            The type of the column.

      • analysisRuleTypes (list) --

        The analysis rule types associated with the schema. Currently, only one entry is present.

        • (string) --

      • analysisMethod (string) --

        The analysis method for the schema. The only valid value is currently DIRECT_QUERY.

      • creatorAccountId (string) --

        The unique account ID for the Amazon Web Services account that owns the schema.

      • name (string) --

        A name for the schema. The schema relation is referred to by this name when queried by a protected query.

      • collaborationId (string) --

        The unique ID for the collaboration that the schema belongs to.

      • collaborationArn (string) --

        The unique ARN for the collaboration that the schema belongs to.

      • description (string) --

        A description for the schema.

      • createTime (datetime) --

        The time the schema was created.

      • updateTime (datetime) --

        The time the schema was last updated.

      • type (string) --

        The type of schema. The only valid value is currently TABLE.

      • schemaStatusDetails (list) --

        Details about the status of the schema. Currently, only one entry is present.

        • (dict) --

          Information about the schema status.

          A status of READY means that based on the schema analysis rule, queries of the given analysis rule type are properly configured to run queries on this schema.

          • status (string) --

            The status of the schema, indicating if it is ready to query.

          • reasons (list) --

            The reasons why the schema status is set to its current state.

            • (dict) --

              A reason why the schema status is set to its current value.

              • code (string) --

                The schema status reason code.

              • message (string) --

                An explanation of the schema status reason code.

          • analysisRuleType (string) --

            The analysis rule type for which the schema status has been evaluated.

          • configurations (list) --

            The configuration details of the schema analysis rule for the given type.

            • (string) --

          • analysisType (string) --

            The type of analysis that can be performed on the schema.

            A schema can have an analysisType of DIRECT_ANALYSIS, ADDITIONAL_ANALYSIS_FOR_AUDIENCE_GENERATION, or both.

      • schemaTypeProperties (dict) --

        The schema type properties.

        • idMappingTable (dict) --

          The ID mapping table for the schema type properties.

          • idMappingTableInputSource (list) --

            Defines which ID namespace associations are used to create the ID mapping table.

            • (dict) --

              The input source of the ID mapping table.

              • idNamespaceAssociationId (string) --

                The unique identifier of the ID namespace association.

              • type (string) --

                The type of the input source of the ID mapping table.

GetSchemaAnalysisRule (updated) Link ¶
Changes (response)
{'analysisRule': {'policy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                          '| '
                                                                          'REQUIRED '
                                                                          '| '
                                                                          'NOT_ALLOWED'},
                                    'custom': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED',
                                               'disallowedOutputColumns': ['string']},
                                    'list': {'additionalAnalyses': 'ALLOWED | '
                                                                   'REQUIRED | '
                                                                   'NOT_ALLOWED'}}}}}

Retrieves a schema analysis rule.

See also: AWS API Documentation

Request Syntax

client.get_schema_analysis_rule(
    collaborationIdentifier='string',
    name='string',
    type='AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE'
)
type collaborationIdentifier:

string

param collaborationIdentifier:

[REQUIRED]

A unique identifier for the collaboration that the schema belongs to. Currently accepts a collaboration ID.

type name:

string

param name:

[REQUIRED]

The name of the schema to retrieve the analysis rule for.

type type:

string

param type:

[REQUIRED]

The type of the schema analysis rule to retrieve. Schema analysis rules are uniquely identified by a combination of the collaboration, the schema name, and their type.

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'collaborationId': 'string',
        'type': 'AGGREGATION'|'LIST'|'CUSTOM'|'ID_MAPPING_TABLE',
        'name': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'policy': {
            'v1': {
                'list': {
                    'joinColumns': [
                        'string',
                    ],
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'listColumns': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                    'disallowedOutputColumns': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': 'string'
                            },
                        ]
                    }
                },
                'idMappingTable': {
                    'joinColumns': [
                        'string',
                    ],
                    'queryConstraints': [
                        {
                            'requireOverlap': {
                                'columns': [
                                    'string',
                                ]
                            }
                        },
                    ],
                    'dimensionColumns': [
                        'string',
                    ]
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      A specification about how data from the configured table can be used.

      • collaborationId (string) --

        The unique ID for the associated collaboration.

      • type (string) --

        The type of analysis rule.

      • name (string) --

        The name for the analysis rule.

      • createTime (datetime) --

        The time the analysis rule was created.

      • updateTime (datetime) --

        The time the analysis rule was last updated.

      • policy (dict) --

        A policy that describes the associated data usage limitations.

        • v1 (dict) --

          Controls on the query specifications that can be run on configured table.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • joinColumns (list) --

              Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

              • (string) --

            • allowedJoinOperators (list) --

              The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • listColumns (list) --

              Columns that can be listed in the output.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • aggregateColumns (list) --

              The columns that query runners are allowed to use in aggregation queries.

              • (dict) --

                Column in configured table that can be used in aggregate function in query.

                • columnNames (list) --

                  Column names in configured table of aggregate columns.

                  • (string) --

                • function (string) --

                  Aggregation function that can be applied to aggregate column in query.

            • joinColumns (list) --

              Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

              • (string) --

            • joinRequired (string) --

              Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

            • allowedJoinOperators (list) --

              Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • dimensionColumns (list) --

              The columns that query runners are allowed to select, group by, or filter by.

              • (string) --

            • scalarFunctions (list) --

              Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

              • (string) --

            • outputConstraints (list) --

              Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

              • (dict) --

                Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

                • columnName (string) --

                  Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

                • minimum (integer) --

                  The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

                • type (string) --

                  The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

              The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

          • custom (dict) --

            Analysis rule type that enables custom SQL queries on a configured table.

            • allowedAnalyses (list) --

              The ARN of the analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

              The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

            • disallowedOutputColumns (list) --

              A list of columns that aren't allowed to be shown in the query output.

              • (string) --

            • differentialPrivacy (dict) --

              The differential privacy configuration.

              • columns (list) --

                The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                • (dict) --

                  Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                  • name (string) --

                    The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

          • idMappingTable (dict) --

            The ID mapping table.

            • joinColumns (list) --

              The columns that query runners are allowed to use in an INNER JOIN statement.

              • (string) --

            • queryConstraints (list) --

              The query constraints of the analysis rule ID mapping table.

              • (dict) --

                Provides any necessary query constraint information.

                • requireOverlap (dict) --

                  An array of column names that specifies which columns are required in the JOIN statement.

                  • columns (list) --

                    The columns that are required to overlap.

                    • (string) --

            • dimensionColumns (list) --

              The columns that query runners are allowed to select, group by, or filter by.

              • (string) --

ListProtectedQueries (updated) Link ¶
Changes (response)
{'protectedQueries': {'receiverConfigurations': [{'analysisType': 'DIRECT_ANALYSIS '
                                                                  '| '
                                                                  'ADDITIONAL_ANALYSIS',
                                                  'configurationDetails': {'directAnalysisConfigurationDetails': {'receiverAccountIds': ['string']}}}]}}

Lists protected queries, sorted by the most recent query.

See also: AWS API Documentation

Request Syntax

client.list_protected_queries(
    membershipIdentifier='string',
    status='SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
    nextToken='string',
    maxResults=123
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

The identifier for the membership in the collaboration.

type status:

string

param status:

A filter on the status of the protected query.

type nextToken:

string

param nextToken:

The token value retrieved from a previous call to access the next page of results.

type maxResults:

integer

param maxResults:

The maximum size of the results that is returned per call. Service chooses a default if it has not been set. Service can return a nextToken even if the maximum results has not been met.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'protectedQueries': [
        {
            'id': 'string',
            'membershipId': 'string',
            'membershipArn': 'string',
            'createTime': datetime(2015, 1, 1),
            'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
            'receiverConfigurations': [
                {
                    'analysisType': 'DIRECT_ANALYSIS'|'ADDITIONAL_ANALYSIS',
                    'configurationDetails': {
                        'directAnalysisConfigurationDetails': {
                            'receiverAccountIds': [
                                'string',
                            ]
                        }
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The token value retrieved from a previous call to access the next page of results.

    • protectedQueries (list) --

      A list of protected queries.

      • (dict) --

        The protected query summary for the objects listed by the request.

        • id (string) --

          The unique ID of the protected query.

        • membershipId (string) --

          The unique ID for the membership that initiated the protected query.

        • membershipArn (string) --

          The unique ARN for the membership that initiated the protected query.

        • createTime (datetime) --

          The time the protected query was created.

        • status (string) --

          The status of the protected query. Value values are SUBMITTED, STARTED, CANCELLED, CANCELLING, FAILED, SUCCESS, TIMED_OUT.

        • receiverConfigurations (list) --

          The receiver configuration.

          • (dict) --

            The receiver configuration for a protected query.

            • analysisType (string) --

              The type of analysis for the protected query. The results of the query can be analyzed directly ( DIRECT_ANALYSIS) or used as input into additional analyses ( ADDITIONAL_ANALYSIS), such as a query that is a seed for a lookalike ML model.

            • configurationDetails (dict) --

              The configuration details of the receiver configuration.

              • directAnalysisConfigurationDetails (dict) --

                The direct analysis configuration details.

                • receiverAccountIds (list) --

                  The account IDs for the member who received the results of a protected query.

                  • (string) --

StartProtectedQuery (updated) Link ¶
Changes (request, response)
Request
{'resultConfiguration': {'outputConfiguration': {'member': {'accountId': 'string'}}}}
Response
{'protectedQuery': {'resultConfiguration': {'outputConfiguration': {'member': {'accountId': 'string'}}}}}

Creates a protected query that is started by Clean Rooms.

See also: AWS API Documentation

Request Syntax

client.start_protected_query(
    type='SQL',
    membershipIdentifier='string',
    sqlParameters={
        'queryString': 'string',
        'analysisTemplateArn': 'string',
        'parameters': {
            'string': 'string'
        }
    },
    resultConfiguration={
        'outputConfiguration': {
            's3': {
                'resultFormat': 'CSV'|'PARQUET',
                'bucket': 'string',
                'keyPrefix': 'string'
            },
            'member': {
                'accountId': 'string'
            }
        }
    }
)
type type:

string

param type:

[REQUIRED]

The type of the protected query to be started.

type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

A unique identifier for the membership to run this query against. Currently accepts a membership ID.

type sqlParameters:

dict

param sqlParameters:

[REQUIRED]

The protected SQL query parameters.

  • queryString (string) --

    The query string to be submitted.

  • analysisTemplateArn (string) --

    The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

  • parameters (dict) --

    The protected query SQL parameters.

    • (string) --

      • (string) --

type resultConfiguration:

dict

param resultConfiguration:

The details needed to write the query results.

  • outputConfiguration (dict) -- [REQUIRED]

    Configuration for protected query results.

    • s3 (dict) --

      Required configuration for a protected query with an s3 output type.

      • resultFormat (string) -- [REQUIRED]

        Intended file format of the result.

      • bucket (string) -- [REQUIRED]

        The S3 bucket to unload the protected query results.

      • keyPrefix (string) --

        The S3 prefix to unload the protected query results.

    • member (dict) --

      Required configuration for a protected query with a member output type.

      • accountId (string) -- [REQUIRED]

        The unique identifier for the account.

rtype:

dict

returns:

Response Syntax

{
    'protectedQuery': {
        'id': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'sqlParameters': {
            'queryString': 'string',
            'analysisTemplateArn': 'string',
            'parameters': {
                'string': 'string'
            }
        },
        'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
        'resultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                },
                'member': {
                    'accountId': 'string'
                }
            }
        },
        'statistics': {
            'totalDurationInMillis': 123
        },
        'result': {
            'output': {
                's3': {
                    'location': 'string'
                },
                'memberList': [
                    {
                        'accountId': 'string'
                    },
                ]
            }
        },
        'error': {
            'message': 'string',
            'code': 'string'
        },
        'differentialPrivacy': {
            'sensitivityParameters': [
                {
                    'aggregationType': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                    'aggregationExpression': 'string',
                    'userContributionLimit': 123,
                    'minColumnValue': ...,
                    'maxColumnValue': ...
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • protectedQuery (dict) --

      The protected query.

      • id (string) --

        The identifier for a protected query instance.

      • membershipId (string) --

        The identifier for the membership.

      • membershipArn (string) --

        The ARN of the membership.

      • createTime (datetime) --

        The time at which the protected query was created.

      • sqlParameters (dict) --

        The protected query SQL parameters.

        • queryString (string) --

          The query string to be submitted.

        • analysisTemplateArn (string) --

          The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

        • parameters (dict) --

          The protected query SQL parameters.

          • (string) --

            • (string) --

      • status (string) --

        The status of the query.

      • resultConfiguration (dict) --

        Contains any details needed to write the query results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Required configuration for a protected query with an s3 output type.

            • resultFormat (string) --

              Intended file format of the result.

            • bucket (string) --

              The S3 bucket to unload the protected query results.

            • keyPrefix (string) --

              The S3 prefix to unload the protected query results.

          • member (dict) --

            Required configuration for a protected query with a member output type.

            • accountId (string) --

              The unique identifier for the account.

      • statistics (dict) --

        Statistics about protected query execution.

        • totalDurationInMillis (integer) --

          The duration of the protected query, from creation until query completion.

      • result (dict) --

        The result of the protected query.

        • output (dict) --

          The output of the protected query.

          • s3 (dict) --

            If present, the output for a protected query with an S3 output type.

            • location (string) --

              The S3 location of the result.

          • memberList (list) --

            The list of member Amazon Web Services account(s) that received the results of the query.

            • (dict) --

              Details about the member who received the query result.

              • accountId (string) --

                The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.

      • error (dict) --

        An error thrown by the protected query.

        • message (string) --

          A description of why the query failed.

        • code (string) --

          An error code for the error.

      • differentialPrivacy (dict) --

        The sensitivity parameters of the differential privacy results of the protected query.

        • sensitivityParameters (list) --

          Provides the sensitivity parameters that you can use to better understand the total amount of noise in query results.

          • (dict) --

            Provides the sensitivity parameters.

            • aggregationType (string) --

              The type of aggregation function that was run.

            • aggregationExpression (string) --

              The aggregation expression that was run.

            • userContributionLimit (integer) --

              The maximum number of rows contributed by a user in a SQL query.

            • minColumnValue (float) --

              The lower bound of the aggregation expression.

            • maxColumnValue (float) --

              The upper bound of the aggregation expression.

UpdateConfiguredTableAnalysisRule (updated) Link ¶
Changes (request, response)
Request
{'analysisRulePolicy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED'},
                               'custom': {'additionalAnalyses': 'ALLOWED | '
                                                                'REQUIRED | '
                                                                'NOT_ALLOWED',
                                          'disallowedOutputColumns': ['string']},
                               'list': {'additionalAnalyses': 'ALLOWED | '
                                                              'REQUIRED | '
                                                              'NOT_ALLOWED'}}}}
Response
{'analysisRule': {'policy': {'v1': {'aggregation': {'additionalAnalyses': 'ALLOWED '
                                                                          '| '
                                                                          'REQUIRED '
                                                                          '| '
                                                                          'NOT_ALLOWED'},
                                    'custom': {'additionalAnalyses': 'ALLOWED '
                                                                     '| '
                                                                     'REQUIRED '
                                                                     '| '
                                                                     'NOT_ALLOWED',
                                               'disallowedOutputColumns': ['string']},
                                    'list': {'additionalAnalyses': 'ALLOWED | '
                                                                   'REQUIRED | '
                                                                   'NOT_ALLOWED'}}}}}

Updates a configured table analysis rule.

See also: AWS API Documentation

Request Syntax

client.update_configured_table_analysis_rule(
    configuredTableIdentifier='string',
    analysisRuleType='AGGREGATION'|'LIST'|'CUSTOM',
    analysisRulePolicy={
        'v1': {
            'list': {
                'joinColumns': [
                    'string',
                ],
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'listColumns': [
                    'string',
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
            },
            'aggregation': {
                'aggregateColumns': [
                    {
                        'columnNames': [
                            'string',
                        ],
                        'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                    },
                ],
                'joinColumns': [
                    'string',
                ],
                'joinRequired': 'QUERY_RUNNER',
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'dimensionColumns': [
                    'string',
                ],
                'scalarFunctions': [
                    'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                ],
                'outputConstraints': [
                    {
                        'columnName': 'string',
                        'minimum': 123,
                        'type': 'COUNT_DISTINCT'
                    },
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
            },
            'custom': {
                'allowedAnalyses': [
                    'string',
                ],
                'allowedAnalysisProviders': [
                    'string',
                ],
                'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                'disallowedOutputColumns': [
                    'string',
                ],
                'differentialPrivacy': {
                    'columns': [
                        {
                            'name': 'string'
                        },
                    ]
                }
            }
        }
    }
)
type configuredTableIdentifier:

string

param configuredTableIdentifier:

[REQUIRED]

The unique identifier for the configured table that the analysis rule applies to. Currently accepts the configured table ID.

type analysisRuleType:

string

param analysisRuleType:

[REQUIRED]

The analysis rule type to be updated. Configured table analysis rules are uniquely identified by their configured table identifier and analysis rule type.

type analysisRulePolicy:

dict

param analysisRulePolicy:

[REQUIRED]

The new analysis rule policy for the configured table analysis rule.

  • v1 (dict) --

    Controls on the query specifications that can be run on a configured table.

    • list (dict) --

      Analysis rule type that enables only list queries on a configured table.

      • joinColumns (list) -- [REQUIRED]

        Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

        • (string) --

      • allowedJoinOperators (list) --

        The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

        • (string) --

      • listColumns (list) -- [REQUIRED]

        Columns that can be listed in the output.

        • (string) --

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

    • aggregation (dict) --

      Analysis rule type that enables only aggregation queries on a configured table.

      • aggregateColumns (list) -- [REQUIRED]

        The columns that query runners are allowed to use in aggregation queries.

        • (dict) --

          Column in configured table that can be used in aggregate function in query.

          • columnNames (list) -- [REQUIRED]

            Column names in configured table of aggregate columns.

            • (string) --

          • function (string) -- [REQUIRED]

            Aggregation function that can be applied to aggregate column in query.

      • joinColumns (list) -- [REQUIRED]

        Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

        • (string) --

      • joinRequired (string) --

        Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

      • allowedJoinOperators (list) --

        Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

        • (string) --

      • dimensionColumns (list) -- [REQUIRED]

        The columns that query runners are allowed to select, group by, or filter by.

        • (string) --

      • scalarFunctions (list) -- [REQUIRED]

        Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

        • (string) --

      • outputConstraints (list) -- [REQUIRED]

        Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

        • (dict) --

          Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

          • columnName (string) -- [REQUIRED]

            Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

          • minimum (integer) -- [REQUIRED]

            The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

          • type (string) -- [REQUIRED]

            The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

        The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

    • custom (dict) --

      A type of analysis rule that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

      • allowedAnalyses (list) -- [REQUIRED]

        The ARN of the analysis templates that are allowed by the custom analysis rule.

        • (string) --

      • allowedAnalysisProviders (list) --

        The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

        • (string) --

      • additionalAnalyses (string) --

        An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

      • disallowedOutputColumns (list) --

        A list of columns that aren't allowed to be shown in the query output.

        • (string) --

      • differentialPrivacy (dict) --

        The differential privacy configuration.

        • columns (list) -- [REQUIRED]

          The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

          • (dict) --

            Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

            • name (string) -- [REQUIRED]

              The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

rtype:

dict

returns:

Response Syntax

{
    'analysisRule': {
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'policy': {
            'v1': {
                'list': {
                    'joinColumns': [
                        'string',
                    ],
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'listColumns': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'ABS'|'CAST'|'CEILING'|'COALESCE'|'CONVERT'|'CURRENT_DATE'|'DATEADD'|'EXTRACT'|'FLOOR'|'GETDATE'|'LN'|'LOG'|'LOWER'|'ROUND'|'RTRIM'|'SQRT'|'SUBSTRING'|'TO_CHAR'|'TO_DATE'|'TO_NUMBER'|'TO_TIMESTAMP'|'TRIM'|'TRUNC'|'UPPER',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED'
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'additionalAnalyses': 'ALLOWED'|'REQUIRED'|'NOT_ALLOWED',
                    'disallowedOutputColumns': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': 'string'
                            },
                        ]
                    }
                }
            }
        },
        'type': 'AGGREGATION'|'LIST'|'CUSTOM',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • analysisRule (dict) --

      The entire updated analysis rule.

      • configuredTableId (string) --

        The unique ID for the configured table.

      • configuredTableArn (string) --

        The unique ARN for the configured table.

      • policy (dict) --

        The policy that controls SQL query rules.

        • v1 (dict) --

          Controls on the query specifications that can be run on a configured table.

          • list (dict) --

            Analysis rule type that enables only list queries on a configured table.

            • joinColumns (list) --

              Columns that can be used to join a configured table with the table of the member who can query and other members' configured tables.

              • (string) --

            • allowedJoinOperators (list) --

              The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • listColumns (list) --

              Columns that can be listed in the output.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

          • aggregation (dict) --

            Analysis rule type that enables only aggregation queries on a configured table.

            • aggregateColumns (list) --

              The columns that query runners are allowed to use in aggregation queries.

              • (dict) --

                Column in configured table that can be used in aggregate function in query.

                • columnNames (list) --

                  Column names in configured table of aggregate columns.

                  • (string) --

                • function (string) --

                  Aggregation function that can be applied to aggregate column in query.

            • joinColumns (list) --

              Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.

              • (string) --

            • joinRequired (string) --

              Control that requires member who runs query to do a join with their configured table and/or other configured table in query.

            • allowedJoinOperators (list) --

              Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is AND.

              • (string) --

            • dimensionColumns (list) --

              The columns that query runners are allowed to select, group by, or filter by.

              • (string) --

            • scalarFunctions (list) --

              Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.

              • (string) --

            • outputConstraints (list) --

              Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.

              • (dict) --

                Constraint on query output removing output rows that do not meet a minimum number of distinct values of a specified column.

                • columnName (string) --

                  Column in aggregation constraint for which there must be a minimum number of distinct values in an output row for it to be in the query output.

                • minimum (integer) --

                  The minimum number of distinct values that an output row must be an aggregation of. Minimum threshold of distinct values for a specified column that must exist in an output row for it to be in the query output.

                • type (string) --

                  The type of aggregation the constraint allows. The only valid value is currently COUNT_DISTINCT.

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

              The additionalAnalyses parameter is currently supported for the list analysis rule ( AnalysisRuleList) and the custom analysis rule ( AnalysisRuleCustom).

          • custom (dict) --

            A type of analysis rule that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.

            • allowedAnalyses (list) --

              The ARN of the analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

              The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when allowedAnalyses is ANY_QUERY.

              • (string) --

            • additionalAnalyses (string) --

              An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.

            • disallowedOutputColumns (list) --

              A list of columns that aren't allowed to be shown in the query output.

              • (string) --

            • differentialPrivacy (dict) --

              The differential privacy configuration.

              • columns (list) --

                The name of the column (such as user_id) that contains the unique identifier of your users whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

                • (dict) --

                  Specifies the name of the column that contains the unique identifier of your users, whose privacy you want to protect.

                  • name (string) --

                    The name of the column, such as user_id, that contains the unique identifier of your users, whose privacy you want to protect. If you want to turn on differential privacy for two or more tables in a collaboration, you must configure the same column as the user identifier column in both analysis rules.

      • type (string) --

        The type of configured table analysis rule.

      • createTime (datetime) --

        The time the configured table analysis rule was created.

      • updateTime (datetime) --

        The time the configured table analysis rule was last updated.

UpdateConfiguredTableAssociation (updated) Link ¶
Changes (response)
{'configuredTableAssociation': {'analysisRuleTypes': ['AGGREGATION | LIST | '
                                                      'CUSTOM']}}

Updates a configured table association.

See also: AWS API Documentation

Request Syntax

client.update_configured_table_association(
    configuredTableAssociationIdentifier='string',
    membershipIdentifier='string',
    description='string',
    roleArn='string'
)
type configuredTableAssociationIdentifier:

string

param configuredTableAssociationIdentifier:

[REQUIRED]

The unique identifier for the configured table association to update. Currently accepts the configured table association ID.

type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

The unique ID for the membership that the configured table association belongs to.

type description:

string

param description:

A new description for the configured table association.

type roleArn:

string

param roleArn:

The service will assume this role to access catalog metadata and query the table.

rtype:

dict

returns:

Response Syntax

{
    'configuredTableAssociation': {
        'arn': 'string',
        'id': 'string',
        'configuredTableId': 'string',
        'configuredTableArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'roleArn': 'string',
        'name': 'string',
        'description': 'string',
        'analysisRuleTypes': [
            'AGGREGATION'|'LIST'|'CUSTOM',
        ],
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredTableAssociation (dict) --

      The entire updated configured table association.

      • arn (string) --

        The unique ARN for the configured table association.

      • id (string) --

        The unique ID for the configured table association.

      • configuredTableId (string) --

        The unique ID for the configured table that the association refers to.

      • configuredTableArn (string) --

        The unique ARN for the configured table that the association refers to.

      • membershipId (string) --

        The unique ID for the membership this configured table association belongs to.

      • membershipArn (string) --

        The unique ARN for the membership this configured table association belongs to.

      • roleArn (string) --

        The service will assume this role to access catalog metadata and query the table.

      • name (string) --

        The name of the configured table association, in lowercase. The table is identified by this name when running protected queries against the underlying data.

      • description (string) --

        A description of the configured table association.

      • analysisRuleTypes (list) --

        The analysis rule types for the configured table association.

        • (string) --

      • createTime (datetime) --

        The time the configured table association was created.

      • updateTime (datetime) --

        The time the configured table association was last updated.

UpdateProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'resultConfiguration': {'outputConfiguration': {'member': {'accountId': 'string'}}}}}

Updates the processing of a currently running query.

See also: AWS API Documentation

Request Syntax

client.update_protected_query(
    membershipIdentifier='string',
    protectedQueryIdentifier='string',
    targetStatus='CANCELLED'
)
type membershipIdentifier:

string

param membershipIdentifier:

[REQUIRED]

The identifier for a member of a protected query instance.

type protectedQueryIdentifier:

string

param protectedQueryIdentifier:

[REQUIRED]

The identifier for a protected query instance.

type targetStatus:

string

param targetStatus:

[REQUIRED]

The target status of a query. Used to update the execution status of a currently running query.

rtype:

dict

returns:

Response Syntax

{
    'protectedQuery': {
        'id': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'sqlParameters': {
            'queryString': 'string',
            'analysisTemplateArn': 'string',
            'parameters': {
                'string': 'string'
            }
        },
        'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
        'resultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                },
                'member': {
                    'accountId': 'string'
                }
            }
        },
        'statistics': {
            'totalDurationInMillis': 123
        },
        'result': {
            'output': {
                's3': {
                    'location': 'string'
                },
                'memberList': [
                    {
                        'accountId': 'string'
                    },
                ]
            }
        },
        'error': {
            'message': 'string',
            'code': 'string'
        },
        'differentialPrivacy': {
            'sensitivityParameters': [
                {
                    'aggregationType': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                    'aggregationExpression': 'string',
                    'userContributionLimit': 123,
                    'minColumnValue': ...,
                    'maxColumnValue': ...
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • protectedQuery (dict) --

      The protected query output.

      • id (string) --

        The identifier for a protected query instance.

      • membershipId (string) --

        The identifier for the membership.

      • membershipArn (string) --

        The ARN of the membership.

      • createTime (datetime) --

        The time at which the protected query was created.

      • sqlParameters (dict) --

        The protected query SQL parameters.

        • queryString (string) --

          The query string to be submitted.

        • analysisTemplateArn (string) --

          The Amazon Resource Name (ARN) associated with the analysis template within a collaboration.

        • parameters (dict) --

          The protected query SQL parameters.

          • (string) --

            • (string) --

      • status (string) --

        The status of the query.

      • resultConfiguration (dict) --

        Contains any details needed to write the query results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Required configuration for a protected query with an s3 output type.

            • resultFormat (string) --

              Intended file format of the result.

            • bucket (string) --

              The S3 bucket to unload the protected query results.

            • keyPrefix (string) --

              The S3 prefix to unload the protected query results.

          • member (dict) --

            Required configuration for a protected query with a member output type.

            • accountId (string) --

              The unique identifier for the account.

      • statistics (dict) --

        Statistics about protected query execution.

        • totalDurationInMillis (integer) --

          The duration of the protected query, from creation until query completion.

      • result (dict) --

        The result of the protected query.

        • output (dict) --

          The output of the protected query.

          • s3 (dict) --

            If present, the output for a protected query with an S3 output type.

            • location (string) --

              The S3 location of the result.

          • memberList (list) --

            The list of member Amazon Web Services account(s) that received the results of the query.

            • (dict) --

              Details about the member who received the query result.

              • accountId (string) --

                The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.

      • error (dict) --

        An error thrown by the protected query.

        • message (string) --

          A description of why the query failed.

        • code (string) --

          An error code for the error.

      • differentialPrivacy (dict) --

        The sensitivity parameters of the differential privacy results of the protected query.

        • sensitivityParameters (list) --

          Provides the sensitivity parameters that you can use to better understand the total amount of noise in query results.

          • (dict) --

            Provides the sensitivity parameters.

            • aggregationType (string) --

              The type of aggregation function that was run.

            • aggregationExpression (string) --

              The aggregation expression that was run.

            • userContributionLimit (integer) --

              The maximum number of rows contributed by a user in a SQL query.

            • minColumnValue (float) --

              The lower bound of the aggregation expression.

            • maxColumnValue (float) --

              The upper bound of the aggregation expression.