Skip to main content

memberships

Creates, updates, deletes, gets or lists a memberships resource.

Overview

Namememberships
TypeResource
Idaws.cleanrooms.memberships

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique ID of the membership. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
arnstringThe unique ARN for the membership. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+</code>)
collaboration_arnstringThe unique ARN for the membership's associated collaboration. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:collaboration/[\d\w-]+</code>)
collaboration_creator_account_idstringThe identifier used to reference members of the collaboration. Currently only supports Amazon Web Services account ID. (pattern: <code>\d+</code>)
collaboration_creator_display_namestringThe display name of the collaboration creator. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
collaboration_idstringThe unique ID for the membership's collaboration. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
collaboration_namestringThe name of the membership's collaboration. (pattern: <code>(?!\s*$)[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDBFF-\uDC00\uDFFF\t]*</code>)
create_timestring (date-time)The time when the membership was created.
default_job_result_configurationobjectContains configurations for protected job results.
default_result_configurationobjectContains configurations for protected query results.
is_metrics_enabledbooleanAn indicator as to whether Amazon CloudWatch metrics are enabled for the membership. When true, metrics about query execution are collected in Amazon CloudWatch.
job_log_statusstringAn indicator as to whether job logging has been enabled or disabled for the collaboration. When ENABLED, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is DISABLED. (ENABLED, DISABLED)
member_abilitiesarrayThe abilities granted to the collaboration member.
ml_member_abilitiesobjectThe ML member abilities for a collaboration member.
payment_configurationobjectAn object representing the payment responsibilities accepted by the collaboration member.
query_log_statusstringAn indicator as to whether query logging has been enabled or disabled for the membership. When ENABLED, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is DISABLED. (ENABLED, DISABLED)
statusstringThe status of the membership. (ACTIVE, REMOVED, COLLABORATION_DELETED)
update_timestring (date-time)The time the membership metadata was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_membershipselectmembership_identifier, regionRetrieves a specified membership for an identifier.
list_membershipsselectregionnextToken, maxResults, statusLists all memberships resources within the caller's account.
create_membershipinsertregion, collaborationIdentifier, queryLogStatusCreates a membership for a specific collaboration identifier and joins the collaboration.
update_membershipupdatemembership_identifier, regionUpdates a membership.
delete_membershipdeletemembership_identifier, regionDeletes a specified membership. All resources under a membership must be deleted.
start_analysis_log_exportexecmembership_identifier, region, analysisId, analysisType, resultConfigurationStarts an export of the Apache Spark logs for a protected query to an Amazon S3 bucket that you own. Use the exported logs to diagnose a query that failed or that ran more slowly than you expected. Clean Rooms exports a redacted copy of the Spark logs instead of the raw logs. Analyze the exported logs with the tooling of your choice, such as Spark History Server. For details about what the exported logs contain, see https:​//docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs-contents.html. The export runs asynchronously and returns with a status of IN_PROGRESS. Call GetAnalysisLogExport to poll for the final status. To use this operation, you must have the CAN_EXPORT_QUERY_ANALYSIS_LOG ability for your membership. You must also be the query runner or the query payer. Having the ability alone is not sufficient. The query must have reached a terminal state, and it must have reached the execution stage. A query that failed validation or that was canceled before it started produces no Spark logs. Log export isn't supported for queries that use differential privacy, and isn't supported for PySpark jobs. The destination bucket must be in the same Amazon Web Services Region as the collaboration. Cross-Region export isn't supported. For more information, see https:​//docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs.html.
start_protected_jobexecmembership_identifier, region, type, jobParametersCreates a protected job that is started by Clean Rooms.
start_protected_queryexecmembership_identifier, region, type, sqlParametersCreates a protected query that is started by Clean Rooms.
preview_privacy_impactexecmembership_identifier, region, parametersAn estimate of the number of aggregation functions that the member who can query can run given epsilon and noise parameters.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
membership_identifierstringA unique identifier for one of your memberships for a collaboration. Accepts a membership ID.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a nextToken even if the maxResults value has not been met.
nextTokenstringThe pagination token that's used to fetch the next set of results.
statusstringA filter which will return only memberships in the specified status.

SELECT examples

Retrieves a specified membership for an identifier.

SELECT
id,
arn,
collaboration_arn,
collaboration_creator_account_id,
collaboration_creator_display_name,
collaboration_id,
collaboration_name,
create_time,
default_job_result_configuration,
default_result_configuration,
is_metrics_enabled,
job_log_status,
member_abilities,
ml_member_abilities,
payment_configuration,
query_log_status,
status,
update_time
FROM aws.cleanrooms.memberships
WHERE membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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

INSERT INTO aws.cleanrooms.memberships (
collaborationIdentifier,
queryLogStatus,
jobLogStatus,
tags,
defaultResultConfiguration,
defaultJobResultConfiguration,
paymentConfiguration,
isMetricsEnabled,
region
)
SELECT
'{{ collaborationIdentifier }}' /* required */,
'{{ queryLogStatus }}' /* required */,
'{{ jobLogStatus }}',
'{{ tags }}',
'{{ defaultResultConfiguration }}',
'{{ defaultJobResultConfiguration }}',
'{{ paymentConfiguration }}',
{{ isMetricsEnabled }},
'{{ region }}'
RETURNING
membership
;

UPDATE examples

Updates a membership.

UPDATE aws.cleanrooms.memberships
SET
queryLogStatus = '{{ queryLogStatus }}',
jobLogStatus = '{{ jobLogStatus }}',
defaultResultConfiguration = '{{ defaultResultConfiguration }}',
defaultJobResultConfiguration = '{{ defaultJobResultConfiguration }}',
membershipPaymentConfiguration = '{{ membershipPaymentConfiguration }}'
WHERE
membership_identifier = '{{ membership_identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
membership;

DELETE examples

Deletes a specified membership. All resources under a membership must be deleted.

DELETE FROM aws.cleanrooms.memberships
WHERE membership_identifier = '{{ membership_identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Starts an export of the Apache Spark logs for a protected query to an Amazon S3 bucket that you own. Use the exported logs to diagnose a query that failed or that ran more slowly than you expected. Clean Rooms exports a redacted copy of the Spark logs instead of the raw logs. Analyze the exported logs with the tooling of your choice, such as Spark History Server. For details about what the exported logs contain, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs-contents.html. The export runs asynchronously and returns with a status of IN_PROGRESS. Call GetAnalysisLogExport to poll for the final status. To use this operation, you must have the CAN_EXPORT_QUERY_ANALYSIS_LOG ability for your membership. You must also be the query runner or the query payer. Having the ability alone is not sufficient. The query must have reached a terminal state, and it must have reached the execution stage. A query that failed validation or that was canceled before it started produces no Spark logs. Log export isn't supported for queries that use differential privacy, and isn't supported for PySpark jobs. The destination bucket must be in the same Amazon Web Services Region as the collaboration. Cross-Region export isn't supported. For more information, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs.html.

EXEC aws.cleanrooms.memberships.start_analysis_log_export
@membership_identifier='{{ membership_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"analysisId": "{{ analysisId }}",
"analysisType": "{{ analysisType }}",
"resultConfiguration": "{{ resultConfiguration }}"
}'
;