CleanRoomsService / Client / update_analysis_template

update_analysis_template

CleanRoomsService.Client.update_analysis_template(**kwargs)

Updates the analysis template metadata.

See also: AWS API Documentation

Request Syntax

response = client.update_analysis_template(
    membershipIdentifier='string',
    analysisTemplateIdentifier='string',
    description='string'
)
Parameters:
  • membershipIdentifier (string) –

    [REQUIRED]

    The identifier for a membership resource.

  • analysisTemplateIdentifier (string) –

    [REQUIRED]

    The identifier for the analysis template resource.

  • description (string) – A new description for the analysis template.

Return type:

dict

Returns:

Response Syntax

{
    'analysisTemplate': {
        'id': 'string',
        'arn': 'string',
        'collaborationId': 'string',
        'collaborationArn': 'string',
        'membershipId': 'string',
        'membershipArn': 'string',
        'description': 'string',
        'name': 'string',
        'createTime': datetime(2015, 1, 1),
        'updateTime': datetime(2015, 1, 1),
        'schema': {
            'referencedTables': [
                'string',
            ]
        },
        'format': 'SQL'|'PYSPARK_1_0',
        'source': {
            'text': 'string',
            'artifacts': {
                'entryPoint': {
                    'location': {
                        'bucket': 'string',
                        'key': 'string'
                    }
                },
                'additionalArtifacts': [
                    {
                        'location': {
                            'bucket': 'string',
                            'key': 'string'
                        }
                    },
                ],
                'roleArn': 'string'
            }
        },
        'sourceMetadata': {
            'artifacts': {
                'entryPointHash': {
                    'sha256': 'string'
                },
                'additionalArtifactHashes': [
                    {
                        'sha256': 'string'
                    },
                ]
            }
        },
        'analysisParameters': [
            {
                'name': 'string',
                'type': 'SMALLINT'|'INTEGER'|'BIGINT'|'DECIMAL'|'REAL'|'DOUBLE_PRECISION'|'BOOLEAN'|'CHAR'|'VARCHAR'|'DATE'|'TIMESTAMP'|'TIMESTAMPTZ'|'TIME'|'TIMETZ'|'VARBYTE'|'BINARY'|'BYTE'|'CHARACTER'|'DOUBLE'|'FLOAT'|'INT'|'LONG'|'NUMERIC'|'SHORT'|'STRING'|'TIMESTAMP_LTZ'|'TIMESTAMP_NTZ'|'TINYINT',
                'defaultValue': 'string'
            },
        ],
        'validations': [
            {
                'type': 'DIFFERENTIAL_PRIVACY',
                'status': 'VALID'|'INVALID'|'UNABLE_TO_VALIDATE',
                'reasons': [
                    {
                        'message': 'string'
                    },
                ]
            },
        ],
        'errorMessageConfiguration': {
            'type': 'DETAILED'
        },
        'syntheticDataParameters': {
            'mlSyntheticDataParameters': {
                'epsilon': 123.0,
                'maxMembershipInferenceAttackScore': 123.0,
                'columnClassification': {
                    'columnMapping': [
                        {
                            'columnName': 'string',
                            'columnType': 'CATEGORICAL'|'NUMERICAL',
                            'isPredictiveValue': True|False
                        },
                    ]
                }
            }
        }
    }
}

Response Structure

  • (dict) –

    • analysisTemplate (dict) –

      The analysis template.

      • id (string) –

        The identifier for the analysis template.

      • arn (string) –

        The Amazon Resource Name (ARN) of the analysis template.

      • collaborationId (string) –

        The unique ID for the associated collaboration of the analysis template.

      • collaborationArn (string) –

        The unique ARN for the analysis template’s associated collaboration.

      • membershipId (string) –

        The identifier of a member who created the analysis template.

      • membershipArn (string) –

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

      • description (string) –

        The description of the analysis template.

      • name (string) –

        The name of the analysis template.

      • createTime (datetime) –

        The time that the analysis template was created.

      • updateTime (datetime) –

        The time that the analysis template was last updated.

      • schema (dict) –

        The entire schema object.

        • referencedTables (list) –

          The tables referenced in the analysis schema.

          • (string) –

      • format (string) –

        The format of the analysis template.

      • source (dict) –

        The source of the analysis template.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: text, artifacts. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • text (string) –

          The query text.

        • artifacts (dict) –

          The artifacts of the analysis source.

          • entryPoint (dict) –

            The entry point for the analysis template artifacts.

            • location (dict) –

              The artifact location.

              • bucket (string) –

                The bucket name.

              • key (string) –

                The object key.

          • additionalArtifacts (list) –

            Additional artifacts for the analysis template.

            • (dict) –

              The analysis template artifact.

              • location (dict) –

                The artifact location.

                • bucket (string) –

                  The bucket name.

                • key (string) –

                  The object key.

          • roleArn (string) –

            The role ARN for the analysis template artifacts.

      • sourceMetadata (dict) –

        The source metadata for the analysis template.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: artifacts. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • artifacts (dict) –

          The artifacts of the analysis source metadata.

          • entryPointHash (dict) –

            The hash of the entry point for the analysis template artifact metadata.

            • sha256 (string) –

              The SHA-256 hash value.

          • additionalArtifactHashes (list) –

            Additional artifact hashes for the analysis template.

            • (dict) –

              Hash

              • sha256 (string) –

                The SHA-256 hash value.

      • analysisParameters (list) –

        The parameters of the analysis template.

        • (dict) –

          Optional. The member who can query can provide this placeholder for a literal data value in an analysis template.

          • name (string) –

            The name of the parameter. The name must use only alphanumeric, underscore (_), or hyphen (-) characters but cannot start or end with a hyphen.

          • type (string) –

            The type of parameter.

          • defaultValue (string) –

            Optional. The default value that is applied in the analysis template. The member who can query can override this value in the query editor.

      • validations (list) –

        Information about the validations performed on the analysis template.

        • (dict) –

          The status details of the analysis template validation. Clean Rooms Differential Privacy uses a general-purpose query structure to support complex SQL queries and validates whether an analysis template fits that general-purpose query structure. Validation is performed when analysis templates are created and fetched. Because analysis templates are immutable by design, we recommend that you create analysis templates after you associate the configured tables with their analysis rule to your collaboration.

          For more information, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/analysis-rules-custom.html#custom-diff-privacy.

          • type (string) –

            The type of validation that was performed.

          • status (string) –

            The status of the validation.

          • reasons (list) –

            The reasons for the validation results.

            • (dict) –

              The reasons for the validation results.

              • message (string) –

                The validation message.

      • errorMessageConfiguration (dict) –

        The configuration that specifies the level of detail in error messages returned by analyses using this template. When set to DETAILED, error messages include more information to help troubleshoot issues with PySpark jobs. Detailed error messages may expose underlying data, including sensitive information. Recommended for faster troubleshooting in development and testing environments.

        • type (string) –

          The level of detail for error messages returned by the PySpark job. When set to DETAILED, error messages include more information to help troubleshoot issues with your PySpark job.

          Because this setting may expose sensitive data, it is recommended for development and testing environments.

      • syntheticDataParameters (dict) –

        The parameters used to generate synthetic data for this analysis template.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: mlSyntheticDataParameters. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • mlSyntheticDataParameters (dict) –

          The machine learning-specific parameters for synthetic data generation.

          • epsilon (float) –

            The epsilon value for differential privacy when generating synthetic data. Lower values provide stronger privacy guarantees but may reduce data utility.

          • maxMembershipInferenceAttackScore (float) –

            The maximum acceptable score for membership inference attack vulnerability. Synthetic data generation fails if the score for the resulting data exceeds this threshold.

          • columnClassification (dict) –

            Classification details for data columns that specify how each column should be treated during synthetic data generation.

            • columnMapping (list) –

              A mapping that defines the classification of data columns for synthetic data generation and specifies how each column should be handled during the privacy-preserving data synthesis process.

              • (dict) –

                Properties that define how a specific data column should be handled during synthetic data generation, including its name, type, and role in predictive modeling.

                • columnName (string) –

                  The name of the data column as it appears in the dataset.

                • columnType (string) –

                  The data type of the column, which determines how the synthetic data generation algorithm processes and synthesizes values for this column.

                • isPredictiveValue (boolean) –

                  Indicates if this column contains predictive values that should be treated as target variables in machine learning models. This affects how the synthetic data generation preserves statistical relationships.

Exceptions