CleanRoomsService / Client / start_analysis_log_export
start_analysis_log_export¶
- CleanRoomsService.Client.start_analysis_log_export(**kwargs)¶
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
statusofIN_PROGRESS. CallGetAnalysisLogExportto poll for the final status.Warning
To use this operation, you must have the
CAN_EXPORT_QUERY_ANALYSIS_LOGability 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.
See also: AWS API Documentation
Request Syntax
response = client.start_analysis_log_export( membershipIdentifier='string', analysisId='string', analysisType='PROTECTED_QUERY', resultConfiguration={ 'outputConfiguration': { 's3': { 'bucket': 'string', 'keyPrefix': 'string' } } } )
- Parameters:
membershipIdentifier (string) –
[REQUIRED]
A unique identifier for the membership to export the analysis logs for. Currently accepts a membership ID.
analysisId (string) –
[REQUIRED]
The unique identifier of the protected query that you want to export the analysis logs for.
analysisType (string) –
[REQUIRED]
The type of analysis that the logs are exported for. Currently, only
PROTECTED_QUERYis supported.resultConfiguration (dict) –
[REQUIRED]
The details needed to write the exported analysis logs.
You don’t need to create an IAM role for log export. Clean Rooms writes the exported logs using your own identity, so Clean Rooms writes the exported logs only where your existing permissions allow.
outputConfiguration (dict) – [REQUIRED]
The configuration for analysis log export results.
s3 (dict) – [REQUIRED]
Required configuration for an analysis log export with an
s3output type.bucket (string) – [REQUIRED]
The S3 bucket that the exported analysis logs are written to. The bucket must be in the same Amazon Web Services Region as the collaboration.
keyPrefix (string) –
The S3 key prefix under which the exported analysis logs are written.
Only one export can be in progress at a time for a given query and destination. To export the same query twice at once, use a different key prefix for the second export.
- Return type:
dict
- Returns:
Response Syntax
{ 'analysisLogExport': { 'analysisLogExportId': 'string', 'analysisId': 'string', 'analysisType': 'PROTECTED_QUERY', 'membershipId': 'string', 'status': 'IN_PROGRESS'|'SUCCESS'|'FAILED', 'resultConfiguration': { 'outputConfiguration': { 's3': { 'bucket': 'string', 'keyPrefix': 'string' } } }, 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'error': { 'code': 'string', 'message': 'string' } } }
Response Structure
(dict) –
analysisLogExport (dict) –
The analysis log export that was started. The
statusisIN_PROGRESS.analysisLogExportId (string) –
The unique identifier of the analysis log export.
analysisId (string) –
The unique identifier of the protected query that the analysis logs were exported for.
analysisType (string) –
The type of analysis that the logs were exported for. Currently, only
PROTECTED_QUERYis supported.membershipId (string) –
The unique identifier of the membership that the analysis log export belongs to.
status (string) –
The status of the analysis log export. Possible values are:
IN_PROGRESS– The export is currently running.SUCCESS– The export completed successfully.FAILED– The export failed. See theerrorfield for details.
resultConfiguration (dict) –
Contains the details needed to write the exported analysis logs.
outputConfiguration (dict) –
The configuration for analysis log export results.
s3 (dict) –
Required configuration for an analysis log export with an
s3output type.bucket (string) –
The S3 bucket that the exported analysis logs are written to. The bucket must be in the same Amazon Web Services Region as the collaboration.
keyPrefix (string) –
The S3 key prefix under which the exported analysis logs are written.
Only one export can be in progress at a time for a given query and destination. To export the same query twice at once, use a different key prefix for the second export.
createTime (datetime) –
The time the analysis log export was created.
updateTime (datetime) –
The time the analysis log export was last updated.
error (dict) –
The analysis log export error. This is present only when the export
statusisFAILED.code (string) –
The error code for the analysis log export.
message (string) –
The message for the analysis log export error.
Exceptions
CleanRoomsService.Client.exceptions.ServiceQuotaExceededExceptionCleanRoomsService.Client.exceptions.ResourceNotFoundExceptionCleanRoomsService.Client.exceptions.InternalServerExceptionCleanRoomsService.Client.exceptions.ValidationExceptionCleanRoomsService.Client.exceptions.ThrottlingExceptionCleanRoomsService.Client.exceptions.AccessDeniedException