- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StartProtectedQueryCommand
Creates a protected query that is started by Clean Rooms.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CleanRoomsClient, StartProtectedQueryCommand } from "@aws-sdk/client-cleanrooms"; // ES Modules import
// const { CleanRoomsClient, StartProtectedQueryCommand } = require("@aws-sdk/client-cleanrooms"); // CommonJS import
const client = new CleanRoomsClient(config);
const input = { // StartProtectedQueryInput
type: "STRING_VALUE", // required
membershipIdentifier: "STRING_VALUE", // required
sqlParameters: { // ProtectedQuerySQLParameters
queryString: "STRING_VALUE",
analysisTemplateArn: "STRING_VALUE",
parameters: { // ParameterMap
"<keys>": "STRING_VALUE",
},
},
resultConfiguration: { // ProtectedQueryResultConfiguration
outputConfiguration: { // ProtectedQueryOutputConfiguration Union: only one key present
s3: { // ProtectedQueryS3OutputConfiguration
resultFormat: "STRING_VALUE", // required
bucket: "STRING_VALUE", // required
keyPrefix: "STRING_VALUE",
singleFileOutput: true || false,
},
member: { // ProtectedQueryMemberOutputConfiguration
accountId: "STRING_VALUE", // required
},
},
},
computeConfiguration: { // ComputeConfiguration Union: only one key present
worker: { // WorkerComputeConfiguration
type: "CR.1X" || "CR.4X",
number: Number("int"),
},
},
};
const command = new StartProtectedQueryCommand(input);
const response = await client.send(command);
// { // StartProtectedQueryOutput
// protectedQuery: { // ProtectedQuery
// id: "STRING_VALUE", // required
// membershipId: "STRING_VALUE", // required
// membershipArn: "STRING_VALUE", // required
// createTime: new Date("TIMESTAMP"), // required
// sqlParameters: { // ProtectedQuerySQLParameters
// queryString: "STRING_VALUE",
// analysisTemplateArn: "STRING_VALUE",
// parameters: { // ParameterMap
// "<keys>": "STRING_VALUE",
// },
// },
// status: "STRING_VALUE", // required
// resultConfiguration: { // ProtectedQueryResultConfiguration
// outputConfiguration: { // ProtectedQueryOutputConfiguration Union: only one key present
// s3: { // ProtectedQueryS3OutputConfiguration
// resultFormat: "STRING_VALUE", // required
// bucket: "STRING_VALUE", // required
// keyPrefix: "STRING_VALUE",
// singleFileOutput: true || false,
// },
// member: { // ProtectedQueryMemberOutputConfiguration
// accountId: "STRING_VALUE", // required
// },
// },
// },
// statistics: { // ProtectedQueryStatistics
// totalDurationInMillis: Number("long"),
// billedResourceUtilization: { // BilledResourceUtilization
// units: Number("double"), // required
// },
// },
// result: { // ProtectedQueryResult
// output: { // ProtectedQueryOutput Union: only one key present
// s3: { // ProtectedQueryS3Output
// location: "STRING_VALUE", // required
// },
// memberList: [ // ProtectedQueryMemberOutputList
// { // ProtectedQuerySingleMemberOutput
// accountId: "STRING_VALUE", // required
// },
// ],
// },
// },
// error: { // ProtectedQueryError
// message: "STRING_VALUE", // required
// code: "STRING_VALUE", // required
// },
// differentialPrivacy: { // DifferentialPrivacyParameters
// sensitivityParameters: [ // DifferentialPrivacySensitivityParametersList // required
// { // DifferentialPrivacySensitivityParameters
// aggregationType: "AVG" || "COUNT" || "COUNT_DISTINCT" || "SUM" || "STDDEV", // required
// aggregationExpression: "STRING_VALUE", // required
// userContributionLimit: Number("int"), // required
// minColumnValue: Number("float"),
// maxColumnValue: Number("float"),
// },
// ],
// },
// computeConfiguration: { // ComputeConfiguration Union: only one key present
// worker: { // WorkerComputeConfiguration
// type: "CR.1X" || "CR.4X",
// number: Number("int"),
// },
// },
// },
// };
StartProtectedQueryCommand Input
See StartProtectedQueryCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
membershipIdentifier Required | string | undefined | A unique identifier for the membership to run this query against. Currently accepts a membership ID. |
sqlParameters Required | ProtectedQuerySQLParameters | undefined | The protected SQL query parameters. |
type Required | ProtectedQueryType | undefined | The type of the protected query to be started. |
computeConfiguration | ComputeConfiguration | undefined | The compute configuration for the protected query. |
resultConfiguration | ProtectedQueryResultConfiguration | undefined | The details needed to write the query results. |
StartProtectedQueryCommand Output
See StartProtectedQueryCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
protectedQuery Required | ProtectedQuery | undefined | The protected query. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Caller does not have sufficient access to perform this action. |
InternalServerException | server | Unexpected error during processing of request. |
ResourceNotFoundException | client | Request references a resource which does not exist. |
ServiceQuotaExceededException | client | Request denied because service quota has been exceeded. |
ThrottlingException | client | Request was denied due to request throttling. |
ValidationException | client | The input fails to satisfy the specified constraints. |
CleanRoomsServiceException | Base exception class for all service exceptions from CleanRooms service. |