@aws-sdk/client-verifiedpermissions 3.451.0 → 3.454.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,298 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { BatchIsAuthorizedInput, BatchIsAuthorizedOutput } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link BatchIsAuthorizedCommand}.
14
+ */
15
+ export interface BatchIsAuthorizedCommandInput extends BatchIsAuthorizedInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link BatchIsAuthorizedCommand}.
21
+ */
22
+ export interface BatchIsAuthorizedCommandOutput extends BatchIsAuthorizedOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Makes a series of decisions about multiple authorization requests for one principal or
27
+ * resource. Each request contains the equivalent content of an <code>IsAuthorized</code>
28
+ * request: principal, action, resource, and context. Either the <code>principal</code> or
29
+ * the <code>resource</code> parameter must be identical across all requests. For example,
30
+ * Verified Permissions won't evaluate a pair of requests where <code>bob</code> views
31
+ * <code>photo1</code> and <code>alice</code> views <code>photo2</code>. Authorization
32
+ * of <code>bob</code> to view <code>photo1</code> and <code>photo2</code>, or
33
+ * <code>bob</code> and <code>alice</code> to view <code>photo1</code>, are valid
34
+ * batches. </p>
35
+ * <p>The request is evaluated against all policies in the specified policy store that match the
36
+ * entities that you declare. The result of the decisions is a series of <code>Allow</code>
37
+ * or <code>Deny</code> responses, along with the IDs of the policies that produced each
38
+ * decision.</p>
39
+ * <p>The <code>entities</code> of a <code>BatchIsAuthorized</code> API request can contain up to 100 principals and up
40
+ * to 100 resources. The <code>requests</code> of a <code>BatchIsAuthorized</code> API request can contain up to 30
41
+ * requests.</p>
42
+ * @example
43
+ * Use a bare-bones client and the command you need to make an API call.
44
+ * ```javascript
45
+ * import { VerifiedPermissionsClient, BatchIsAuthorizedCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
46
+ * // const { VerifiedPermissionsClient, BatchIsAuthorizedCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
47
+ * const client = new VerifiedPermissionsClient(config);
48
+ * const input = { // BatchIsAuthorizedInput
49
+ * policyStoreId: "STRING_VALUE", // required
50
+ * entities: { // EntitiesDefinition Union: only one key present
51
+ * entityList: [ // EntityList
52
+ * { // EntityItem
53
+ * identifier: { // EntityIdentifier
54
+ * entityType: "STRING_VALUE", // required
55
+ * entityId: "STRING_VALUE", // required
56
+ * },
57
+ * attributes: { // EntityAttributes
58
+ * "<keys>": { // AttributeValue Union: only one key present
59
+ * boolean: true || false,
60
+ * entityIdentifier: {
61
+ * entityType: "STRING_VALUE", // required
62
+ * entityId: "STRING_VALUE", // required
63
+ * },
64
+ * long: Number("long"),
65
+ * string: "STRING_VALUE",
66
+ * set: [ // SetAttribute
67
+ * {// Union: only one key present
68
+ * boolean: true || false,
69
+ * entityIdentifier: "<EntityIdentifier>",
70
+ * long: Number("long"),
71
+ * string: "STRING_VALUE",
72
+ * set: [
73
+ * "<AttributeValue>",
74
+ * ],
75
+ * record: { // RecordAttribute
76
+ * "<keys>": "<AttributeValue>",
77
+ * },
78
+ * },
79
+ * ],
80
+ * record: {
81
+ * "<keys>": "<AttributeValue>",
82
+ * },
83
+ * },
84
+ * },
85
+ * parents: [ // ParentList
86
+ * "<EntityIdentifier>",
87
+ * ],
88
+ * },
89
+ * ],
90
+ * },
91
+ * requests: [ // BatchIsAuthorizedInputList // required
92
+ * { // BatchIsAuthorizedInputItem
93
+ * principal: "<EntityIdentifier>",
94
+ * action: { // ActionIdentifier
95
+ * actionType: "STRING_VALUE", // required
96
+ * actionId: "STRING_VALUE", // required
97
+ * },
98
+ * resource: "<EntityIdentifier>",
99
+ * context: { // ContextDefinition Union: only one key present
100
+ * contextMap: { // ContextMap
101
+ * "<keys>": "<AttributeValue>",
102
+ * },
103
+ * },
104
+ * },
105
+ * ],
106
+ * };
107
+ * const command = new BatchIsAuthorizedCommand(input);
108
+ * const response = await client.send(command);
109
+ * // { // BatchIsAuthorizedOutput
110
+ * // results: [ // BatchIsAuthorizedOutputList // required
111
+ * // { // BatchIsAuthorizedOutputItem
112
+ * // request: { // BatchIsAuthorizedInputItem
113
+ * // principal: { // EntityIdentifier
114
+ * // entityType: "STRING_VALUE", // required
115
+ * // entityId: "STRING_VALUE", // required
116
+ * // },
117
+ * // action: { // ActionIdentifier
118
+ * // actionType: "STRING_VALUE", // required
119
+ * // actionId: "STRING_VALUE", // required
120
+ * // },
121
+ * // resource: {
122
+ * // entityType: "STRING_VALUE", // required
123
+ * // entityId: "STRING_VALUE", // required
124
+ * // },
125
+ * // context: { // ContextDefinition Union: only one key present
126
+ * // contextMap: { // ContextMap
127
+ * // "<keys>": { // AttributeValue Union: only one key present
128
+ * // boolean: true || false,
129
+ * // entityIdentifier: {
130
+ * // entityType: "STRING_VALUE", // required
131
+ * // entityId: "STRING_VALUE", // required
132
+ * // },
133
+ * // long: Number("long"),
134
+ * // string: "STRING_VALUE",
135
+ * // set: [ // SetAttribute
136
+ * // {// Union: only one key present
137
+ * // boolean: true || false,
138
+ * // entityIdentifier: "<EntityIdentifier>",
139
+ * // long: Number("long"),
140
+ * // string: "STRING_VALUE",
141
+ * // set: [
142
+ * // "<AttributeValue>",
143
+ * // ],
144
+ * // record: { // RecordAttribute
145
+ * // "<keys>": "<AttributeValue>",
146
+ * // },
147
+ * // },
148
+ * // ],
149
+ * // record: {
150
+ * // "<keys>": "<AttributeValue>",
151
+ * // },
152
+ * // },
153
+ * // },
154
+ * // },
155
+ * // },
156
+ * // decision: "ALLOW" || "DENY", // required
157
+ * // determiningPolicies: [ // DeterminingPolicyList // required
158
+ * // { // DeterminingPolicyItem
159
+ * // policyId: "STRING_VALUE", // required
160
+ * // },
161
+ * // ],
162
+ * // errors: [ // EvaluationErrorList // required
163
+ * // { // EvaluationErrorItem
164
+ * // errorDescription: "STRING_VALUE", // required
165
+ * // },
166
+ * // ],
167
+ * // },
168
+ * // ],
169
+ * // };
170
+ *
171
+ * ```
172
+ *
173
+ * @param BatchIsAuthorizedCommandInput - {@link BatchIsAuthorizedCommandInput}
174
+ * @returns {@link BatchIsAuthorizedCommandOutput}
175
+ * @see {@link BatchIsAuthorizedCommandInput} for command's `input` shape.
176
+ * @see {@link BatchIsAuthorizedCommandOutput} for command's `response` shape.
177
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
178
+ *
179
+ * @throws {@link ResourceNotFoundException} (client fault)
180
+ * <p>The request failed because it references a resource that doesn't exist.</p>
181
+ *
182
+ * @throws {@link AccessDeniedException} (client fault)
183
+ * <p>You don't have sufficient access to perform this action.</p>
184
+ *
185
+ * @throws {@link InternalServerException} (server fault)
186
+ * <p>The request failed because of an internal error. Try your request again later</p>
187
+ *
188
+ * @throws {@link ThrottlingException} (client fault)
189
+ * <p>The request failed because it exceeded a throttling quota.</p>
190
+ *
191
+ * @throws {@link ValidationException} (client fault)
192
+ * <p>The request failed because one or more input parameters don't satisfy their constraint
193
+ * requirements. The output is provided as a list of fields and a reason for each field that
194
+ * isn't valid.</p>
195
+ * <p>The possible reasons include the following:</p>
196
+ * <ul>
197
+ * <li>
198
+ * <p>
199
+ * <b>UnrecognizedEntityType</b>
200
+ * </p>
201
+ * <p>The policy includes an entity type that isn't found in the schema.</p>
202
+ * </li>
203
+ * <li>
204
+ * <p>
205
+ * <b>UnrecognizedActionId</b>
206
+ * </p>
207
+ * <p>The policy includes an action id that isn't found in the schema.</p>
208
+ * </li>
209
+ * <li>
210
+ * <p>
211
+ * <b>InvalidActionApplication</b>
212
+ * </p>
213
+ * <p>The policy includes an action that, according to the schema, doesn't support
214
+ * the specified principal and resource.</p>
215
+ * </li>
216
+ * <li>
217
+ * <p>
218
+ * <b>UnexpectedType</b>
219
+ * </p>
220
+ * <p>The policy included an operand that isn't a valid type for the specified
221
+ * operation.</p>
222
+ * </li>
223
+ * <li>
224
+ * <p>
225
+ * <b>IncompatibleTypes</b>
226
+ * </p>
227
+ * <p>The types of elements included in a <code>set</code>, or the types of
228
+ * expressions used in an <code>if...then...else</code> clause aren't compatible in
229
+ * this context.</p>
230
+ * </li>
231
+ * <li>
232
+ * <p>
233
+ * <b>MissingAttribute</b>
234
+ * </p>
235
+ * <p>The policy attempts to access a record or entity attribute that isn't
236
+ * specified in the schema. Test for the existence of the attribute first before
237
+ * attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
238
+ * <i>Cedar Policy Language Guide</i>.</p>
239
+ * </li>
240
+ * <li>
241
+ * <p>
242
+ * <b>UnsafeOptionalAttributeAccess</b>
243
+ * </p>
244
+ * <p>The policy attempts to access a record or entity attribute that is optional
245
+ * and isn't guaranteed to be present. Test for the existence of the attribute
246
+ * first before attempting to access its value. For more information, see the
247
+ * <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
248
+ * <i>Cedar Policy Language Guide</i>.</p>
249
+ * </li>
250
+ * <li>
251
+ * <p>
252
+ * <b>ImpossiblePolicy</b>
253
+ * </p>
254
+ * <p>Cedar has determined that a policy condition always evaluates to false. If
255
+ * the policy is always false, it can never apply to any query, and so it can never
256
+ * affect an authorization decision.</p>
257
+ * </li>
258
+ * <li>
259
+ * <p>
260
+ * <b>WrongNumberArguments</b>
261
+ * </p>
262
+ * <p>The policy references an extension type with the wrong number of
263
+ * arguments.</p>
264
+ * </li>
265
+ * <li>
266
+ * <p>
267
+ * <b>FunctionArgumentValidationError</b>
268
+ * </p>
269
+ * <p>Cedar couldn't parse the argument passed to an extension type. For example,
270
+ * a string that is to be parsed as an IPv4 address can contain only digits and the
271
+ * period character.</p>
272
+ * </li>
273
+ * </ul>
274
+ *
275
+ * @throws {@link VerifiedPermissionsServiceException}
276
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
277
+ *
278
+ */
279
+ export declare class BatchIsAuthorizedCommand extends $Command<BatchIsAuthorizedCommandInput, BatchIsAuthorizedCommandOutput, VerifiedPermissionsClientResolvedConfig> {
280
+ readonly input: BatchIsAuthorizedCommandInput;
281
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
282
+ /**
283
+ * @public
284
+ */
285
+ constructor(input: BatchIsAuthorizedCommandInput);
286
+ /**
287
+ * @internal
288
+ */
289
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: VerifiedPermissionsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchIsAuthorizedCommandInput, BatchIsAuthorizedCommandOutput>;
290
+ /**
291
+ * @internal
292
+ */
293
+ private serialize;
294
+ /**
295
+ * @internal
296
+ */
297
+ private deserialize;
298
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./BatchIsAuthorizedCommand";
1
2
  export * from "./CreateIdentitySourceCommand";
2
3
  export * from "./CreatePolicyCommand";
3
4
  export * from "./CreatePolicyStoreCommand";