@aws-sdk/client-verifiedpermissions 3.661.0 → 3.664.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.
Files changed (35) hide show
  1. package/dist-cjs/runtimeConfig.js +1 -0
  2. package/dist-es/runtimeConfig.js +2 -1
  3. package/dist-types/commands/BatchIsAuthorizedCommand.d.ts +161 -0
  4. package/dist-types/commands/BatchIsAuthorizedWithTokenCommand.d.ts +135 -0
  5. package/dist-types/commands/CreateIdentitySourceCommand.d.ts +29 -0
  6. package/dist-types/commands/CreatePolicyCommand.d.ts +108 -0
  7. package/dist-types/commands/CreatePolicyStoreCommand.d.ts +22 -0
  8. package/dist-types/commands/CreatePolicyTemplateCommand.d.ts +22 -0
  9. package/dist-types/commands/DeleteIdentitySourceCommand.d.ts +12 -0
  10. package/dist-types/commands/DeletePolicyCommand.d.ts +12 -0
  11. package/dist-types/commands/DeletePolicyStoreCommand.d.ts +11 -0
  12. package/dist-types/commands/DeletePolicyTemplateCommand.d.ts +12 -0
  13. package/dist-types/commands/GetIdentitySourceCommand.d.ts +29 -0
  14. package/dist-types/commands/GetPolicyCommand.d.ts +31 -0
  15. package/dist-types/commands/GetPolicyStoreCommand.d.ts +22 -0
  16. package/dist-types/commands/GetPolicyTemplateCommand.d.ts +22 -0
  17. package/dist-types/commands/GetSchemaCommand.d.ts +24 -0
  18. package/dist-types/commands/IsAuthorizedCommand.d.ts +66 -0
  19. package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +37 -0
  20. package/dist-types/commands/ListIdentitySourcesCommand.d.ts +32 -0
  21. package/dist-types/commands/ListPoliciesCommand.d.ts +164 -0
  22. package/dist-types/commands/ListPolicyStoresCommand.d.ts +25 -0
  23. package/dist-types/commands/ListPolicyTemplatesCommand.d.ts +31 -0
  24. package/dist-types/commands/PutSchemaCommand.d.ts +29 -0
  25. package/dist-types/commands/UpdateIdentitySourceCommand.d.ts +28 -0
  26. package/dist-types/commands/UpdatePolicyCommand.d.ts +30 -0
  27. package/dist-types/commands/UpdatePolicyStoreCommand.d.ts +22 -0
  28. package/dist-types/commands/UpdatePolicyTemplateCommand.d.ts +27 -0
  29. package/dist-types/runtimeConfig.browser.d.ts +2 -1
  30. package/dist-types/runtimeConfig.d.ts +2 -1
  31. package/dist-types/runtimeConfig.native.d.ts +2 -1
  32. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  33. package/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  34. package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  35. package/package.json +35 -35
@@ -188,6 +188,37 @@ declare const GetPolicyCommand_base: {
188
188
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
189
189
  *
190
190
  * @public
191
+ * @example To retrieve details about a policy
192
+ * ```javascript
193
+ * // The following example retrieves information about the specified policy contained in the specified policy store. In this example, the requested policy is a template-linked policy, so it returns the ID of the policy template, and the specific principal and resource used by this policy.
194
+ * const input = {
195
+ * "policyId": "9wYixMplbbZQb5fcZHyJhY",
196
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
197
+ * };
198
+ * const command = new GetPolicyCommand(input);
199
+ * const response = await client.send(command);
200
+ * /* response ==
201
+ * {
202
+ * "createdDate": "2024-08-12T18:20:50.99Z",
203
+ * "definition": {
204
+ * "static": {
205
+ * "description": "Grant everyone of janeFriends UserGroup access to the vacationFolder Album",
206
+ * "statement": "permit(principal, action, resource in Album::\"publicFolder\");"
207
+ * }
208
+ * },
209
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
210
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
211
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
212
+ * "policyType": "STATIC",
213
+ * "resource": {
214
+ * "entityId": "publicFolder",
215
+ * "entityType": "Album"
216
+ * }
217
+ * }
218
+ * *\/
219
+ * // example id: example-1
220
+ * ```
221
+ *
191
222
  */
192
223
  export declare class GetPolicyCommand extends GetPolicyCommand_base {
193
224
  /** @internal type navigation helper, not in runtime. */
@@ -158,6 +158,28 @@ declare const GetPolicyStoreCommand_base: {
158
158
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
159
159
  *
160
160
  * @public
161
+ * @example GetPolicyStore
162
+ * ```javascript
163
+ * // The following example retrieves details about the specified policy store.
164
+ * const input = {
165
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
166
+ * };
167
+ * const command = new GetPolicyStoreCommand(input);
168
+ * const response = await client.send(command);
169
+ * /* response ==
170
+ * {
171
+ * "arn": "arn:aws:verifiedpermissions::123456789012:policy-store/C7v5xMplfFH3i3e4Jrzb1a",
172
+ * "createdDate": "2024-08-12T18:20:50.99Z",
173
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
174
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
175
+ * "validationSettings": {
176
+ * "mode": "STRICT"
177
+ * }
178
+ * }
179
+ * *\/
180
+ * // example id: example-1
181
+ * ```
182
+ *
161
183
  */
162
184
  export declare class GetPolicyStoreCommand extends GetPolicyStoreCommand_base {
163
185
  /** @internal type navigation helper, not in runtime. */
@@ -157,6 +157,28 @@ declare const GetPolicyTemplateCommand_base: {
157
157
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
158
158
  *
159
159
  * @public
160
+ * @example GetPolicyTemplate
161
+ * ```javascript
162
+ * // The following example displays the details of the specified policy template.
163
+ * const input = {
164
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
165
+ * "policyTemplateId": "PTEXAMPLEabcdefg111111"
166
+ * };
167
+ * const command = new GetPolicyTemplateCommand(input);
168
+ * const response = await client.send(command);
169
+ * /* response ==
170
+ * {
171
+ * "createdDate": "2024-08-12T18:20:50.99Z",
172
+ * "description": "Template for research dept",
173
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
174
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
175
+ * "policyTemplateId": "PTEXAMPLEabcdefg111111",
176
+ * "statement": "permit(\n principal ?principal,\n action == Action::\"view\",\n resource in ?resource\n) when {\n principal has department && principal.department == \"research\" \n};"
177
+ * }
178
+ * *\/
179
+ * // example id: example-1
180
+ * ```
181
+ *
160
182
  */
161
183
  export declare class GetPolicyTemplateCommand extends GetPolicyTemplateCommand_base {
162
184
  /** @internal type navigation helper, not in runtime. */
@@ -157,6 +157,30 @@ declare const GetSchemaCommand_base: {
157
157
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
158
158
  *
159
159
  * @public
160
+ * @example GetSchema
161
+ * ```javascript
162
+ * // The following example retrieves the current schema stored in the specified policy store.
163
+ * //
164
+ * // Note
165
+ * // The JSON in the parameters of this operation are strings that can contain embedded quotation marks (") within the outermost quotation mark pair. This requires that you stringify the JSON object by preceding all embedded quotation marks with a backslash character ( \" ) and combining all lines into a single text line with no line breaks.
166
+ * //
167
+ * // Example strings might be displayed wrapped across multiple lines here for readability, but the operation requires the parameters be submitted as single line strings.
168
+ * const input = {
169
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
170
+ * };
171
+ * const command = new GetSchemaCommand(input);
172
+ * const response = await client.send(command);
173
+ * /* response ==
174
+ * {
175
+ * "createdDate": "2024-08-12T18:20:50.99Z",
176
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
177
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
178
+ * "schema": "{\n\"My::Application\": {\n\"actions\": {\n\"remoteAccess\": {\n\"appliesTo\": {\n\"principalTypes\": [\"Employee\"]\n}\n}\n},\n\"entityTypes\": {\n\"Employee\": {\n\"shape\": {\n\"attributes\": {\n\"jobLevel\": { \"type\": \"Long\" },\n\"name\": { \"type\":\"String\" }\n},\n\"type\": \"Record\"\n}\n}\n}\n}\n }"
179
+ * }
180
+ * *\/
181
+ * // example id: example-1
182
+ * ```
183
+ *
160
184
  */
161
185
  export declare class GetSchemaCommand extends GetSchemaCommand_base {
162
186
  /** @internal type navigation helper, not in runtime. */
@@ -221,6 +221,72 @@ declare const IsAuthorizedCommand_base: {
221
221
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
222
222
  *
223
223
  * @public
224
+ * @example IsAuthorized - Example 1
225
+ * ```javascript
226
+ * // The following example requests an authorization decision for a principal of type User named Alice, who wants to perform the updatePhoto operation, on a resource of type Photo named VacationPhoto94.jpg.
227
+ * //
228
+ * // The response shows that the request was allowed by one policy.
229
+ * const input = {
230
+ * "action": {
231
+ * "actionId": "view",
232
+ * "actionType": "Action"
233
+ * },
234
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
235
+ * "principal": {
236
+ * "entityId": "alice",
237
+ * "entityType": "User"
238
+ * },
239
+ * "resource": {
240
+ * "entityId": "VacationPhoto94.jpg",
241
+ * "entityType": "Photo"
242
+ * }
243
+ * };
244
+ * const command = new IsAuthorizedCommand(input);
245
+ * const response = await client.send(command);
246
+ * /* response ==
247
+ * {
248
+ * "errors": [],
249
+ * "decision": "ALLOW",
250
+ * "determiningPolicies": [
251
+ * {
252
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY"
253
+ * }
254
+ * ]
255
+ * }
256
+ * *\/
257
+ * // example id: example-1
258
+ * ```
259
+ *
260
+ * @example IsAuthorized - Example 2
261
+ * ```javascript
262
+ * // The following example is the same as the previous example, except that the principal is User::"bob", and the policy store doesn't contain any policy that allows that user access to Album::"alice_folder". The output infers that the Deny was implicit because the list of DeterminingPolicies is empty.
263
+ * const input = {
264
+ * "action": {
265
+ * "actionId": "view",
266
+ * "actionType": "Action"
267
+ * },
268
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
269
+ * "principal": {
270
+ * "entityId": "bob",
271
+ * "entityType": "User"
272
+ * },
273
+ * "resource": {
274
+ * "entityId": "VacationPhoto94.jpg",
275
+ * "entityType": "Photo"
276
+ * }
277
+ * };
278
+ * const command = new IsAuthorizedCommand(input);
279
+ * const response = await client.send(command);
280
+ * /* response ==
281
+ * {
282
+ * "errors": [],
283
+ * "decision": "DENY",
284
+ * "determiningPolicies": []
285
+ * }
286
+ * *\/
287
+ * // example id: example-2
288
+ * ```
289
+ *
224
290
  */
225
291
  export declare class IsAuthorizedCommand extends IsAuthorizedCommand_base {
226
292
  /** @internal type navigation helper, not in runtime. */
@@ -231,6 +231,43 @@ declare const IsAuthorizedWithTokenCommand_base: {
231
231
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
232
232
  *
233
233
  * @public
234
+ * @example IsAuthorizedWithToken - Example 1
235
+ * ```javascript
236
+ * // The following example requests an authorization decision for a user who was authenticated by Amazon Cognito. The request uses the identity token provided by Amazon Cognito instead of the access token. In this example, the specified information store is configured to return principals as entities of type CognitoUser. The policy store contains a policy with the following statement.
237
+ * //
238
+ * // permit(
239
+ * // principal == CognitoUser::"us-east-1_1a2b3c4d5|a1b2c3d4e5f6g7h8i9j0kalbmc",
240
+ * // action,
241
+ * // resource == Photo::"VacationPhoto94.jpg"
242
+ * // );
243
+ * const input = {
244
+ * "action": {
245
+ * "actionId": "View",
246
+ * "actionType": "Action"
247
+ * },
248
+ * "identityToken": "EgZjxMPlbWUyBggAEEUYOdIBCDM3NDlqMGo3qAIAsAIA",
249
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
250
+ * "resource": {
251
+ * "entityId": "vacationPhoto94.jpg",
252
+ * "entityType": "Photo"
253
+ * }
254
+ * };
255
+ * const command = new IsAuthorizedWithTokenCommand(input);
256
+ * const response = await client.send(command);
257
+ * /* response ==
258
+ * {
259
+ * "errors": [],
260
+ * "decision": "ALLOW",
261
+ * "determiningPolicies": [
262
+ * {
263
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY"
264
+ * }
265
+ * ]
266
+ * }
267
+ * *\/
268
+ * // example id: example-1
269
+ * ```
270
+ *
234
271
  */
235
272
  export declare class IsAuthorizedWithTokenCommand extends IsAuthorizedWithTokenCommand_base {
236
273
  /** @internal type navigation helper, not in runtime. */
@@ -207,6 +207,38 @@ declare const ListIdentitySourcesCommand_base: {
207
207
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
208
208
  *
209
209
  * @public
210
+ * @example ListIdentitySources
211
+ * ```javascript
212
+ * // The following example request creates lists the identity sources currently defined in the specified policy store.
213
+ * const input = {
214
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
215
+ * };
216
+ * const command = new ListIdentitySourcesCommand(input);
217
+ * const response = await client.send(command);
218
+ * /* response ==
219
+ * {
220
+ * "identitySources": [
221
+ * {
222
+ * "createdDate": "2023-05-19T20:29:23.66812Z",
223
+ * "details": {
224
+ * "clientIds": [
225
+ * "a1b2c3d4e5f6g7h8i9j0kalbmc"
226
+ * ],
227
+ * "discoveryUrl": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5",
228
+ * "openIdIssuer": "COGNITO",
229
+ * "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"
230
+ * },
231
+ * "identitySourceId": "ISEXAMPLEabcdefg111111",
232
+ * "lastUpdatedDate": "2023-05-19T20:29:23.66812Z",
233
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
234
+ * "principalEntityType": "User"
235
+ * }
236
+ * ]
237
+ * }
238
+ * *\/
239
+ * // example id: example-1
240
+ * ```
241
+ *
210
242
  */
211
243
  export declare class ListIdentitySourcesCommand extends ListIdentitySourcesCommand_base {
212
244
  /** @internal type navigation helper, not in runtime. */
@@ -211,6 +211,170 @@ declare const ListPoliciesCommand_base: {
211
211
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
212
212
  *
213
213
  * @public
214
+ * @example ListPolicies - Example 1
215
+ * ```javascript
216
+ * // The following example lists all policies in the policy store.
217
+ * const input = {
218
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
219
+ * };
220
+ * const command = new ListPoliciesCommand(input);
221
+ * const response = await client.send(command);
222
+ * /* response ==
223
+ * {
224
+ * "policies": [
225
+ * {
226
+ * "createdDate": "2024-08-12T18:20:50.99Z",
227
+ * "definition": {
228
+ * "static": {
229
+ * "description": "Grant members of janeFriends UserGroup access to the vacationFolder Album"
230
+ * }
231
+ * },
232
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
233
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
234
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
235
+ * "policyType": "STATIC",
236
+ * "principal": {
237
+ * "entityId": "janeFriends",
238
+ * "entityType": "UserGroup"
239
+ * },
240
+ * "resource": {
241
+ * "entityId": "vacationFolder",
242
+ * "entityType": "Album"
243
+ * }
244
+ * },
245
+ * {
246
+ * "createdDate": "2024-08-12T18:20:50.99Z",
247
+ * "definition": {
248
+ * "static": {
249
+ * "description": "Grant everyone access to the publicFolder Album"
250
+ * }
251
+ * },
252
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
253
+ * "policyId": "Et9KxMplyaDdyurDw8TeFa",
254
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
255
+ * "policyType": "STATIC",
256
+ * "resource": {
257
+ * "entityId": "publicFolder",
258
+ * "entityType": "Album"
259
+ * }
260
+ * }
261
+ * ]
262
+ * }
263
+ * *\/
264
+ * // example id: example-1
265
+ * ```
266
+ *
267
+ * @example ListPolicies - Example 2
268
+ * ```javascript
269
+ * // The following example lists all policies for a specified principal.
270
+ * const input = {
271
+ * "filter": {
272
+ * "principal": {
273
+ * "identifier": {
274
+ * "entityId": "alice",
275
+ * "entityType": "User"
276
+ * }
277
+ * }
278
+ * },
279
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
280
+ * };
281
+ * const command = new ListPoliciesCommand(input);
282
+ * const response = await client.send(command);
283
+ * /* response ==
284
+ * {
285
+ * "policies": [
286
+ * {
287
+ * "createdDate": "2022-12-09T22:55:16.067533Z",
288
+ * "definition": {
289
+ * "static": {
290
+ * "description": "An example policy"
291
+ * }
292
+ * },
293
+ * "lastUpdatedDate": "2022-12-09T22:55:16.067533Z",
294
+ * "policyId": "Et9KxMplyaDdyurDw8TeFa",
295
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
296
+ * "policyType": "STATIC",
297
+ * "principal": {
298
+ * "entityId": "alice",
299
+ * "entityType": "User"
300
+ * },
301
+ * "resource": {
302
+ * "entityId": "bob_folder",
303
+ * "entityType": "Album"
304
+ * }
305
+ * },
306
+ * {
307
+ * "createdDate": "2022-12-09T23:00:24.66266Z",
308
+ * "definition": {
309
+ * "static": {}
310
+ * },
311
+ * "lastUpdatedDate": "2022-12-09T23:00:24.66266Z",
312
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
313
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
314
+ * "policyType": "STATIC",
315
+ * "principal": {
316
+ * "entityId": "alice",
317
+ * "entityType": "User"
318
+ * },
319
+ * "resource": {
320
+ * "entityId": "alice_folder",
321
+ * "entityType": "Album"
322
+ * }
323
+ * }
324
+ * ]
325
+ * }
326
+ * *\/
327
+ * // example id: example-2
328
+ * ```
329
+ *
330
+ * @example ListPolicies - Example 3
331
+ * ```javascript
332
+ * // The following example uses the Filter parameter to list only the template-linked policies in the specified policy store.
333
+ * const input = {
334
+ * "filter": {
335
+ * "policyType": "TEMPLATE_LINKED"
336
+ * },
337
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
338
+ * };
339
+ * const command = new ListPoliciesCommand(input);
340
+ * const response = await client.send(command);
341
+ * /* response ==
342
+ * {
343
+ * "policies": [
344
+ * {
345
+ * "createdDate": "2023-06-13T16:03:07.620867Z",
346
+ * "definition": {
347
+ * "templateLinked": {
348
+ * "policyTemplateId": "PTEXAMPLEabcdefg111111",
349
+ * "principal": {
350
+ * "entityId": "alice",
351
+ * "entityType": "User"
352
+ * },
353
+ * "resource": {
354
+ * "entityId": "pic.jpg",
355
+ * "entityType": "Photo"
356
+ * }
357
+ * }
358
+ * },
359
+ * "lastUpdatedDate": "2023-06-13T16:03:07.620867Z",
360
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
361
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
362
+ * "policyType": "TEMPLATE_LINKED",
363
+ * "principal": {
364
+ * "entityId": "alice",
365
+ * "entityType": "User"
366
+ * },
367
+ * "resource": {
368
+ * "entityId": "pic.jpg",
369
+ * "entityType": "Photo"
370
+ * }
371
+ * }
372
+ * ]
373
+ * }
374
+ * *\/
375
+ * // example id: example-3
376
+ * ```
377
+ *
214
378
  */
215
379
  export declare class ListPoliciesCommand extends ListPoliciesCommand_base {
216
380
  /** @internal type navigation helper, not in runtime. */
@@ -158,6 +158,31 @@ declare const ListPolicyStoresCommand_base: {
158
158
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
159
159
  *
160
160
  * @public
161
+ * @example ListPolicyStores
162
+ * ```javascript
163
+ * // The following example lists all policy stores in the AWS account in the AWS Region in which you call the operation.
164
+ * const input = {};
165
+ * const command = new ListPolicyStoresCommand(input);
166
+ * const response = await client.send(command);
167
+ * /* response ==
168
+ * {
169
+ * "policyStores": [
170
+ * {
171
+ * "arn": "arn:aws:verifiedpermissions::123456789012:policy-store/C7v5xMplfFH3i3e4Jrzb1a",
172
+ * "createdDate": "2023-05-16T17:41:29.103459Z",
173
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
174
+ * },
175
+ * {
176
+ * "arn": "arn:aws:verifiedpermissions::123456789012:policy-store/PSEXAMPLEabcdefg222222",
177
+ * "createdDate": "2023-05-16T18:23:04.985521Z",
178
+ * "policyStoreId": "PSEXAMPLEabcdefg222222"
179
+ * }
180
+ * ]
181
+ * }
182
+ * *\/
183
+ * // example id: example-1
184
+ * ```
185
+ *
161
186
  */
162
187
  export declare class ListPolicyStoresCommand extends ListPolicyStoresCommand_base {
163
188
  /** @internal type navigation helper, not in runtime. */
@@ -162,6 +162,37 @@ declare const ListPolicyTemplatesCommand_base: {
162
162
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
163
163
  *
164
164
  * @public
165
+ * @example ListPolicyTemplates
166
+ * ```javascript
167
+ * // The following example retrieves a list of all of the policy templates in the specified policy store.
168
+ * const input = {
169
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
170
+ * };
171
+ * const command = new ListPolicyTemplatesCommand(input);
172
+ * const response = await client.send(command);
173
+ * /* response ==
174
+ * {
175
+ * "policyTemplates": [
176
+ * {
177
+ * "createdDate": "2024-08-12T18:20:50.99Z",
178
+ * "description": "Generic template",
179
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
180
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
181
+ * "policyTemplateId": "PTEXAMPLEabcdefg111111"
182
+ * },
183
+ * {
184
+ * "createdDate": "2024-08-12T18:20:50.99Z",
185
+ * "description": "Template for research dept",
186
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
187
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
188
+ * "policyTemplateId": "PTEXAMPLEabcdefg222222"
189
+ * }
190
+ * ]
191
+ * }
192
+ * *\/
193
+ * // example id: example-1
194
+ * ```
195
+ *
165
196
  */
166
197
  export declare class ListPolicyTemplatesCommand extends ListPolicyTemplatesCommand_base {
167
198
  /** @internal type navigation helper, not in runtime. */
@@ -176,6 +176,35 @@ declare const PutSchemaCommand_base: {
176
176
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
177
177
  *
178
178
  * @public
179
+ * @example PutSchema
180
+ * ```javascript
181
+ * // The following example creates a new schema, or updates an existing schema, in the specified policy store. Note that the schema text is shown line wrapped for readability. You should submit the entire schema text as a single line of text.
182
+ * //
183
+ * // Note
184
+ * // The JSON in the parameters of this operation are strings that can contain embedded quotation marks (") within the outermost quotation mark pair. This requires that you stringify the JSON object by preceding all embedded quotation marks with a backslash character ( \" ) and combining all lines into a single text line with no line breaks.
185
+ * //
186
+ * // Example strings might be displayed wrapped across multiple lines here for readability, but the operation requires the parameters be submitted as single line strings.
187
+ * const input = {
188
+ * "definition": {
189
+ * "cedarJson": "{\"MySampleNamespace\": {\"actions\": {\"remoteAccess\": {\"appliesTo\": {\"principalTypes\": [\"Employee\"]}}},\"entityTypes\": {\"Employee\": {\"shape\": {\"attributes\": {\"jobLevel\": {\"type\": \"Long\"},\"name\": {\"type\": \"String\"}},\"type\": \"Record\"}}}}}"
190
+ * },
191
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
192
+ * };
193
+ * const command = new PutSchemaCommand(input);
194
+ * const response = await client.send(command);
195
+ * /* response ==
196
+ * {
197
+ * "createdDate": "2023-06-13T19:28:06.003726Z",
198
+ * "lastUpdatedDate": "2023-06-13T19:28:06.003726Z",
199
+ * "namespaces": [
200
+ * "My::Sample::Namespace"
201
+ * ],
202
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
203
+ * }
204
+ * *\/
205
+ * // example id: example-1
206
+ * ```
207
+ *
179
208
  */
180
209
  export declare class PutSchemaCommand extends PutSchemaCommand_base {
181
210
  /** @internal type navigation helper, not in runtime. */
@@ -200,6 +200,34 @@ declare const UpdateIdentitySourceCommand_base: {
200
200
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
201
201
  *
202
202
  * @public
203
+ * @example UpdateIdentitySource
204
+ * ```javascript
205
+ * // The following example updates the configuration of the specified identity source with a new configuration.
206
+ * const input = {
207
+ * "identitySourceId": "ISEXAMPLEabcdefg111111",
208
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
209
+ * "updateConfiguration": {
210
+ * "cognitoUserPoolConfiguration": {
211
+ * "clientIds": [
212
+ * "a1b2c3d4e5f6g7h8i9j0kalbmc"
213
+ * ],
214
+ * "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"
215
+ * }
216
+ * }
217
+ * };
218
+ * const command = new UpdateIdentitySourceCommand(input);
219
+ * const response = await client.send(command);
220
+ * /* response ==
221
+ * {
222
+ * "createdDate": "2023-05-19T20:30:28.173926Z",
223
+ * "identitySourceId": "ISEXAMPLEabcdefg111111",
224
+ * "lastUpdatedDate": "2023-05-22T20:45:59.962216Z",
225
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
226
+ * }
227
+ * *\/
228
+ * // example id: example-1
229
+ * ```
230
+ *
203
231
  */
204
232
  export declare class UpdateIdentitySourceCommand extends UpdateIdentitySourceCommand_base {
205
233
  /** @internal type navigation helper, not in runtime. */
@@ -234,6 +234,36 @@ declare const UpdatePolicyCommand_base: {
234
234
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
235
235
  *
236
236
  * @public
237
+ * @example UpdatePolicy
238
+ * ```javascript
239
+ * // The following example replaces the definition of the specified static policy with a new one.
240
+ * const input = {
241
+ * "definition": {
242
+ * "static": {
243
+ * "statement": "permit(principal, action, resource in Album::\"public_folder\");"
244
+ * }
245
+ * },
246
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
247
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
248
+ * };
249
+ * const command = new UpdatePolicyCommand(input);
250
+ * const response = await client.send(command);
251
+ * /* response ==
252
+ * {
253
+ * "createdDate": "2024-08-12T18:20:50.99Z",
254
+ * "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
255
+ * "policyId": "9wYxMpljbbZQb5fcZHyJhY",
256
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
257
+ * "policyType": "STATIC",
258
+ * "resource": {
259
+ * "entityId": "public_folder",
260
+ * "entityType": "Album"
261
+ * }
262
+ * }
263
+ * *\/
264
+ * // example id: example-1
265
+ * ```
266
+ *
237
267
  */
238
268
  export declare class UpdatePolicyCommand extends UpdatePolicyCommand_base {
239
269
  /** @internal type navigation helper, not in runtime. */
@@ -168,6 +168,28 @@ declare const UpdatePolicyStoreCommand_base: {
168
168
  * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
169
169
  *
170
170
  * @public
171
+ * @example UpdatePolicyStore
172
+ * ```javascript
173
+ * // The following example turns off the validation settings for a policy store.
174
+ * const input = {
175
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
176
+ * "validationSettings": {
177
+ * "mode": "OFF"
178
+ * }
179
+ * };
180
+ * const command = new UpdatePolicyStoreCommand(input);
181
+ * const response = await client.send(command);
182
+ * /* response ==
183
+ * {
184
+ * "arn": "arn:aws:verifiedpermissions::123456789012:policy-store/C7v5xMplfFH3i3e4Jrzb1a",
185
+ * "createdDate": "2023-05-17T18:36:10.134448Z",
186
+ * "lastUpdatedDate": "2023-05-23T18:18:12.443083Z",
187
+ * "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
188
+ * }
189
+ * *\/
190
+ * // example id: example-1
191
+ * ```
192
+ *
171
193
  */
172
194
  export declare class UpdatePolicyStoreCommand extends UpdatePolicyStoreCommand_base {
173
195
  /** @internal type navigation helper, not in runtime. */