---
title: "GET /memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}"
method: GET
path: "/memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}"
---

# GET /memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}

`GET /memberships/{membershipIdentifier}/protectedQueries/{protectedQueryIdentifier}`

Returns query processing metadata.

## Path parameters

- `membershipIdentifier` string, required
- `protectedQueryIdentifier` string, required

## Response `200`

Success

- GetProtectedQueryOutput
  - `protectedQuery` object, required — The query processing metadata.
    - `id` string, required — The identifier for a protected query instance.
    - `membershipId` string, required — The identifier for the membership.
    - `membershipArn` string, required — The ARN of the membership.
    - `createTime` string, date-time, required — The time at which the protected query was created.
    - `sqlParameters` object — 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` object — The protected query SQL parameters.
    - `status` 'SUBMITTED' | 'STARTED' | 'CANCELLED' | 'CANCELLING' | 'FAILED' | 'SUCCESS' | 'TIMED_OUT', required — The status of the query.
    - `resultConfiguration` object — Contains any details needed to write the query results.
      - `outputConfiguration` object, required — Configuration for protected query results.
        - `s3` object — Required configuration for a protected query with an <code>s3</code> output type.
          - `resultFormat` 'CSV' | 'PARQUET', 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.
          - `singleFileOutput` boolean — Indicates whether files should be output as a single file (<code>TRUE</code>) or output as multiple files (<code>FALSE</code>). This parameter is only supported for analyses with the Spark analytics engine.
        - `member` object — Required configuration for a protected query with a <code>member</code> output type.
          - `accountId` string, required — The unique identifier for the account.
        - `distribute` object — Required configuration for a protected query with a <code>distribute</code> output type.
          - `locations` ProtectedQueryDistributeOutputConfigurationLocation[], required — <p> A list of locations where you want to distribute the protected query results. Each location must specify either an S3 destination or a collaboration member destination.</p> <important> <p>You can't specify more than one S3 location.</p> <p>You can't specify the query runner's account as a member location.</p> <p>You must include either an S3 or member output configuration for each location, but not both.</p> </important>
            - `s3` ProtectedQueryS3OutputConfiguration — Contains the configuration to write the query results to S3.
              - …
            - `member` ProtectedQueryMemberOutputConfiguration — Contains configuration details for the protected query member output.
              - …
        - `intermediateTable` object — The intermediate table output configuration, present when the protected query was triggered by a populate operation.
          - `id` string, required — The unique identifier of the intermediate table.
          - `arn` string, required — The Amazon Resource Name (ARN) of the intermediate table.
          - `name` string, required — The name of the intermediate table.
    - `statistics` object — Statistics about protected query execution.
      - `totalDurationInMillis` integer — The duration of the protected query, from creation until query completion, in milliseconds.
      - `billedResourceUtilization` object — The billed resource utilization.
        - `units` number, double, required — The number of Clean Rooms Processing Unit (CRPU) hours that have been billed.
    - `result` object — The result of the protected query.
      - `output` object, required — The output of the protected query.
        - `s3` object — If present, the output for a protected query with an <code>S3</code> output type.
          - `location` string, required — The S3 location of the result.
        - `memberList` ProtectedQuerySingleMemberOutput[] — The list of member Amazon Web Services account(s) that received the results of the query.
          - `accountId` string, required — The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.
        - `distribute` object — <p>Contains output information for protected queries that use a <code>distribute</code> output type. This output type lets you send query results to multiple locations - either to S3 or to collaboration members. </p> <note> <p> You can only use the <code>distribute</code> output type with the Spark analytics engine. </p> </note>
          - `s3` ProtectedQueryS3Output — Contains output information for protected queries with an S3 output type.
            - `location` string, required — The S3 location of the result.
          - `memberList` ProtectedQuerySingleMemberOutput[] — Contains the output results for each member location specified in the distribute output configuration. Each entry provides details about the result distribution to a specific collaboration member.
            - `accountId` string, required — The Amazon Web Services account ID of the member in the collaboration who can receive results for the query.
    - `error` object — An error thrown by the protected query.
      - `message` string, required — A description of why the query failed.
      - `code` string, required — An error code for the error.
    - `differentialPrivacy` object — The sensitivity parameters of the differential privacy results of the protected query.
      - `sensitivityParameters` DifferentialPrivacySensitivityParameters[], required — Provides the sensitivity parameters that you can use to better understand the total amount of noise in query results.
        - `aggregationType` 'AVG' | 'COUNT' | 'COUNT_DISTINCT' | 'SUM' | 'STDDEV', required — The type of aggregation function that was run.
        - `aggregationExpression` string, required — The aggregation expression that was run.
        - `userContributionLimit` integer, required — The maximum number of rows contributed by a user in a SQL query.
        - `minColumnValue` number, float — The lower bound of the aggregation expression.
        - `maxColumnValue` number, float — The upper bound of the aggregation expression.
    - `computeConfiguration` object — The compute configuration for the protected query.
      - `worker` object — The worker configuration for the compute environment.
        - `type` 'CR.1X' | 'CR.4X' — The worker compute configuration type.
        - `number` integer — <p> The number of workers.</p> <p>SQL queries support a minimum value of 2 and a maximum value of 400. </p> <p>PySpark jobs support a minimum value of 4 and a maximum value of 128.</p>
        - `properties` unknown
    - `queryComputePayerAccountId` string — The account ID of the member that pays for the query compute costs.

## Other responses

- `480` — ResourceNotFoundException
- `481` — InternalServerException
- `482` — ValidationException
- `483` — ThrottlingException
- `484` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/cleanrooms.md) · [All operations](https://skmtc.net/aws/apis/cleanrooms/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/cleanrooms/versions/17ce59ba806e/schema)
