AWS Clean Rooms Service

2023/08/30 - AWS Clean Rooms Service - 6 updated api methods

Changes  This release decouples member abilities in a collaboration. With this change, the member who can run queries no longer needs to be the same as the member who can receive results.

CreateMembership (updated) Link ¶
Changes (request, response)
Request
{'defaultResultConfiguration': {'outputConfiguration': {'s3': {'bucket': 'string',
                                                               'keyPrefix': 'string',
                                                               'resultFormat': 'CSV '
                                                                               '| '
                                                                               'PARQUET'}},
                                'roleArn': 'string'}}
Response
{'membership': {'defaultResultConfiguration': {'outputConfiguration': {'s3': {'bucket': 'string',
                                                                              'keyPrefix': 'string',
                                                                              'resultFormat': 'CSV '
                                                                                              '| '
                                                                                              'PARQUET'}},
                                               'roleArn': 'string'}}}

Creates a membership for a specific collaboration identifier and joins the collaboration.

See also: AWS API Documentation

Request Syntax

client.create_membership(
    collaborationIdentifier='string',
    queryLogStatus='ENABLED'|'DISABLED',
    tags={
        'string': 'string'
    },
    defaultResultConfiguration={
        'outputConfiguration': {
            's3': {
                'resultFormat': 'CSV'|'PARQUET',
                'bucket': 'string',
                'keyPrefix': 'string'
            }
        },
        'roleArn': 'string'
    }
)
type collaborationIdentifier

string

param collaborationIdentifier

[REQUIRED]

The unique ID for the associated collaboration.

type queryLogStatus

string

param queryLogStatus

[REQUIRED]

An indicator as to whether query logging has been enabled or disabled for the collaboration.

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 defaultResultConfiguration

dict

param defaultResultConfiguration

The default protected query result configuration as specified by the member who can receive results.

  • outputConfiguration (dict) -- [REQUIRED]

    Configuration for protected query results.

    • s3 (dict) --

      Contains the configuration to write the query results to S3.

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

  • roleArn (string) --

    The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

rtype

dict

returns

Response Syntax

{
    'membership': {
        'id': 'string',
        'arn': 'string',
        'collaborationArn': 'string',
        'collaborationId': 'string',
        'collaborationCreatorAccountId': 'string',
        'collaborationCreatorDisplayName': 'string',
        'collaborationName': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'REMOVED'|'COLLABORATION_DELETED',
        'memberAbilities': [
            'CAN_QUERY'|'CAN_RECEIVE_RESULTS',
        ],
        'queryLogStatus': 'ENABLED'|'DISABLED',
        'defaultResultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            },
            'roleArn': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • membership (dict) --

      The membership that was created.

      • id (string) --

        The unique ID of the membership.

      • arn (string) --

        The unique ARN for the membership.

      • collaborationArn (string) --

        The unique ARN for the membership's associated collaboration.

      • collaborationId (string) --

        The unique ID for the membership's collaboration.

      • collaborationCreatorAccountId (string) --

        The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.

      • collaborationCreatorDisplayName (string) --

        The display name of the collaboration creator.

      • collaborationName (string) --

        The name of the membership's collaboration.

      • createTime (datetime) --

        The time when the membership was created.

      • updateTime (datetime) --

        The time the membership metadata was last updated.

      • status (string) --

        The status of the membership. Valid values are ACTIVE, REMOVED, and COLLABORATION_DELETED.

      • memberAbilities (list) --

        The abilities granted to the collaboration member.

        • (string) --

      • queryLogStatus (string) --

        An indicator as to whether query logging has been enabled or disabled for the collaboration.

      • defaultResultConfiguration (dict) --

        The default protected query result configuration as specified by the member who can receive results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Contains the configuration to write the query results to S3.

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

        • roleArn (string) --

          The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

GetMembership (updated) Link ¶
Changes (response)
{'membership': {'defaultResultConfiguration': {'outputConfiguration': {'s3': {'bucket': 'string',
                                                                              'keyPrefix': 'string',
                                                                              'resultFormat': 'CSV '
                                                                                              '| '
                                                                                              'PARQUET'}},
                                               'roleArn': 'string'}}}

Retrieves a specified membership for an identifier.

See also: AWS API Documentation

Request Syntax

client.get_membership(
    membershipIdentifier='string'
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

The identifier for a membership resource.

rtype

dict

returns

Response Syntax

{
    'membership': {
        'id': 'string',
        'arn': 'string',
        'collaborationArn': 'string',
        'collaborationId': 'string',
        'collaborationCreatorAccountId': 'string',
        'collaborationCreatorDisplayName': 'string',
        'collaborationName': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'REMOVED'|'COLLABORATION_DELETED',
        'memberAbilities': [
            'CAN_QUERY'|'CAN_RECEIVE_RESULTS',
        ],
        'queryLogStatus': 'ENABLED'|'DISABLED',
        'defaultResultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            },
            'roleArn': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • membership (dict) --

      The membership retrieved for the provided identifier.

      • id (string) --

        The unique ID of the membership.

      • arn (string) --

        The unique ARN for the membership.

      • collaborationArn (string) --

        The unique ARN for the membership's associated collaboration.

      • collaborationId (string) --

        The unique ID for the membership's collaboration.

      • collaborationCreatorAccountId (string) --

        The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.

      • collaborationCreatorDisplayName (string) --

        The display name of the collaboration creator.

      • collaborationName (string) --

        The name of the membership's collaboration.

      • createTime (datetime) --

        The time when the membership was created.

      • updateTime (datetime) --

        The time the membership metadata was last updated.

      • status (string) --

        The status of the membership. Valid values are ACTIVE, REMOVED, and COLLABORATION_DELETED.

      • memberAbilities (list) --

        The abilities granted to the collaboration member.

        • (string) --

      • queryLogStatus (string) --

        An indicator as to whether query logging has been enabled or disabled for the collaboration.

      • defaultResultConfiguration (dict) --

        The default protected query result configuration as specified by the member who can receive results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Contains the configuration to write the query results to S3.

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

        • roleArn (string) --

          The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

GetProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'result': {'output': {'memberList': [{'accountId': 'string'}]}}}}

Returns query processing metadata.

See also: AWS API Documentation

Request Syntax

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

string

param membershipIdentifier

[REQUIRED]

The identifier for a membership in a protected query instance.

type protectedQueryIdentifier

string

param protectedQueryIdentifier

[REQUIRED]

The identifier for a protected query instance.

rtype

dict

returns

Response Syntax

{
    'protectedQuery': {
        'id': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'sqlParameters': {
            'queryString': 'string',
            'analysisTemplateArn': 'string',
            'parameters': {
                'string': 'string'
            }
        },
        'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
        'resultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            }
        },
        'statistics': {
            'totalDurationInMillis': 123
        },
        'result': {
            'output': {
                's3': {
                    'location': 'string'
                },
                'memberList': [
                    {
                        'accountId': 'string'
                    },
                ]
            }
        },
        'error': {
            'message': 'string',
            'code': 'string'
        }
    }
}

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.

StartProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'result': {'output': {'memberList': [{'accountId': 'string'}]}}}}

Creates a protected query that is started by Clean Rooms.

See also: AWS API Documentation

Request Syntax

client.start_protected_query(
    type='SQL',
    membershipIdentifier='string',
    sqlParameters={
        'queryString': 'string',
        'analysisTemplateArn': 'string',
        'parameters': {
            'string': 'string'
        }
    },
    resultConfiguration={
        'outputConfiguration': {
            's3': {
                'resultFormat': 'CSV'|'PARQUET',
                'bucket': 'string',
                'keyPrefix': 'string'
            }
        }
    }
)
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'
        }
    }
}

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.

UpdateMembership (updated) Link ¶
Changes (request, response)
Request
{'defaultResultConfiguration': {'outputConfiguration': {'s3': {'bucket': 'string',
                                                               'keyPrefix': 'string',
                                                               'resultFormat': 'CSV '
                                                                               '| '
                                                                               'PARQUET'}},
                                'roleArn': 'string'}}
Response
{'membership': {'defaultResultConfiguration': {'outputConfiguration': {'s3': {'bucket': 'string',
                                                                              'keyPrefix': 'string',
                                                                              'resultFormat': 'CSV '
                                                                                              '| '
                                                                                              'PARQUET'}},
                                               'roleArn': 'string'}}}

Updates a membership.

See also: AWS API Documentation

Request Syntax

client.update_membership(
    membershipIdentifier='string',
    queryLogStatus='ENABLED'|'DISABLED',
    defaultResultConfiguration={
        'outputConfiguration': {
            's3': {
                'resultFormat': 'CSV'|'PARQUET',
                'bucket': 'string',
                'keyPrefix': 'string'
            }
        },
        'roleArn': 'string'
    }
)
type membershipIdentifier

string

param membershipIdentifier

[REQUIRED]

The unique identifier of the membership.

type queryLogStatus

string

param queryLogStatus

An indicator as to whether query logging has been enabled or disabled for the collaboration.

type defaultResultConfiguration

dict

param defaultResultConfiguration

The default protected query result configuration as specified by the member who can receive results.

  • outputConfiguration (dict) -- [REQUIRED]

    Configuration for protected query results.

    • s3 (dict) --

      Contains the configuration to write the query results to S3.

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

  • roleArn (string) --

    The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

rtype

dict

returns

Response Syntax

{
    'membership': {
        'id': 'string',
        'arn': 'string',
        'collaborationArn': 'string',
        'collaborationId': 'string',
        'collaborationCreatorAccountId': 'string',
        'collaborationCreatorDisplayName': 'string',
        'collaborationName': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'REMOVED'|'COLLABORATION_DELETED',
        'memberAbilities': [
            'CAN_QUERY'|'CAN_RECEIVE_RESULTS',
        ],
        'queryLogStatus': 'ENABLED'|'DISABLED',
        'defaultResultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            },
            'roleArn': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • membership (dict) --

      The membership object.

      • id (string) --

        The unique ID of the membership.

      • arn (string) --

        The unique ARN for the membership.

      • collaborationArn (string) --

        The unique ARN for the membership's associated collaboration.

      • collaborationId (string) --

        The unique ID for the membership's collaboration.

      • collaborationCreatorAccountId (string) --

        The identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID.

      • collaborationCreatorDisplayName (string) --

        The display name of the collaboration creator.

      • collaborationName (string) --

        The name of the membership's collaboration.

      • createTime (datetime) --

        The time when the membership was created.

      • updateTime (datetime) --

        The time the membership metadata was last updated.

      • status (string) --

        The status of the membership. Valid values are ACTIVE, REMOVED, and COLLABORATION_DELETED.

      • memberAbilities (list) --

        The abilities granted to the collaboration member.

        • (string) --

      • queryLogStatus (string) --

        An indicator as to whether query logging has been enabled or disabled for the collaboration.

      • defaultResultConfiguration (dict) --

        The default protected query result configuration as specified by the member who can receive results.

        • outputConfiguration (dict) --

          Configuration for protected query results.

          • s3 (dict) --

            Contains the configuration to write the query results to S3.

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

        • roleArn (string) --

          The unique ARN for an IAM role that is used by Clean Rooms to write protected query results to the result location, given by the member who can receive results.

UpdateProtectedQuery (updated) Link ¶
Changes (response)
{'protectedQuery': {'result': {'output': {'memberList': [{'accountId': 'string'}]}}}}

Updates the processing of a currently running query.

See also: AWS API Documentation

Request Syntax

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

string

param membershipIdentifier

[REQUIRED]

The identifier for a member of a protected query instance.

type protectedQueryIdentifier

string

param protectedQueryIdentifier

[REQUIRED]

The identifier for a protected query instance.

type targetStatus

string

param targetStatus

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'protectedQuery': {
        'id': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'createTime': datetime(2015, 1, 1),
        'sqlParameters': {
            'queryString': 'string',
            'analysisTemplateArn': 'string',
            'parameters': {
                'string': 'string'
            }
        },
        'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT',
        'resultConfiguration': {
            'outputConfiguration': {
                's3': {
                    'resultFormat': 'CSV'|'PARQUET',
                    'bucket': 'string',
                    'keyPrefix': 'string'
                }
            }
        },
        'statistics': {
            'totalDurationInMillis': 123
        },
        'result': {
            'output': {
                's3': {
                    'location': 'string'
                },
                'memberList': [
                    {
                        'accountId': 'string'
                    },
                ]
            }
        },
        'error': {
            'message': 'string',
            'code': 'string'
        }
    }
}

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.