AWS Clean Rooms Service

2023/11/29 - AWS Clean Rooms Service - 17 new 7 updated api methods

Changes  AWS Clean Rooms now provides differential privacy to protect against user-identification attempts and machine learning modeling to allow two parties to identify similar users in their data.

GetCollaborationConfiguredAudienceModelAssociation (new) Link ¶

Retrieves a configured audience model association within a collaboration.

See also: AWS API Documentation

Request Syntax

client.get_collaboration_configured_audience_model_association(
    collaborationIdentifier='string',
    configuredAudienceModelAssociationIdentifier='string'
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

A unique identifier for the collaboration that the configured audience model association belongs to. Accepts a collaboration ID.

type configuredAudienceModelAssociationIdentifier

string

param configuredAudienceModelAssociationIdentifier

[REQUIRED]

A unique identifier for the configured audience model association that you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'collaborationConfiguredAudienceModelAssociation': {
        'id': 'string',
        'arn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'configuredAudienceModelArn': 'string',
        'name': 'string',
        'description': 'string',
        'creatorAccountId': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • collaborationConfiguredAudienceModelAssociation (dict) --

      The metadata of the configured audience model association.

      • id (string) --

        The identifier of the configured audience model association.

      • arn (string) --

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

      • collaborationId (string) --

        A unique identifier for the collaboration that the configured audience model associations belong to. Accepts collaboration ID.

      • collaborationArn (string) --

        The unique ARN for the configured audience model's associated collaboration.

      • configuredAudienceModelArn (string) --

        The Amazon Resource Name (ARN) of the configure audience model.

      • name (string) --

        The name of the configured audience model association.

      • description (string) --

        The description of the configured audience model association.

      • creatorAccountId (string) --

        The identifier used to reference members of the collaboration. Only supports AWS account ID.

      • createTime (datetime) --

        The time at which the configured audience model association was created.

      • updateTime (datetime) --

        The most recent time at which the configured audience model association was updated.

ListPrivacyBudgets (new) Link ¶

Returns detailed information about the privacy budgets in a specified membership.

See also: AWS API Documentation

Request Syntax

client.list_privacy_budgets(
    membershipIdentifier='string',
    privacyBudgetType='DIFFERENTIAL_PRIVACY',
    nextToken='string',
    maxResults=123
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget is retrieved from the collaboration that this membership belongs to. Accepts a membership ID.

type privacyBudgetType

string

param privacyBudgetType

[REQUIRED]

The privacy budget type.

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 may return a nextToken even if the maximum results has not been met.

rtype

dict

returns

Response Syntax

{
    'privacyBudgetSummaries': [
        {
            'id': 'string',
            'privacyBudgetTemplateId': 'string',
            'privacyBudgetTemplateArn': 'string',
            'membershipId': 'string',
            'membershipArn': 'string',
            'collaborationId': 'string',
            'collaborationArn': 'string',
            'type': 'DIFFERENTIAL_PRIVACY',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'budget': {
                'differentialPrivacy': {
                    'aggregations': [
                        {
                            'type': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                            'maxCount': 123,
                            'remainingCount': 123
                        },
                    ],
                    'epsilon': 123
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • privacyBudgetSummaries (list) --

      An array that summarizes the privacy budgets. The summary includes collaboration information, membership information, privacy budget template information, and privacy budget details.

      • (dict) --

        An array that summaries the specified privacy budget. This summary includes collaboration information, creation information, membership information, and privacy budget information.

        • id (string) --

          The unique identifier of the privacy budget.

        • privacyBudgetTemplateId (string) --

          The unique identifier of the privacy budget template.

        • privacyBudgetTemplateArn (string) --

          The ARN of the privacy budget template.

        • membershipId (string) --

          The identifier for a membership resource.

        • membershipArn (string) --

          The Amazon Resource Name (ARN) of the member who created the privacy budget summary.

        • collaborationId (string) --

          The unique identifier of the collaboration that contains this privacy budget.

        • collaborationArn (string) --

          The ARN of the collaboration that contains this privacy budget.

        • type (string) --

          Specifies the type of the privacy budget.

        • createTime (datetime) --

          The time at which the privacy budget was created.

        • updateTime (datetime) --

          The most recent time at which the privacy budget was updated.

        • budget (dict) --

          The provided privacy budget.

          • differentialPrivacy (dict) --

            An object that specifies the epsilon parameter and the utility in terms of total aggregations, as well as the remaining aggregations available.

            • aggregations (list) --

              This information includes the configured epsilon value and the utility in terms of total aggregations, as well as the remaining aggregations.

              • (dict) --

                Information about the total number of aggregations, as well as the remaining aggregations.

                • type (string) --

                  The different types of aggregation functions that you can perform.

                • maxCount (integer) --

                  The maximum number of aggregation functions that you can perform with the given privacy budget.

                • remainingCount (integer) --

                  The remaining number of aggregation functions that can be run with the available privacy budget.

            • epsilon (integer) --

              The epsilon value that you configured.

    • nextToken (string) --

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

CreateConfiguredAudienceModelAssociation (new) Link ¶

Provides the details necessary to create a configured audience model association.

See also: AWS API Documentation

Request Syntax

client.create_configured_audience_model_association(
    membershipIdentifier='string',
    configuredAudienceModelArn='string',
    configuredAudienceModelAssociationName='string',
    manageResourcePolicies=True|False,
    tags={
        'string': 'string'
    },
    description='string'
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The configured audience model is associated to the collaboration that this membership belongs to. Accepts a membership ID.

type configuredAudienceModelArn

string

param configuredAudienceModelArn

[REQUIRED]

A unique identifier for the configured audience model that you want to associate.

type configuredAudienceModelAssociationName

string

param configuredAudienceModelAssociationName

[REQUIRED]

The name of the configured audience model association.

type manageResourcePolicies

boolean

param manageResourcePolicies

[REQUIRED]

When TRUE , indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When FALSE , indicates that the configured audience model resource owner will manage permissions related to the given collaboration.

Setting this to TRUE requires you to have permissions to create, update, and delete the resource policy for the cleanrooms-ml resource when you call the DeleteConfiguredAudienceModelAssociation resource. In addition, if you are the collaboration creator and specify TRUE , you must have the same permissions when you call the DeleteMember and DeleteCollaboration APIs.

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

type description

string

param description

A description of the configured audience model association.

rtype

dict

returns

Response Syntax

{
    'configuredAudienceModelAssociation': {
        'id': 'string',
        'arn': 'string',
        'configuredAudienceModelArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'name': 'string',
        'manageResourcePolicies': True|False,
        'description': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredAudienceModelAssociation (dict) --

      Information about the configured audience model association.

      • id (string) --

        A unique identifier of the configured audience model association.

      • arn (string) --

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

      • configuredAudienceModelArn (string) --

        The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.

      • membershipId (string) --

        A unique identifier for the membership that contains this configured audience model association.

      • membershipArn (string) --

        The Amazon Resource Name (ARN) of the membership that contains this configured audience model association.

      • collaborationId (string) --

        A unique identifier of the collaboration that contains this configured audience model association.

      • collaborationArn (string) --

        The Amazon Resource Name (ARN) of the collaboration that contains this configured audience model association.

      • name (string) --

        The name of the configured audience model association.

      • manageResourcePolicies (boolean) --

        When TRUE , indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When FALSE , indicates that the configured audience model resource owner will manage permissions related to the given collaboration.

      • description (string) --

        The description of the configured audience model association.

      • createTime (datetime) --

        The time at which the configured audience model association was created.

      • updateTime (datetime) --

        The most recent time at which the configured audience model association was updated.

UpdatePrivacyBudgetTemplate (new) Link ¶

Updates the privacy budget template for the specified membership.

See also: AWS API Documentation

Request Syntax

client.update_privacy_budget_template(
    membershipIdentifier='string',
    privacyBudgetTemplateIdentifier='string',
    privacyBudgetType='DIFFERENTIAL_PRIVACY',
    parameters={
        'differentialPrivacy': {
            'epsilon': 123,
            'usersNoisePerQuery': 123
        }
    }
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget template is updated in the collaboration that this membership belongs to. Accepts a membership ID.

type privacyBudgetTemplateIdentifier

string

param privacyBudgetTemplateIdentifier

[REQUIRED]

A unique identifier for your privacy budget template that you want to update.

type privacyBudgetType

string

param privacyBudgetType

[REQUIRED]

Specifies the type of the privacy budget template.

type parameters

dict

param parameters

Specifies the epsilon and noise parameters for the privacy budget template.

  • differentialPrivacy (dict) --

    An object that specifies the new values for the epsilon and noise parameters.

    • epsilon (integer) --

      The updated epsilon value that you want to use.

    • usersNoisePerQuery (integer) --

      The updated value of noise added per query. It is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

rtype

dict

returns

Response Syntax

{
    'privacyBudgetTemplate': {
        'id': 'string',
        'arn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
        'autoRefresh': 'CALENDAR_MONTH'|'NONE',
        'parameters': {
            'differentialPrivacy': {
                'epsilon': 123,
                'usersNoisePerQuery': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • privacyBudgetTemplate (dict) --

      Summary of the privacy budget template.

      • id (string) --

        The unique identifier of the privacy budget template.

      • arn (string) --

        The ARN of the privacy budget template.

      • membershipId (string) --

        The identifier for a membership resource.

      • membershipArn (string) --

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

      • collaborationId (string) --

        The unique ID of the collaboration that contains this privacy budget template.

      • collaborationArn (string) --

        The ARN of the collaboration that contains this privacy budget template.

      • createTime (datetime) --

        The time at which the privacy budget template was created.

      • updateTime (datetime) --

        The most recent time at which the privacy budget template was updated.

      • privacyBudgetType (string) --

        Specifies the type of the privacy budget template.

      • autoRefresh (string) --

        How often the privacy budget refreshes.

        Warning

        If you plan to regularly bring new data into the collaboration, use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queried across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

      • parameters (dict) --

        Specifies the epislon and noise parameters for the privacy budget template.

        • differentialPrivacy (dict) --

          The epsilon and noise parameters.

          • epsilon (integer) --

            The epsilon value that you specified.

          • usersNoisePerQuery (integer) --

            Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

ListConfiguredAudienceModelAssociations (new) Link ¶

Lists information about requested configured audience model associations.

See also: AWS API Documentation

Request Syntax

client.list_configured_audience_model_associations(
    membershipIdentifier='string',
    nextToken='string',
    maxResults=123
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for a membership that contains the configured audience model associations that you want to retrieve.

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 may return a nextToken even if the maximum results has not been met.

rtype

dict

returns

Response Syntax

{
    'configuredAudienceModelAssociationSummaries': [
        {
            'membershipId': 'string',
            'membershipArn': 'string',
            'collaborationArn': 'string',
            'collaborationId': 'string',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'id': 'string',
            'arn': 'string',
            'name': 'string',
            'configuredAudienceModelArn': 'string',
            'description': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • configuredAudienceModelAssociationSummaries (list) --

      Summaries of the configured audience model associations that you requested.

      • (dict) --

        A summary of the configured audience model association.

        • membershipId (string) --

          A unique identifier of the membership that contains the configured audience model association.

        • membershipArn (string) --

          The Amazon Resource Name (ARN) of the membership that contains the configured audience model association.

        • collaborationArn (string) --

          The Amazon Resource Name (ARN) of the collaboration that contains the configured audience model association.

        • collaborationId (string) --

          A unique identifier of the collaboration that configured audience model is associated with.

        • createTime (datetime) --

          The time at which the configured audience model association was created.

        • updateTime (datetime) --

          The most recent time at which the configured audience model association was updated.

        • id (string) --

          A unique identifier of the configured audience model association.

        • arn (string) --

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

        • name (string) --

          The name of the configured audience model association.

        • configuredAudienceModelArn (string) --

          The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.

        • description (string) --

          The description of the configured audience model association.

    • nextToken (string) --

      The token value provided to access the next page of results.

ListCollaborationPrivacyBudgets (new) Link ¶

Returns an array that summarizes each privacy budget in a specified collaboration. The summary includes the collaboration ARN, creation time, creating account, and privacy budget details.

See also: AWS API Documentation

Request Syntax

client.list_collaboration_privacy_budgets(
    collaborationIdentifier='string',
    privacyBudgetType='DIFFERENTIAL_PRIVACY',
    maxResults=123,
    nextToken='string'
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

A unique identifier for one of your collaborations.

type privacyBudgetType

string

param privacyBudgetType

[REQUIRED]

Specifies the type of the privacy budget.

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 may return a nextToken even if the maximum results has not been met.

type nextToken

string

param nextToken

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

rtype

dict

returns

Response Syntax

{
    'collaborationPrivacyBudgetSummaries': [
        {
            'id': 'string',
            'privacyBudgetTemplateId': 'string',
            'privacyBudgetTemplateArn': 'string',
            'collaborationId': 'string',
            'collaborationArn': 'string',
            'creatorAccountId': 'string',
            'type': 'DIFFERENTIAL_PRIVACY',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1),
            'budget': {
                'differentialPrivacy': {
                    'aggregations': [
                        {
                            'type': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                            'maxCount': 123,
                            'remainingCount': 123
                        },
                    ],
                    'epsilon': 123
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • collaborationPrivacyBudgetSummaries (list) --

      Summaries of the collaboration privacy budgets.

      • (dict) --

        A summary of the collaboration privacy budgets. This summary includes the collaboration information, creation information, epsilon provided, and utility in terms of aggregations.

        • id (string) --

          The unique identifier of the collaboration privacy budget.

        • privacyBudgetTemplateId (string) --

          The unique identifier of the collaboration privacy budget template.

        • privacyBudgetTemplateArn (string) --

          The ARN of the collaboration privacy budget template.

        • collaborationId (string) --

          The unique identifier of the collaboration that includes this privacy budget.

        • collaborationArn (string) --

          The ARN of the collaboration that includes this privacy budget.

        • creatorAccountId (string) --

          The unique identifier of the account that created this privacy budget.

        • type (string) --

          The type of privacy budget template.

        • createTime (datetime) --

          The time at which the privacy budget was created.

        • updateTime (datetime) --

          The most recent time at which the privacy budget was updated.

        • budget (dict) --

          The includes epsilon provided and utility in terms of aggregations.

          • differentialPrivacy (dict) --

            An object that specifies the epsilon parameter and the utility in terms of total aggregations, as well as the remaining aggregations available.

            • aggregations (list) --

              This information includes the configured epsilon value and the utility in terms of total aggregations, as well as the remaining aggregations.

              • (dict) --

                Information about the total number of aggregations, as well as the remaining aggregations.

                • type (string) --

                  The different types of aggregation functions that you can perform.

                • maxCount (integer) --

                  The maximum number of aggregation functions that you can perform with the given privacy budget.

                • remainingCount (integer) --

                  The remaining number of aggregation functions that can be run with the available privacy budget.

            • epsilon (integer) --

              The epsilon value that you configured.

    • nextToken (string) --

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

DeletePrivacyBudgetTemplate (new) Link ¶

Deletes a privacy budget template for a specified membership.

See also: AWS API Documentation

Request Syntax

client.delete_privacy_budget_template(
    membershipIdentifier='string',
    privacyBudgetTemplateIdentifier='string'
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget template is deleted from the collaboration that this membership belongs to. Accepts a membership ID.

type privacyBudgetTemplateIdentifier

string

param privacyBudgetTemplateIdentifier

[REQUIRED]

A unique identifier for your privacy budget template.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

PreviewPrivacyImpact (new) Link ¶

An estimate of the number of aggregation functions that the member who can query can run given epsilon and noise parameters.

See also: AWS API Documentation

Request Syntax

client.preview_privacy_impact(
    membershipIdentifier='string',
    parameters={
        'differentialPrivacy': {
            'epsilon': 123,
            'usersNoisePerQuery': 123
        }
    }
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. Accepts a membership ID.

type parameters

dict

param parameters

[REQUIRED]

Specifies the desired epsilon and noise parameters to preview.

  • differentialPrivacy (dict) --

    An array that specifies the epsilon and noise parameters.

    • epsilon (integer) -- [REQUIRED]

      The epsilon value that you want to preview.

    • usersNoisePerQuery (integer) -- [REQUIRED]

      Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

rtype

dict

returns

Response Syntax

{
    'privacyImpact': {
        'differentialPrivacy': {
            'aggregations': [
                {
                    'type': 'AVG'|'COUNT'|'COUNT_DISTINCT'|'SUM'|'STDDEV',
                    'maxCount': 123
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • privacyImpact (dict) --

      An estimate of the number of aggregation functions that the member who can query can run given the epsilon and noise parameters. This does not change the privacy budget.

      • differentialPrivacy (dict) --

        An object that lists the number and type of aggregation functions you can perform.

        • aggregations (list) --

          The number of aggregation functions that you can perform.

          • (dict) --

            Provides an estimate of the number of aggregation functions that the member who can query can run given the epsilon and noise parameters.

            • type (string) --

              The type of aggregation function.

            • maxCount (integer) --

              The maximum number of aggregations that the member who can query can run given the epsilon and noise parameters.

GetConfiguredAudienceModelAssociation (new) Link ¶

Returns information about a configured audience model association.

See also: AWS API Documentation

Request Syntax

client.get_configured_audience_model_association(
    configuredAudienceModelAssociationIdentifier='string',
    membershipIdentifier='string'
)
type configuredAudienceModelAssociationIdentifier

string

param configuredAudienceModelAssociationIdentifier

[REQUIRED]

A unique identifier for the configured audience model association that you want to retrieve.

type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for the membership that contains the configured audience model association that you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'configuredAudienceModelAssociation': {
        'id': 'string',
        'arn': 'string',
        'configuredAudienceModelArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'name': 'string',
        'manageResourcePolicies': True|False,
        'description': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredAudienceModelAssociation (dict) --

      Information about the configured audience model association that you requested.

      • id (string) --

        A unique identifier of the configured audience model association.

      • arn (string) --

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

      • configuredAudienceModelArn (string) --

        The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.

      • membershipId (string) --

        A unique identifier for the membership that contains this configured audience model association.

      • membershipArn (string) --

        The Amazon Resource Name (ARN) of the membership that contains this configured audience model association.

      • collaborationId (string) --

        A unique identifier of the collaboration that contains this configured audience model association.

      • collaborationArn (string) --

        The Amazon Resource Name (ARN) of the collaboration that contains this configured audience model association.

      • name (string) --

        The name of the configured audience model association.

      • manageResourcePolicies (boolean) --

        When TRUE , indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When FALSE , indicates that the configured audience model resource owner will manage permissions related to the given collaboration.

      • description (string) --

        The description of the configured audience model association.

      • createTime (datetime) --

        The time at which the configured audience model association was created.

      • updateTime (datetime) --

        The most recent time at which the configured audience model association was updated.

ListCollaborationConfiguredAudienceModelAssociations (new) Link ¶

Lists configured audience model associations within a collaboration.

See also: AWS API Documentation

Request Syntax

client.list_collaboration_configured_audience_model_associations(
    collaborationIdentifier='string',
    nextToken='string',
    maxResults=123
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

A unique identifier for the collaboration that the configured audience model association belongs to. Accepts a collaboration ID.

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.

rtype

dict

returns

Response Syntax

{
    'collaborationConfiguredAudienceModelAssociationSummaries': [
        {
            'arn': 'string',
            'createTime': datetime(2015, 1, 1),
            'id': 'string',
            'name': 'string',
            'updateTime': datetime(2015, 1, 1),
            'collaborationArn': 'string',
            'collaborationId': 'string',
            'creatorAccountId': 'string',
            'description': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • collaborationConfiguredAudienceModelAssociationSummaries (list) --

      The metadata of the configured audience model association within a collaboration.

      • (dict) --

        A summary of the configured audience model association in the collaboration.

        • arn (string) --

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

        • createTime (datetime) --

          The time at which the configured audience model association was created.

        • id (string) --

          The identifier of the configured audience model association.

        • name (string) --

          The name of the configured audience model association.

        • updateTime (datetime) --

          The most recent time at which the configured audience model association was updated.

        • collaborationArn (string) --

          The unique ARN for the configured audience model's associated collaboration.

        • collaborationId (string) --

          A unique identifier for the collaboration that the configured audience model associations belong to. Accepts collaboration ID.

        • creatorAccountId (string) --

          The identifier used to reference members of the collaboration. Only supports AWS account ID.

        • description (string) --

          The description of the configured audience model association.

    • nextToken (string) --

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

GetPrivacyBudgetTemplate (new) Link ¶

Returns details for a specified privacy budget template.

See also: AWS API Documentation

Request Syntax

client.get_privacy_budget_template(
    membershipIdentifier='string',
    privacyBudgetTemplateIdentifier='string'
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget template is retrieved from the collaboration that this membership belongs to. Accepts a membership ID.

type privacyBudgetTemplateIdentifier

string

param privacyBudgetTemplateIdentifier

[REQUIRED]

A unique identifier for your privacy budget template.

rtype

dict

returns

Response Syntax

{
    'privacyBudgetTemplate': {
        'id': 'string',
        'arn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
        'autoRefresh': 'CALENDAR_MONTH'|'NONE',
        'parameters': {
            'differentialPrivacy': {
                'epsilon': 123,
                'usersNoisePerQuery': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • privacyBudgetTemplate (dict) --

      Returns the details of the privacy budget template that you requested.

      • id (string) --

        The unique identifier of the privacy budget template.

      • arn (string) --

        The ARN of the privacy budget template.

      • membershipId (string) --

        The identifier for a membership resource.

      • membershipArn (string) --

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

      • collaborationId (string) --

        The unique ID of the collaboration that contains this privacy budget template.

      • collaborationArn (string) --

        The ARN of the collaboration that contains this privacy budget template.

      • createTime (datetime) --

        The time at which the privacy budget template was created.

      • updateTime (datetime) --

        The most recent time at which the privacy budget template was updated.

      • privacyBudgetType (string) --

        Specifies the type of the privacy budget template.

      • autoRefresh (string) --

        How often the privacy budget refreshes.

        Warning

        If you plan to regularly bring new data into the collaboration, use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queried across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

      • parameters (dict) --

        Specifies the epislon and noise parameters for the privacy budget template.

        • differentialPrivacy (dict) --

          The epsilon and noise parameters.

          • epsilon (integer) --

            The epsilon value that you specified.

          • usersNoisePerQuery (integer) --

            Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

ListPrivacyBudgetTemplates (new) Link ¶

Returns detailed information about the privacy budget templates in a specified membership.

See also: AWS API Documentation

Request Syntax

client.list_privacy_budget_templates(
    membershipIdentifier='string',
    nextToken='string',
    maxResults=123
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget templates are retrieved from the collaboration that this membership belongs to. Accepts a membership ID.

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 may return a nextToken even if the maximum results has not been met.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'privacyBudgetTemplateSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'membershipId': 'string',
            'membershipArn': 'string',
            'collaborationId': 'string',
            'collaborationArn': 'string',
            'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

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

    • privacyBudgetTemplateSummaries (list) --

      An array that summarizes the privacy budget templates. The summary includes collaboration information, creation information, and privacy budget type.

      • (dict) --

        A summary of the privacy budget template. The summary includes membership information, collaboration information, and creation information.

        • id (string) --

          The unique identifier of the privacy budget template.

        • arn (string) --

          The ARN of the privacy budget template.

        • membershipId (string) --

          The identifier for a membership resource.

        • membershipArn (string) --

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

        • collaborationId (string) --

          The unique ID of the collaboration that contains this privacy budget template.

        • collaborationArn (string) --

          The ARN of the collaboration that contains this privacy budget template.

        • privacyBudgetType (string) --

          The type of the privacy budget template.

        • createTime (datetime) --

          The time at which the privacy budget template was created.

        • updateTime (datetime) --

          The most recent time at which the privacy budget template was updated.

GetCollaborationPrivacyBudgetTemplate (new) Link ¶

Returns details about a specified privacy budget template.

See also: AWS API Documentation

Request Syntax

client.get_collaboration_privacy_budget_template(
    collaborationIdentifier='string',
    privacyBudgetTemplateIdentifier='string'
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

A unique identifier for one of your collaborations.

type privacyBudgetTemplateIdentifier

string

param privacyBudgetTemplateIdentifier

[REQUIRED]

A unique identifier for one of your privacy budget templates.

rtype

dict

returns

Response Syntax

{
    'collaborationPrivacyBudgetTemplate': {
        'id': 'string',
        'arn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'creatorAccountId': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
        'autoRefresh': 'CALENDAR_MONTH'|'NONE',
        'parameters': {
            'differentialPrivacy': {
                'epsilon': 123,
                'usersNoisePerQuery': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • collaborationPrivacyBudgetTemplate (dict) --

      Returns the details of the privacy budget template that you requested.

      • id (string) --

        The unique identifier of the collaboration privacy budget template.

      • arn (string) --

        The ARN of the collaboration privacy budget template.

      • collaborationId (string) --

        The unique identifier of the collaboration that includes this collaboration privacy budget template.

      • collaborationArn (string) --

        The ARN of the collaboration that includes this collaboration privacy budget template.

      • creatorAccountId (string) --

        The unique identifier of the account that created this collaboration privacy budget template.

      • createTime (datetime) --

        The time at which the collaboration privacy budget template was created.

      • updateTime (datetime) --

        The most recent time at which the collaboration privacy budget template was updated.

      • privacyBudgetType (string) --

        The type of privacy budget template.

      • autoRefresh (string) --

        How often the privacy budget refreshes.

        Warning

        If you plan to regularly bring new data into the collaboration, use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queried across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

      • parameters (dict) --

        Specifies the epsilon and noise parameters for the privacy budget template.

        • differentialPrivacy (dict) --

          The epsilon and noise parameters.

          • epsilon (integer) --

            The epsilon value that you specified.

          • usersNoisePerQuery (integer) --

            Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

ListCollaborationPrivacyBudgetTemplates (new) Link ¶

Returns an array that summarizes each privacy budget template in a specified collaboration.

See also: AWS API Documentation

Request Syntax

client.list_collaboration_privacy_budget_templates(
    collaborationIdentifier='string',
    nextToken='string',
    maxResults=123
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

A unique identifier for one of your collaborations.

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 may return a nextToken even if the maximum results has not been met.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'collaborationPrivacyBudgetTemplateSummaries': [
        {
            'id': 'string',
            'arn': 'string',
            'collaborationId': 'string',
            'collaborationArn': 'string',
            'creatorAccountId': 'string',
            'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
            'createTime': datetime(2015, 1, 1),
            'updateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

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

    • collaborationPrivacyBudgetTemplateSummaries (list) --

      An array that summarizes the collaboration privacy budget templates. The summary includes collaboration information, creation information, the privacy budget type.

      • (dict) --

        A summary of the collaboration's privacy budget template. This summary includes information about who created the privacy budget template and what collaborations it belongs to.

        • id (string) --

          The unique identifier of the collaboration privacy budget template.

        • arn (string) --

          The ARN of the collaboration privacy budget template.

        • collaborationId (string) --

          The unique identifier of the collaboration that contains this collaboration privacy budget template.

        • collaborationArn (string) --

          The ARN of the collaboration that contains this collaboration privacy budget template.

        • creatorAccountId (string) --

          The unique identifier of the account that created this collaboration privacy budget template.

        • privacyBudgetType (string) --

          The type of the privacy budget template.

        • createTime (datetime) --

          The time at which the collaboration privacy budget template was created.

        • updateTime (datetime) --

          The most recent time at which the collaboration privacy budget template was updated.

CreatePrivacyBudgetTemplate (new) Link ¶

Creates a privacy budget template for a specified membership. Each membership can have only one privacy budget template, but it can be deleted and recreated. If you need to change the privacy budget template for a membership, use the UpdatePrivacyBudgetTemplate operation.

See also: AWS API Documentation

Request Syntax

client.create_privacy_budget_template(
    membershipIdentifier='string',
    autoRefresh='CALENDAR_MONTH'|'NONE',
    privacyBudgetType='DIFFERENTIAL_PRIVACY',
    parameters={
        'differentialPrivacy': {
            'epsilon': 123,
            'usersNoisePerQuery': 123
        }
    },
    tags={
        'string': 'string'
    }
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier for one of your memberships for a collaboration. The privacy budget template is created in the collaboration that this membership belongs to. Accepts a membership ID.

type autoRefresh

string

param autoRefresh

[REQUIRED]

How often the privacy budget refreshes.

Warning

If you plan to regularly bring new data into the collaboration, you can use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queries across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

type privacyBudgetType

string

param privacyBudgetType

[REQUIRED]

Specifies the type of the privacy budget template.

type parameters

dict

param parameters

[REQUIRED]

Specifies your parameters for the privacy budget template.

  • differentialPrivacy (dict) --

    An object that specifies the epsilon and noise parameters.

    • epsilon (integer) -- [REQUIRED]

      The epsilon value that you want to use.

    • usersNoisePerQuery (integer) -- [REQUIRED]

      Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

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

{
    'privacyBudgetTemplate': {
        'id': 'string',
        'arn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'privacyBudgetType': 'DIFFERENTIAL_PRIVACY',
        'autoRefresh': 'CALENDAR_MONTH'|'NONE',
        'parameters': {
            'differentialPrivacy': {
                'epsilon': 123,
                'usersNoisePerQuery': 123
            }
        }
    }
}

Response Structure

  • (dict) --

    • privacyBudgetTemplate (dict) --

      A summary of the elements in the privacy budget template.

      • id (string) --

        The unique identifier of the privacy budget template.

      • arn (string) --

        The ARN of the privacy budget template.

      • membershipId (string) --

        The identifier for a membership resource.

      • membershipArn (string) --

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

      • collaborationId (string) --

        The unique ID of the collaboration that contains this privacy budget template.

      • collaborationArn (string) --

        The ARN of the collaboration that contains this privacy budget template.

      • createTime (datetime) --

        The time at which the privacy budget template was created.

      • updateTime (datetime) --

        The most recent time at which the privacy budget template was updated.

      • privacyBudgetType (string) --

        Specifies the type of the privacy budget template.

      • autoRefresh (string) --

        How often the privacy budget refreshes.

        Warning

        If you plan to regularly bring new data into the collaboration, use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queried across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

      • parameters (dict) --

        Specifies the epislon and noise parameters for the privacy budget template.

        • differentialPrivacy (dict) --

          The epsilon and noise parameters.

          • epsilon (integer) --

            The epsilon value that you specified.

          • usersNoisePerQuery (integer) --

            Noise added per query is measured in terms of the number of users whose contributions you want to obscure. This value governs the rate at which the privacy budget is depleted.

DeleteConfiguredAudienceModelAssociation (new) Link ¶

Provides the information necessary to delete a configured audience model association.

See also: AWS API Documentation

Request Syntax

client.delete_configured_audience_model_association(
    configuredAudienceModelAssociationIdentifier='string',
    membershipIdentifier='string'
)
type configuredAudienceModelAssociationIdentifier

string

param configuredAudienceModelAssociationIdentifier

[REQUIRED]

A unique identifier of the configured audience model association that you want to delete.

type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier of the membership that contains the audience model association that you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateConfiguredAudienceModelAssociation (new) Link ¶

Provides the details necessary to update a configured audience model association.

See also: AWS API Documentation

Request Syntax

client.update_configured_audience_model_association(
    configuredAudienceModelAssociationIdentifier='string',
    membershipIdentifier='string',
    description='string',
    name='string'
)
type configuredAudienceModelAssociationIdentifier

string

param configuredAudienceModelAssociationIdentifier

[REQUIRED]

A unique identifier for the configured audience model association that you want to update.

type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

A unique identifier of the membership that contains the configured audience model association that you want to update.

type description

string

param description

A new description for the configured audience model association.

type name

string

param name

A new name for the configured audience model association.

rtype

dict

returns

Response Syntax

{
    'configuredAudienceModelAssociation': {
        'id': 'string',
        'arn': 'string',
        'configuredAudienceModelArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'name': 'string',
        'manageResourcePolicies': True|False,
        'description': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • configuredAudienceModelAssociation (dict) --

      Details about the configured audience model association that you updated.

      • id (string) --

        A unique identifier of the configured audience model association.

      • arn (string) --

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

      • configuredAudienceModelArn (string) --

        The Amazon Resource Name (ARN) of the configured audience model that was used for this configured audience model association.

      • membershipId (string) --

        A unique identifier for the membership that contains this configured audience model association.

      • membershipArn (string) --

        The Amazon Resource Name (ARN) of the membership that contains this configured audience model association.

      • collaborationId (string) --

        A unique identifier of the collaboration that contains this configured audience model association.

      • collaborationArn (string) --

        The Amazon Resource Name (ARN) of the collaboration that contains this configured audience model association.

      • name (string) --

        The name of the configured audience model association.

      • manageResourcePolicies (boolean) --

        When TRUE , indicates that the resource policy for the configured audience model resource being associated is configured for Clean Rooms to manage permissions related to the given collaboration. When FALSE , indicates that the configured audience model resource owner will manage permissions related to the given collaboration.

      • description (string) --

        The description of the configured audience model association.

      • createTime (datetime) --

        The time at which the configured audience model association was created.

      • updateTime (datetime) --

        The most recent time at which the configured audience model association was updated.

CreateConfiguredTableAnalysisRule (updated) Link ¶
Changes (request, response)
Request
{'analysisRulePolicy': {'v1': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}
Response
{'analysisRule': {'policy': {'v1': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}}

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',
                ]
            },
            'aggregation': {
                'aggregateColumns': [
                    {
                        'columnNames': [
                            'string',
                        ],
                        'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                    },
                ],
                'joinColumns': [
                    'string',
                ],
                'joinRequired': 'QUERY_RUNNER',
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'dimensionColumns': [
                    'string',
                ],
                'scalarFunctions': [
                    'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                ],
                'outputConstraints': [
                    {
                        'columnName': 'string',
                        'minimum': 123,
                        'type': 'COUNT_DISTINCT'
                    },
                ]
            },
            'custom': {
                'allowedAnalyses': [
                    'string',
                ],
                'allowedAnalysisProviders': [
                    '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 entire created configured table analysis rule object.

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

    • 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.

    • 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 analysis templates that are allowed by the custom analysis rule.

        • (string) --

      • allowedAnalysisProviders (list) --

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

        • (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',
                    ]
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ]
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        '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 created 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) --

          • 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.

          • 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 analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

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

              • (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.

GetConfiguredTableAnalysisRule (updated) Link ¶
Changes (response)
{'analysisRule': {'policy': {'v1': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}}

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',
                    ]
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ]
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        '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) --

          • 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.

          • 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 analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

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

              • (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.

GetProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'differentialPrivacy': {'sensitivityParameters': [{'aggregationExpression': 'string',
                                                                       'aggregationType': 'AVG '
                                                                                          '| '
                                                                                          'COUNT '
                                                                                          '| '
                                                                                          'COUNT_DISTINCT '
                                                                                          '| '
                                                                                          'SUM '
                                                                                          '| '
                                                                                          'STDDEV',
                                                                       'maxColumnValue': 'float',
                                                                       'minColumnValue': 'float',
                                                                       'userContributionLimit': 'integer'}]}}}

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'
                }
            }
        },
        '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.

      • 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.

GetSchemaAnalysisRule (updated) Link ¶
Changes (response)
{'analysisRule': {'policy': {'v1': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}}

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'
)
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',
        'name': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'policy': {
            'v1': {
                'list': {
                    'joinColumns': [
                        'string',
                    ],
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'listColumns': [
                        'string',
                    ]
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ]
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        'string',
                    ],
                    'differentialPrivacy': {
                        'columns': [
                            {
                                'name': '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) --

          • 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.

          • custom (dict) --

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

            • allowedAnalyses (list) --

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

              • (string) --

            • allowedAnalysisProviders (list) --

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

              • (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.

StartProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'differentialPrivacy': {'sensitivityParameters': [{'aggregationExpression': 'string',
                                                                       'aggregationType': 'AVG '
                                                                                          '| '
                                                                                          'COUNT '
                                                                                          '| '
                                                                                          'COUNT_DISTINCT '
                                                                                          '| '
                                                                                          'SUM '
                                                                                          '| '
                                                                                          'STDDEV',
                                                                       'maxColumnValue': 'float',
                                                                       'minColumnValue': 'float',
                                                                       'userContributionLimit': 'integer'}]}}}

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'
            }
        }
    }
)
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.

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'
                }
            }
        },
        '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.

      • 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': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}
Response
{'analysisRule': {'policy': {'v1': {'custom': {'differentialPrivacy': {'columns': [{'name': 'string'}]}}}}}}

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',
                ]
            },
            'aggregation': {
                'aggregateColumns': [
                    {
                        'columnNames': [
                            'string',
                        ],
                        'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                    },
                ],
                'joinColumns': [
                    'string',
                ],
                'joinRequired': 'QUERY_RUNNER',
                'allowedJoinOperators': [
                    'OR'|'AND',
                ],
                'dimensionColumns': [
                    'string',
                ],
                'scalarFunctions': [
                    'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                ],
                'outputConstraints': [
                    {
                        'columnName': 'string',
                        'minimum': 123,
                        'type': 'COUNT_DISTINCT'
                    },
                ]
            },
            'custom': {
                'allowedAnalyses': [
                    'string',
                ],
                'allowedAnalysisProviders': [
                    '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) --

    • 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.

    • 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 analysis templates that are allowed by the custom analysis rule.

        • (string) --

      • allowedAnalysisProviders (list) --

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

        • (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',
                    ]
                },
                'aggregation': {
                    'aggregateColumns': [
                        {
                            'columnNames': [
                                'string',
                            ],
                            'function': 'SUM'|'SUM_DISTINCT'|'COUNT'|'COUNT_DISTINCT'|'AVG'
                        },
                    ],
                    'joinColumns': [
                        'string',
                    ],
                    'joinRequired': 'QUERY_RUNNER',
                    'allowedJoinOperators': [
                        'OR'|'AND',
                    ],
                    'dimensionColumns': [
                        'string',
                    ],
                    'scalarFunctions': [
                        'TRUNC'|'ABS'|'CEILING'|'FLOOR'|'LN'|'LOG'|'ROUND'|'SQRT'|'CAST'|'LOWER'|'RTRIM'|'UPPER'|'COALESCE',
                    ],
                    'outputConstraints': [
                        {
                            'columnName': 'string',
                            'minimum': 123,
                            'type': 'COUNT_DISTINCT'
                        },
                    ]
                },
                'custom': {
                    'allowedAnalyses': [
                        'string',
                    ],
                    'allowedAnalysisProviders': [
                        '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) --

          • 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.

          • 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 analysis templates that are allowed by the custom analysis rule.

              • (string) --

            • allowedAnalysisProviders (list) --

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

              • (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.

UpdateProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'differentialPrivacy': {'sensitivityParameters': [{'aggregationExpression': 'string',
                                                                       'aggregationType': 'AVG '
                                                                                          '| '
                                                                                          'COUNT '
                                                                                          '| '
                                                                                          'COUNT_DISTINCT '
                                                                                          '| '
                                                                                          'SUM '
                                                                                          '| '
                                                                                          'STDDEV',
                                                                       'maxColumnValue': 'float',
                                                                       'minColumnValue': 'float',
                                                                       'userContributionLimit': 'integer'}]}}}

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'
                }
            }
        },
        '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.

      • 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.