@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.
- package/dist-cjs/runtimeConfig.js +1 -0
- package/dist-es/runtimeConfig.js +2 -1
- package/dist-types/commands/BatchIsAuthorizedCommand.d.ts +161 -0
- package/dist-types/commands/BatchIsAuthorizedWithTokenCommand.d.ts +135 -0
- package/dist-types/commands/CreateIdentitySourceCommand.d.ts +29 -0
- package/dist-types/commands/CreatePolicyCommand.d.ts +108 -0
- package/dist-types/commands/CreatePolicyStoreCommand.d.ts +22 -0
- package/dist-types/commands/CreatePolicyTemplateCommand.d.ts +22 -0
- package/dist-types/commands/DeleteIdentitySourceCommand.d.ts +12 -0
- package/dist-types/commands/DeletePolicyCommand.d.ts +12 -0
- package/dist-types/commands/DeletePolicyStoreCommand.d.ts +11 -0
- package/dist-types/commands/DeletePolicyTemplateCommand.d.ts +12 -0
- package/dist-types/commands/GetIdentitySourceCommand.d.ts +29 -0
- package/dist-types/commands/GetPolicyCommand.d.ts +31 -0
- package/dist-types/commands/GetPolicyStoreCommand.d.ts +22 -0
- package/dist-types/commands/GetPolicyTemplateCommand.d.ts +22 -0
- package/dist-types/commands/GetSchemaCommand.d.ts +24 -0
- package/dist-types/commands/IsAuthorizedCommand.d.ts +66 -0
- package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +37 -0
- package/dist-types/commands/ListIdentitySourcesCommand.d.ts +32 -0
- package/dist-types/commands/ListPoliciesCommand.d.ts +164 -0
- package/dist-types/commands/ListPolicyStoresCommand.d.ts +25 -0
- package/dist-types/commands/ListPolicyTemplatesCommand.d.ts +31 -0
- package/dist-types/commands/PutSchemaCommand.d.ts +29 -0
- package/dist-types/commands/UpdateIdentitySourceCommand.d.ts +28 -0
- package/dist-types/commands/UpdatePolicyCommand.d.ts +30 -0
- package/dist-types/commands/UpdatePolicyStoreCommand.d.ts +22 -0
- package/dist-types/commands/UpdatePolicyTemplateCommand.d.ts +27 -0
- package/dist-types/runtimeConfig.browser.d.ts +2 -1
- package/dist-types/runtimeConfig.d.ts +2 -1
- package/dist-types/runtimeConfig.native.d.ts +2 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
- package/package.json +35 -35
|
@@ -44,6 +44,7 @@ const getRuntimeConfig = (config) => {
|
|
|
44
44
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
45
45
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
46
46
|
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
47
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
|
|
47
48
|
};
|
|
48
49
|
};
|
|
49
50
|
exports.getRuntimeConfig = getRuntimeConfig;
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
3
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
5
5
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
6
|
import { Hash } from "@smithy/hash-node";
|
|
7
7
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
@@ -40,5 +40,6 @@ export const getRuntimeConfig = (config) => {
|
|
|
40
40
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
41
41
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
42
42
|
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
43
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
|
|
43
44
|
};
|
|
44
45
|
};
|
|
@@ -285,6 +285,167 @@ declare const BatchIsAuthorizedCommand_base: {
|
|
|
285
285
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
286
286
|
*
|
|
287
287
|
* @public
|
|
288
|
+
* @example Batch - Example 1
|
|
289
|
+
* ```javascript
|
|
290
|
+
* // The following example requests two authorization decisions for two principals of type Usernamed Alice and Annalisa.
|
|
291
|
+
* const input = {
|
|
292
|
+
* "entities": {
|
|
293
|
+
* "entityList": [
|
|
294
|
+
* {
|
|
295
|
+
* "attributes": {
|
|
296
|
+
* "Account": {
|
|
297
|
+
* "entityIdentifier": {
|
|
298
|
+
* "entityId": "1234",
|
|
299
|
+
* "entityType": "PhotoFlash::Account"
|
|
300
|
+
* }
|
|
301
|
+
* },
|
|
302
|
+
* "Email": {
|
|
303
|
+
* "string": ""
|
|
304
|
+
* }
|
|
305
|
+
* },
|
|
306
|
+
* "identifier": {
|
|
307
|
+
* "entityId": "Alice",
|
|
308
|
+
* "entityType": "PhotoFlash::User"
|
|
309
|
+
* },
|
|
310
|
+
* "parents": []
|
|
311
|
+
* },
|
|
312
|
+
* {
|
|
313
|
+
* "attributes": {
|
|
314
|
+
* "Account": {
|
|
315
|
+
* "entityIdentifier": {
|
|
316
|
+
* "entityId": "5678",
|
|
317
|
+
* "entityType": "PhotoFlash::Account"
|
|
318
|
+
* }
|
|
319
|
+
* },
|
|
320
|
+
* "Email": {
|
|
321
|
+
* "string": ""
|
|
322
|
+
* }
|
|
323
|
+
* },
|
|
324
|
+
* "identifier": {
|
|
325
|
+
* "entityId": "Annalisa",
|
|
326
|
+
* "entityType": "PhotoFlash::User"
|
|
327
|
+
* },
|
|
328
|
+
* "parents": []
|
|
329
|
+
* },
|
|
330
|
+
* {
|
|
331
|
+
* "attributes": {
|
|
332
|
+
* "IsPrivate": {
|
|
333
|
+
* "boolean": false
|
|
334
|
+
* },
|
|
335
|
+
* "Name": {
|
|
336
|
+
* "string": ""
|
|
337
|
+
* }
|
|
338
|
+
* },
|
|
339
|
+
* "identifier": {
|
|
340
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
341
|
+
* "entityType": "PhotoFlash::Photo"
|
|
342
|
+
* },
|
|
343
|
+
* "parents": [
|
|
344
|
+
* {
|
|
345
|
+
* "entityId": "1234",
|
|
346
|
+
* "entityType": "PhotoFlash::Account"
|
|
347
|
+
* }
|
|
348
|
+
* ]
|
|
349
|
+
* },
|
|
350
|
+
* {
|
|
351
|
+
* "attributes": {
|
|
352
|
+
* "Name": {
|
|
353
|
+
* "string": ""
|
|
354
|
+
* }
|
|
355
|
+
* },
|
|
356
|
+
* "identifier": {
|
|
357
|
+
* "entityId": "1234",
|
|
358
|
+
* "entityType": "PhotoFlash::Account"
|
|
359
|
+
* },
|
|
360
|
+
* "parents": []
|
|
361
|
+
* }
|
|
362
|
+
* ]
|
|
363
|
+
* },
|
|
364
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
365
|
+
* "requests": [
|
|
366
|
+
* {
|
|
367
|
+
* "action": {
|
|
368
|
+
* "actionId": "ViewPhoto",
|
|
369
|
+
* "actionType": "PhotoFlash::Action"
|
|
370
|
+
* },
|
|
371
|
+
* "principal": {
|
|
372
|
+
* "entityId": "Alice",
|
|
373
|
+
* "entityType": "PhotoFlash::User"
|
|
374
|
+
* },
|
|
375
|
+
* "resource": {
|
|
376
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
377
|
+
* "entityType": "PhotoFlash::Photo"
|
|
378
|
+
* }
|
|
379
|
+
* },
|
|
380
|
+
* {
|
|
381
|
+
* "action": {
|
|
382
|
+
* "actionId": "DeletePhoto",
|
|
383
|
+
* "actionType": "PhotoFlash::Action"
|
|
384
|
+
* },
|
|
385
|
+
* "principal": {
|
|
386
|
+
* "entityId": "Annalisa",
|
|
387
|
+
* "entityType": "PhotoFlash::User"
|
|
388
|
+
* },
|
|
389
|
+
* "resource": {
|
|
390
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
391
|
+
* "entityType": "PhotoFlash::Photo"
|
|
392
|
+
* }
|
|
393
|
+
* }
|
|
394
|
+
* ]
|
|
395
|
+
* };
|
|
396
|
+
* const command = new BatchIsAuthorizedCommand(input);
|
|
397
|
+
* const response = await client.send(command);
|
|
398
|
+
* /* response ==
|
|
399
|
+
* {
|
|
400
|
+
* "results": [
|
|
401
|
+
* {
|
|
402
|
+
* "errors": [],
|
|
403
|
+
* "decision": "ALLOW",
|
|
404
|
+
* "determiningPolicies": [
|
|
405
|
+
* {
|
|
406
|
+
* "policyId": "9wYxMpljbbZQb5fcZHyJhY"
|
|
407
|
+
* }
|
|
408
|
+
* ],
|
|
409
|
+
* "request": {
|
|
410
|
+
* "action": {
|
|
411
|
+
* "actionId": "ViewPhoto",
|
|
412
|
+
* "actionType": "PhotoFlash::Action"
|
|
413
|
+
* },
|
|
414
|
+
* "principal": {
|
|
415
|
+
* "entityId": "alice",
|
|
416
|
+
* "entityType": "PhotoFlash::User"
|
|
417
|
+
* },
|
|
418
|
+
* "resource": {
|
|
419
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
420
|
+
* "entityType": "PhotoFlash::Photo"
|
|
421
|
+
* }
|
|
422
|
+
* }
|
|
423
|
+
* },
|
|
424
|
+
* {
|
|
425
|
+
* "errors": [],
|
|
426
|
+
* "decision": "DENY",
|
|
427
|
+
* "determiningPolicies": [],
|
|
428
|
+
* "request": {
|
|
429
|
+
* "action": {
|
|
430
|
+
* "actionId": "DeletePhoto",
|
|
431
|
+
* "actionType": "PhotoFlash::Action"
|
|
432
|
+
* },
|
|
433
|
+
* "principal": {
|
|
434
|
+
* "entityId": "annalisa",
|
|
435
|
+
* "entityType": "PhotoFlash::User"
|
|
436
|
+
* },
|
|
437
|
+
* "resource": {
|
|
438
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
439
|
+
* "entityType": "PhotoFlash::Photo"
|
|
440
|
+
* }
|
|
441
|
+
* }
|
|
442
|
+
* }
|
|
443
|
+
* ]
|
|
444
|
+
* }
|
|
445
|
+
* *\/
|
|
446
|
+
* // example id: example-1
|
|
447
|
+
* ```
|
|
448
|
+
*
|
|
288
449
|
*/
|
|
289
450
|
export declare class BatchIsAuthorizedCommand extends BatchIsAuthorizedCommand_base {
|
|
290
451
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -281,6 +281,141 @@ declare const BatchIsAuthorizedWithTokenCommand_base: {
|
|
|
281
281
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
282
282
|
*
|
|
283
283
|
* @public
|
|
284
|
+
* @example Batch - Example 1
|
|
285
|
+
* ```javascript
|
|
286
|
+
* // The following example requests three authorization decisions for two resources and two actions in different photo albums.
|
|
287
|
+
* const input = {
|
|
288
|
+
* "entities": {
|
|
289
|
+
* "entityList": [
|
|
290
|
+
* {
|
|
291
|
+
* "identifier": {
|
|
292
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
293
|
+
* "entityType": "PhotoFlash::Photo"
|
|
294
|
+
* },
|
|
295
|
+
* "parents": [
|
|
296
|
+
* {
|
|
297
|
+
* "entityId": "MyExampleAlbum1",
|
|
298
|
+
* "entityType": "PhotoFlash::Album"
|
|
299
|
+
* }
|
|
300
|
+
* ]
|
|
301
|
+
* },
|
|
302
|
+
* {
|
|
303
|
+
* "identifier": {
|
|
304
|
+
* "entityId": "OfficePhoto94.jpg",
|
|
305
|
+
* "entityType": "PhotoFlash::Photo"
|
|
306
|
+
* },
|
|
307
|
+
* "parents": [
|
|
308
|
+
* {
|
|
309
|
+
* "entityId": "MyExampleAlbum2",
|
|
310
|
+
* "entityType": "PhotoFlash::Album"
|
|
311
|
+
* }
|
|
312
|
+
* ]
|
|
313
|
+
* }
|
|
314
|
+
* ]
|
|
315
|
+
* },
|
|
316
|
+
* "identityToken": "eyJra12345EXAMPLE",
|
|
317
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
318
|
+
* "requests": [
|
|
319
|
+
* {
|
|
320
|
+
* "action": {
|
|
321
|
+
* "actionId": "ViewPhoto",
|
|
322
|
+
* "actionType": "PhotoFlash::Action"
|
|
323
|
+
* },
|
|
324
|
+
* "resource": {
|
|
325
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
326
|
+
* "entityType": "PhotoFlash::Photo"
|
|
327
|
+
* }
|
|
328
|
+
* },
|
|
329
|
+
* {
|
|
330
|
+
* "action": {
|
|
331
|
+
* "actionId": "SharePhoto",
|
|
332
|
+
* "actionType": "PhotoFlash::Action"
|
|
333
|
+
* },
|
|
334
|
+
* "resource": {
|
|
335
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
336
|
+
* "entityType": "PhotoFlash::Photo"
|
|
337
|
+
* }
|
|
338
|
+
* },
|
|
339
|
+
* {
|
|
340
|
+
* "action": {
|
|
341
|
+
* "actionId": "ViewPhoto",
|
|
342
|
+
* "actionType": "PhotoFlash::Action"
|
|
343
|
+
* },
|
|
344
|
+
* "resource": {
|
|
345
|
+
* "entityId": "OfficePhoto94.jpg",
|
|
346
|
+
* "entityType": "PhotoFlash::Photo"
|
|
347
|
+
* }
|
|
348
|
+
* }
|
|
349
|
+
* ]
|
|
350
|
+
* };
|
|
351
|
+
* const command = new BatchIsAuthorizedWithTokenCommand(input);
|
|
352
|
+
* const response = await client.send(command);
|
|
353
|
+
* /* response ==
|
|
354
|
+
* {
|
|
355
|
+
* "principal": {
|
|
356
|
+
* "entityId": "us-east-1_EXAMPLE|a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
|
|
357
|
+
* "entityType": "PhotoFlash::User"
|
|
358
|
+
* },
|
|
359
|
+
* "results": [
|
|
360
|
+
* {
|
|
361
|
+
* "errors": [],
|
|
362
|
+
* "decision": "ALLOW",
|
|
363
|
+
* "determiningPolicies": [
|
|
364
|
+
* {
|
|
365
|
+
* "policyId": "9wYixMplbbZQb5fcZHyJhY"
|
|
366
|
+
* }
|
|
367
|
+
* ],
|
|
368
|
+
* "request": {
|
|
369
|
+
* "action": {
|
|
370
|
+
* "actionId": "ViewPhoto",
|
|
371
|
+
* "actionType": "PhotoFlash::Action"
|
|
372
|
+
* },
|
|
373
|
+
* "resource": {
|
|
374
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
375
|
+
* "entityType": "PhotoFlash::Photo"
|
|
376
|
+
* }
|
|
377
|
+
* }
|
|
378
|
+
* },
|
|
379
|
+
* {
|
|
380
|
+
* "errors": [],
|
|
381
|
+
* "decision": "ALLOW",
|
|
382
|
+
* "determiningPolicies": [
|
|
383
|
+
* {
|
|
384
|
+
* "policyId": "9wYixMplbbZQb5fcZHyJhY"
|
|
385
|
+
* }
|
|
386
|
+
* ],
|
|
387
|
+
* "request": {
|
|
388
|
+
* "action": {
|
|
389
|
+
* "actionId": "SharePhoto",
|
|
390
|
+
* "actionType": "PhotoFlash::Action"
|
|
391
|
+
* },
|
|
392
|
+
* "resource": {
|
|
393
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
394
|
+
* "entityType": "PhotoFlash::Photo"
|
|
395
|
+
* }
|
|
396
|
+
* }
|
|
397
|
+
* },
|
|
398
|
+
* {
|
|
399
|
+
* "errors": [],
|
|
400
|
+
* "decision": "DENY",
|
|
401
|
+
* "determiningPolicies": [],
|
|
402
|
+
* "request": {
|
|
403
|
+
* "action": {
|
|
404
|
+
* "actionId": "ViewPhoto",
|
|
405
|
+
* "actionType": "PhotoFlash::Action"
|
|
406
|
+
* },
|
|
407
|
+
* "resource": {
|
|
408
|
+
* "entityId": "OfficePhoto94.jpg",
|
|
409
|
+
* "entityType": "PhotoFlash::Photo"
|
|
410
|
+
* }
|
|
411
|
+
* }
|
|
412
|
+
* }
|
|
413
|
+
* ]
|
|
414
|
+
* }
|
|
415
|
+
* *\/
|
|
416
|
+
* // example id: example-1
|
|
417
|
+
* ```
|
|
418
|
+
*
|
|
284
419
|
*/
|
|
285
420
|
export declare class BatchIsAuthorizedWithTokenCommand extends BatchIsAuthorizedWithTokenCommand_base {
|
|
286
421
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -232,6 +232,35 @@ declare const CreateIdentitySourceCommand_base: {
|
|
|
232
232
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
233
233
|
*
|
|
234
234
|
* @public
|
|
235
|
+
* @example To create an identity source
|
|
236
|
+
* ```javascript
|
|
237
|
+
* // The following ``create-identity-source`` example creates an identity source that lets you reference identities stored in the specified Amazon Cognito user pool. Those identities are available in Verified Permissions as entities of type ``User``.
|
|
238
|
+
* const input = {
|
|
239
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
240
|
+
* "configuration": {
|
|
241
|
+
* "cognitoUserPoolConfiguration": {
|
|
242
|
+
* "clientIds": [
|
|
243
|
+
* "a1b2c3d4e5f6g7h8i9j0kalbmc"
|
|
244
|
+
* ],
|
|
245
|
+
* "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"
|
|
246
|
+
* }
|
|
247
|
+
* },
|
|
248
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
249
|
+
* "principalEntityType": "User"
|
|
250
|
+
* };
|
|
251
|
+
* const command = new CreateIdentitySourceCommand(input);
|
|
252
|
+
* const response = await client.send(command);
|
|
253
|
+
* /* response ==
|
|
254
|
+
* {
|
|
255
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
256
|
+
* "identitySourceId": "ISEXAMPLEabcdefg111111",
|
|
257
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
258
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
259
|
+
* }
|
|
260
|
+
* *\/
|
|
261
|
+
* // example id: example-1
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
235
264
|
*/
|
|
236
265
|
export declare class CreateIdentitySourceCommand extends CreateIdentitySourceCommand_base {
|
|
237
266
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -221,6 +221,114 @@ declare const CreatePolicyCommand_base: {
|
|
|
221
221
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
222
222
|
*
|
|
223
223
|
* @public
|
|
224
|
+
* @example To create a static policy
|
|
225
|
+
* ```javascript
|
|
226
|
+
* // The following example request creates a static policy with a policy scope that specifies both a principal and a resource. The response includes both the Principal and Resource elements because both were specified in the request policy scope.
|
|
227
|
+
* const input = {
|
|
228
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
229
|
+
* "definition": {
|
|
230
|
+
* "static": {
|
|
231
|
+
* "description": "Grant members of janeFriends UserGroup access to the vacationFolder Album",
|
|
232
|
+
* "statement": "permit( principal in UserGroup::\"janeFriends\", action, resource in Album::\"vacationFolder\" );"
|
|
233
|
+
* }
|
|
234
|
+
* },
|
|
235
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
236
|
+
* };
|
|
237
|
+
* const command = new CreatePolicyCommand(input);
|
|
238
|
+
* const response = await client.send(command);
|
|
239
|
+
* /* response ==
|
|
240
|
+
* {
|
|
241
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
242
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
243
|
+
* "policyId": "9wYxMpljbbZQb5fcZHyJhY",
|
|
244
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
245
|
+
* "policyType": "STATIC",
|
|
246
|
+
* "principal": {
|
|
247
|
+
* "entityId": "janeFriends",
|
|
248
|
+
* "entityType": "UserGroup"
|
|
249
|
+
* },
|
|
250
|
+
* "resource": {
|
|
251
|
+
* "entityId": "vacationFolder",
|
|
252
|
+
* "entityType": "Album"
|
|
253
|
+
* }
|
|
254
|
+
* }
|
|
255
|
+
* *\/
|
|
256
|
+
* // example id: example-1
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* @example To create a static policy
|
|
260
|
+
* ```javascript
|
|
261
|
+
* // The following example request creates a static policy with a policy scope that specifies both a principal and a resource. The response includes both the Principal and Resource elements because both were specified in the request policy scope.
|
|
262
|
+
* const input = {
|
|
263
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
264
|
+
* "definition": {
|
|
265
|
+
* "static": {
|
|
266
|
+
* "description": "Grant members of janeFriends UserGroup access to the vacationFolder Album",
|
|
267
|
+
* "statement": "permit( principal in UserGroup::\"janeFriends\", action, resource in Album::\"vacationFolder\" );"
|
|
268
|
+
* }
|
|
269
|
+
* },
|
|
270
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
271
|
+
* };
|
|
272
|
+
* const command = new CreatePolicyCommand(input);
|
|
273
|
+
* const response = await client.send(command);
|
|
274
|
+
* /* response ==
|
|
275
|
+
* {
|
|
276
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
277
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
278
|
+
* "policyId": "9wYxMpljbbZQb5fcZHyJhY",
|
|
279
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
280
|
+
* "policyType": "STATIC",
|
|
281
|
+
* "principal": {
|
|
282
|
+
* "entityId": "janeFriends",
|
|
283
|
+
* "entityType": "UserGroup"
|
|
284
|
+
* },
|
|
285
|
+
* "resource": {
|
|
286
|
+
* "entityId": "vacationFolder",
|
|
287
|
+
* "entityType": "Album"
|
|
288
|
+
* }
|
|
289
|
+
* }
|
|
290
|
+
* *\/
|
|
291
|
+
* // example id: example-2
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* @example To create a template-linked policy
|
|
295
|
+
* ```javascript
|
|
296
|
+
* // The following example creates a template-linked policy using the specified policy template and associates the specified principal to use with the new template-linked policy.
|
|
297
|
+
* const input = {
|
|
298
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
299
|
+
* "definition": {
|
|
300
|
+
* "templateLinked": {
|
|
301
|
+
* "policyTemplateId": "PTEXAMPLEabcdefg111111",
|
|
302
|
+
* "principal": {
|
|
303
|
+
* "entityId": "alice",
|
|
304
|
+
* "entityType": "User"
|
|
305
|
+
* }
|
|
306
|
+
* }
|
|
307
|
+
* },
|
|
308
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
309
|
+
* };
|
|
310
|
+
* const command = new CreatePolicyCommand(input);
|
|
311
|
+
* const response = await client.send(command);
|
|
312
|
+
* /* response ==
|
|
313
|
+
* {
|
|
314
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
315
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
316
|
+
* "policyId": "Et9KxMplyaDdyurDw8TeFa",
|
|
317
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
318
|
+
* "policyType": "TEMPLATE_LINKED",
|
|
319
|
+
* "principal": {
|
|
320
|
+
* "entityId": "alice",
|
|
321
|
+
* "entityType": "User"
|
|
322
|
+
* },
|
|
323
|
+
* "resource": {
|
|
324
|
+
* "entityId": "VacationPhoto94.jpg",
|
|
325
|
+
* "entityType": "Photo"
|
|
326
|
+
* }
|
|
327
|
+
* }
|
|
328
|
+
* *\/
|
|
329
|
+
* // example id: example-3
|
|
330
|
+
* ```
|
|
331
|
+
*
|
|
224
332
|
*/
|
|
225
333
|
export declare class CreatePolicyCommand extends CreatePolicyCommand_base {
|
|
226
334
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -172,6 +172,28 @@ declare const CreatePolicyStoreCommand_base: {
|
|
|
172
172
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
173
173
|
*
|
|
174
174
|
* @public
|
|
175
|
+
* @example To create policy store
|
|
176
|
+
* ```javascript
|
|
177
|
+
* // The following example creates a new policy store with strict validation turned on.
|
|
178
|
+
* const input = {
|
|
179
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
180
|
+
* "validationSettings": {
|
|
181
|
+
* "mode": "STRICT"
|
|
182
|
+
* }
|
|
183
|
+
* };
|
|
184
|
+
* const command = new CreatePolicyStoreCommand(input);
|
|
185
|
+
* const response = await client.send(command);
|
|
186
|
+
* /* response ==
|
|
187
|
+
* {
|
|
188
|
+
* "arn": "arn:aws:verifiedpermissions::123456789012:policy-store/C7v5xMplfFH3i3e4Jrzb1a",
|
|
189
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
190
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
191
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
192
|
+
* }
|
|
193
|
+
* *\/
|
|
194
|
+
* // example id: example-1
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
175
197
|
*/
|
|
176
198
|
export declare class CreatePolicyStoreCommand extends CreatePolicyStoreCommand_base {
|
|
177
199
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -176,6 +176,28 @@ declare const CreatePolicyTemplateCommand_base: {
|
|
|
176
176
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
177
177
|
*
|
|
178
178
|
* @public
|
|
179
|
+
* @example To create a policy template
|
|
180
|
+
* ```javascript
|
|
181
|
+
* // The following example creates a policy template that has a placeholder for the principal.
|
|
182
|
+
* const input = {
|
|
183
|
+
* "clientToken": "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
|
|
184
|
+
* "description": "Template for research dept",
|
|
185
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
186
|
+
* "statement": "\"AccessVacation\"\npermit(\n principal in ?principal,\n action == Action::\"view\",\n resource == Photo::\"VacationPhoto94.jpg\"\n)\nwhen {\n principal has department && principal.department == \"research\"\n};"
|
|
187
|
+
* };
|
|
188
|
+
* const command = new CreatePolicyTemplateCommand(input);
|
|
189
|
+
* const response = await client.send(command);
|
|
190
|
+
* /* response ==
|
|
191
|
+
* {
|
|
192
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
193
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
194
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
195
|
+
* "policyTemplateId": "PTEXAMPLEabcdefg111111"
|
|
196
|
+
* }
|
|
197
|
+
* *\/
|
|
198
|
+
* // example id: example-1
|
|
199
|
+
* ```
|
|
200
|
+
*
|
|
179
201
|
*/
|
|
180
202
|
export declare class CreatePolicyTemplateCommand extends CreatePolicyTemplateCommand_base {
|
|
181
203
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -157,6 +157,18 @@ declare const DeleteIdentitySourceCommand_base: {
|
|
|
157
157
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
158
158
|
*
|
|
159
159
|
* @public
|
|
160
|
+
* @example To delete an identity source
|
|
161
|
+
* ```javascript
|
|
162
|
+
* // The following example request deletes the specified identity source.
|
|
163
|
+
* const input = {
|
|
164
|
+
* "identitySourceId": "ISEXAMPLEabcdefg111111",
|
|
165
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
166
|
+
* };
|
|
167
|
+
* const command = new DeleteIdentitySourceCommand(input);
|
|
168
|
+
* await client.send(command);
|
|
169
|
+
* // example id: example-1
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
160
172
|
*/
|
|
161
173
|
export declare class DeleteIdentitySourceCommand extends DeleteIdentitySourceCommand_base {
|
|
162
174
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -156,6 +156,18 @@ declare const DeletePolicyCommand_base: {
|
|
|
156
156
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
157
157
|
*
|
|
158
158
|
* @public
|
|
159
|
+
* @example To delete a policy
|
|
160
|
+
* ```javascript
|
|
161
|
+
* // The following example deletes the specified policy from its policy store.
|
|
162
|
+
* const input = {
|
|
163
|
+
* "policyId": "9wYxMpljbbZQb5fcZHyJhY",
|
|
164
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
165
|
+
* };
|
|
166
|
+
* const command = new DeletePolicyCommand(input);
|
|
167
|
+
* await client.send(command);
|
|
168
|
+
* // example id: example-1
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
159
171
|
*/
|
|
160
172
|
export declare class DeletePolicyCommand extends DeletePolicyCommand_base {
|
|
161
173
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -148,6 +148,17 @@ declare const DeletePolicyStoreCommand_base: {
|
|
|
148
148
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
149
149
|
*
|
|
150
150
|
* @public
|
|
151
|
+
* @example To delete a policy store
|
|
152
|
+
* ```javascript
|
|
153
|
+
* // The following example deletes the specified policy store.
|
|
154
|
+
* const input = {
|
|
155
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
156
|
+
* };
|
|
157
|
+
* const command = new DeletePolicyStoreCommand(input);
|
|
158
|
+
* await client.send(command);
|
|
159
|
+
* // example id: example-1
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
151
162
|
*/
|
|
152
163
|
export declare class DeletePolicyStoreCommand extends DeletePolicyStoreCommand_base {
|
|
153
164
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -159,6 +159,18 @@ declare const DeletePolicyTemplateCommand_base: {
|
|
|
159
159
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
160
160
|
*
|
|
161
161
|
* @public
|
|
162
|
+
* @example To delete a policy template
|
|
163
|
+
* ```javascript
|
|
164
|
+
* // The following example deletes a policy template. Before you can perform this operation, you must first delete any template-linked policies that were instantiated from this policy template. To delete them, use DeletePolicy.
|
|
165
|
+
* const input = {
|
|
166
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
167
|
+
* "policyTemplateId": "PTEXAMPLEabcdefg111111"
|
|
168
|
+
* };
|
|
169
|
+
* const command = new DeletePolicyTemplateCommand(input);
|
|
170
|
+
* await client.send(command);
|
|
171
|
+
* // example id: example-1
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
162
174
|
*/
|
|
163
175
|
export declare class DeletePolicyTemplateCommand extends DeletePolicyTemplateCommand_base {
|
|
164
176
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -196,6 +196,35 @@ declare const GetIdentitySourceCommand_base: {
|
|
|
196
196
|
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
197
197
|
*
|
|
198
198
|
* @public
|
|
199
|
+
* @example To retrieve details about an identity source
|
|
200
|
+
* ```javascript
|
|
201
|
+
* // The following example retrieves the details for the specified identity source.
|
|
202
|
+
* const input = {
|
|
203
|
+
* "identitySourceId": "ISEXAMPLEabcdefg111111",
|
|
204
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a"
|
|
205
|
+
* };
|
|
206
|
+
* const command = new GetIdentitySourceCommand(input);
|
|
207
|
+
* const response = await client.send(command);
|
|
208
|
+
* /* response ==
|
|
209
|
+
* {
|
|
210
|
+
* "createdDate": "2024-08-12T18:20:50.99Z",
|
|
211
|
+
* "details": {
|
|
212
|
+
* "clientIds": [
|
|
213
|
+
* "a1b2c3d4e5f6g7h8i9j0kalbmc"
|
|
214
|
+
* ],
|
|
215
|
+
* "discoveryUrl": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5",
|
|
216
|
+
* "openIdIssuer": "COGNITO",
|
|
217
|
+
* "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"
|
|
218
|
+
* },
|
|
219
|
+
* "identitySourceId": "ISEXAMPLEabcdefg111111",
|
|
220
|
+
* "lastUpdatedDate": "2024-08-12T18:20:50.99Z",
|
|
221
|
+
* "policyStoreId": "C7v5xMplfFH3i3e4Jrzb1a",
|
|
222
|
+
* "principalEntityType": "AWS::Cognito"
|
|
223
|
+
* }
|
|
224
|
+
* *\/
|
|
225
|
+
* // example id: example-1
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
199
228
|
*/
|
|
200
229
|
export declare class GetIdentitySourceCommand extends GetIdentitySourceCommand_base {
|
|
201
230
|
/** @internal type navigation helper, not in runtime. */
|