---
title: "POST /collaborations/{collaborationIdentifier}/batch-schema-analysis-rule"
method: POST
path: "/collaborations/{collaborationIdentifier}/batch-schema-analysis-rule"
---

# POST /collaborations/{collaborationIdentifier}/batch-schema-analysis-rule

`POST /collaborations/{collaborationIdentifier}/batch-schema-analysis-rule`

Retrieves multiple analysis rule schemas.

## Path parameters

- `collaborationIdentifier` string, required

## Request body

- object
  - `schemaAnalysisRuleRequests` SchemaAnalysisRuleRequest[], required — The information that's necessary to retrieve a schema analysis rule.
    - `name` string, required — The name of the analysis rule schema that you are requesting.
    - `type` 'AGGREGATION' | 'LIST' | 'CUSTOM' | 'ID_MAPPING_TABLE', required — The type of analysis rule schema that you are requesting.

## Response `200`

Success

- BatchGetSchemaAnalysisRuleOutput
  - `analysisRules` AnalysisRule[], required — The retrieved list of analysis rules.
    - `collaborationId` string, required — The unique ID for the associated collaboration.
    - `type` 'AGGREGATION' | 'LIST' | 'CUSTOM' | 'ID_MAPPING_TABLE', required — The type of analysis rule.
    - `name` string, required — The name for the analysis rule.
    - `createTime` string, date-time, required — The time the analysis rule was created.
    - `updateTime` string, date-time, required — The time the analysis rule was last updated.
    - `policy` object, required — A policy that describes the associated data usage limitations.
      - `v1` object — Controls on the query specifications that can be run on configured table.
        - `list` object — Analysis rule type that enables only list queries on a configured table.
          - `joinColumns` AnalysisRuleColumnName[], 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.
          - `allowedJoinOperators` JoinOperator[] — The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is <code>AND</code>.
          - `listColumns` AnalysisRuleColumnName[], required — Columns that can be listed in the output.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.
        - `aggregation` object — Analysis rule type that enables only aggregation queries on a configured table.
          - `aggregateColumns` AggregateColumn[], required — The columns that query runners are allowed to use in aggregation queries.
            - `columnNames` AnalysisRuleColumnName[], required — Column names in configured table of aggregate columns.
            - `function` 'SUM' | 'SUM_DISTINCT' | 'COUNT' | 'COUNT_DISTINCT' | 'AVG', required — Aggregation function that can be applied to aggregate column in query.
          - `joinColumns` AnalysisRuleColumnName[], required — Columns in configured table that can be used in join statements and/or as aggregate columns. They can never be outputted directly.
          - `joinRequired` 'QUERY_RUNNER' — Control that requires member who runs query to do a join with their configured table and/or other configured table in query.
          - `allowedJoinOperators` JoinOperator[] — Which logical operators (if any) are to be used in an INNER JOIN match condition. Default is <code>AND</code>.
          - `dimensionColumns` AnalysisRuleColumnName[], required — The columns that query runners are allowed to select, group by, or filter by.
          - `scalarFunctions` ScalarFunctions[], required — Set of scalar functions that are allowed to be used on dimension columns and the output of aggregation of metrics.
          - `outputConstraints` AggregationConstraint[], required — Columns that must meet a specific threshold value (after an aggregation function is applied to it) for each output row to be returned.
            - `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` 'COUNT_DISTINCT', required — The type of aggregation the constraint allows. The only valid value is currently `COUNT_DISTINCT`.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — <p> An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query. </p> <p>The <code>additionalAnalyses</code> parameter is currently supported for the list analysis rule (<code>AnalysisRuleList</code>) and the custom analysis rule (<code>AnalysisRuleCustom</code>).</p>
        - `custom` object — Analysis rule type that enables custom SQL queries on a configured table.
          - `allowedAnalyses` AnalysisTemplateArnOrQueryWildcard[], required — The ARN of the analysis templates that are allowed by the custom analysis rule.
          - `allowedAnalysisProviders` AccountId[] — The IDs of the Amazon Web Services accounts that are allowed to query by the custom analysis rule. Required when <code>allowedAnalyses</code> is <code>ANY_QUERY</code>.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the direct query.
          - `disallowedOutputColumns` AnalysisRuleColumnName[] — A list of columns that aren't allowed to be shown in the query output.
          - `differentialPrivacy` object — The differential privacy configuration.
            - `columns` DifferentialPrivacyColumn[], 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 diﬀerential privacy for two or more tables in a collaboration, you must conﬁgure the same column as the user identiﬁer column in both analysis rules.
              - …
          - `allowedResultReceivers` AccountId[] — The list of Amazon Web Services account IDs that are allowed to receive results from queries run on the configured table.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The list of allowed additional analyses for the custom analysis rule.
        - `idMappingTable` object — The ID mapping table.
          - `joinColumns` AnalysisRuleColumnName[], required — The columns that query runners are allowed to use in an INNER JOIN statement.
          - `queryConstraints` QueryConstraint[], required — The query constraints of the analysis rule ID mapping table.
            - `requireOverlap` object — An array of column names that specifies which columns are required in the JOIN statement.
              - …
          - `dimensionColumns` AnalysisRuleColumnName[] — The columns that query runners are allowed to select, group by, or filter by.
    - `collaborationPolicy` ConfiguredTableAssociationAnalysisRulePolicy — Controls on the query specifications that can be run on an associated configured table.
      - `v1` object — The policy for the configured table association analysis rule.
        - `list` object — Analysis rule type that enables only list queries on a configured table.
          - `allowedResultReceivers` AccountId[] — The list of collaboration members who are allowed to receive results of queries run with this configured table.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
        - `aggregation` object — Analysis rule type that enables only aggregation queries on a configured table.
          - `allowedResultReceivers` AccountId[] — The list of collaboration members who are allowed to receive results of queries run with this configured table.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — <p> The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.</p> <p>The <code>allowedAdditionalAnalyses</code> parameter is currently supported for the list analysis rule (<code>AnalysisRuleList</code>) and the custom analysis rule (<code>AnalysisRuleCustom</code>).</p>
        - `custom` object — Analysis rule type that enables the table owner to approve custom SQL queries on their configured tables. It supports differential privacy.
          - `allowedResultReceivers` AccountId[] — The list of collaboration members who are allowed to receive results of queries run with this configured table.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
    - `consolidatedPolicy` object — The consolidated policy for the analysis rule.
      - `v1` object — The consolidated policy version 1.
        - `list` object — The list of consolidated policies.
          - `joinColumns` AnalysisRuleColumnName[], required — The columns to join on.
          - `allowedJoinOperators` JoinOperator[] — The allowed join operators in the consolidated policy list.
          - `listColumns` AnalysisRuleColumnName[], required — The columns in the consolidated policy list.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — Additional analyses for the consolidated policy list.
          - `allowedResultReceivers` AccountId[] — The allowed result receivers.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The additional analyses allowed by the consolidated policy list.
        - `aggregation` object — The aggregation setting for the consolidated policy.
          - `aggregateColumns` AggregateColumn[], required — Aggregate columns in consolidated policy aggregation.
            - `columnNames` AnalysisRuleColumnName[], required — Column names in configured table of aggregate columns.
            - `function` 'SUM' | 'SUM_DISTINCT' | 'COUNT' | 'COUNT_DISTINCT' | 'AVG', required — Aggregation function that can be applied to aggregate column in query.
          - `joinColumns` AnalysisRuleColumnName[], required — The columns to join on.
          - `joinRequired` 'QUERY_RUNNER' — Join required
          - `allowedJoinOperators` JoinOperator[] — The allowed join operators.
          - `dimensionColumns` AnalysisRuleColumnName[], required — The dimension columns of the consolidated policy aggregation.
          - `scalarFunctions` ScalarFunctions[], required — The scalar functions.
          - `outputConstraints` AggregationConstraint[], required — The output constraints of the consolidated policy aggregation.
            - `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` 'COUNT_DISTINCT', required — The type of aggregation the constraint allows. The only valid value is currently `COUNT_DISTINCT`.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — Additional analyses for the consolidated policy aggregation.
          - `allowedResultReceivers` AccountId[] — The allowed result receivers.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The additional analyses allowed by the consolidated policy aggregation.
        - `custom` object — Custom policy
          - `allowedAnalyses` AnalysisTemplateArnOrQueryWildcard[], required — The allowed analyses.
          - `allowedAnalysisProviders` AccountId[] — The allowed analysis providers.
          - `additionalAnalyses` 'ALLOWED' | 'REQUIRED' | 'NOT_ALLOWED' — Additional analyses for the consolidated policy.
          - `disallowedOutputColumns` AnalysisRuleColumnName[] — Disallowed output columns
          - `differentialPrivacy` DifferentialPrivacyConfiguration — Specifies the unique identifier for your users.
            - `columns` DifferentialPrivacyColumn[], 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 diﬀerential privacy for two or more tables in a collaboration, you must conﬁgure the same column as the user identiﬁer column in both analysis rules.
              - …
          - `allowedResultReceivers` AccountId[] — The allowed result receivers.
          - `allowedAdditionalAnalyses` AdditionalAnalysesResourceArn[] — The additional analyses allowed by the consolidated policy.
  - `errors` BatchGetSchemaAnalysisRuleError[], required — Error reasons for schemas that could not be retrieved. One error is returned for every schema that could not be retrieved.
    - `name` string, required — An error name for the error.
    - `type` 'AGGREGATION' | 'LIST' | 'CUSTOM' | 'ID_MAPPING_TABLE', required — The analysis rule type.
    - `code` string, required — An error code for the error.
    - `message` string, required — A description of why the call failed.

## Other responses

- `480` — ResourceNotFoundException
- `481` — InternalServerException
- `482` — ValidationException
- `483` — ThrottlingException
- `484` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/cleanrooms.md) · [All operations](https://skmtc.net/aws/apis/cleanrooms/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/cleanrooms/versions/17ce59ba806e/schema)
