@aws-sdk/client-verifiedpermissions 3.787.0 → 3.796.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/index.js CHANGED
@@ -68,6 +68,7 @@ __export(index_exports, {
68
68
  DeletePolicyCommand: () => DeletePolicyCommand,
69
69
  DeletePolicyStoreCommand: () => DeletePolicyStoreCommand,
70
70
  DeletePolicyTemplateCommand: () => DeletePolicyTemplateCommand,
71
+ DeletionProtection: () => DeletionProtection,
71
72
  EntitiesDefinition: () => EntitiesDefinition,
72
73
  EntitiesDefinitionFilterSensitiveLog: () => EntitiesDefinitionFilterSensitiveLog,
73
74
  EntityIdentifierFilterSensitiveLog: () => EntityIdentifierFilterSensitiveLog,
@@ -90,6 +91,7 @@ __export(index_exports, {
90
91
  IdentitySourceItemDetailsFilterSensitiveLog: () => IdentitySourceItemDetailsFilterSensitiveLog,
91
92
  IdentitySourceItemFilterSensitiveLog: () => IdentitySourceItemFilterSensitiveLog,
92
93
  InternalServerException: () => InternalServerException,
94
+ InvalidStateException: () => InvalidStateException,
93
95
  IsAuthorizedCommand: () => IsAuthorizedCommand,
94
96
  IsAuthorizedInputFilterSensitiveLog: () => IsAuthorizedInputFilterSensitiveLog,
95
97
  IsAuthorizedOutputFilterSensitiveLog: () => IsAuthorizedOutputFilterSensitiveLog,
@@ -638,10 +640,32 @@ var PolicyEffect = {
638
640
  FORBID: "Forbid",
639
641
  PERMIT: "Permit"
640
642
  };
643
+ var DeletionProtection = {
644
+ DISABLED: "DISABLED",
645
+ ENABLED: "ENABLED"
646
+ };
641
647
  var ValidationMode = {
642
648
  OFF: "OFF",
643
649
  STRICT: "STRICT"
644
650
  };
651
+ var InvalidStateException = class _InvalidStateException extends VerifiedPermissionsServiceException {
652
+ static {
653
+ __name(this, "InvalidStateException");
654
+ }
655
+ name = "InvalidStateException";
656
+ $fault = "client";
657
+ /**
658
+ * @internal
659
+ */
660
+ constructor(opts) {
661
+ super({
662
+ name: "InvalidStateException",
663
+ $fault: "client",
664
+ ...opts
665
+ });
666
+ Object.setPrototypeOf(this, _InvalidStateException.prototype);
667
+ }
668
+ };
645
669
  var EntityReference;
646
670
  ((EntityReference3) => {
647
671
  EntityReference3.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -1837,6 +1861,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1837
1861
  case "ServiceQuotaExceededException":
1838
1862
  case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
1839
1863
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1864
+ case "InvalidStateException":
1865
+ case "com.amazonaws.verifiedpermissions#InvalidStateException":
1866
+ throw await de_InvalidStateExceptionRes(parsedOutput, context);
1840
1867
  default:
1841
1868
  const parsedBody = parsedOutput.body;
1842
1869
  return throwDefaultError({
@@ -1873,6 +1900,15 @@ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput,
1873
1900
  });
1874
1901
  return (0, import_smithy_client.decorateServiceException)(exception, body);
1875
1902
  }, "de_InternalServerExceptionRes");
1903
+ var de_InvalidStateExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1904
+ const body = parsedOutput.body;
1905
+ const deserialized = (0, import_smithy_client._json)(body);
1906
+ const exception = new InvalidStateException({
1907
+ $metadata: deserializeMetadata(parsedOutput),
1908
+ ...deserialized
1909
+ });
1910
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
1911
+ }, "de_InvalidStateExceptionRes");
1876
1912
  var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1877
1913
  const body = parsedOutput.body;
1878
1914
  const deserialized = (0, import_smithy_client._json)(body);
@@ -1997,6 +2033,7 @@ var se_CreatePolicyInput = /* @__PURE__ */ __name((input, context) => {
1997
2033
  var se_CreatePolicyStoreInput = /* @__PURE__ */ __name((input, context) => {
1998
2034
  return (0, import_smithy_client.take)(input, {
1999
2035
  clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
2036
+ deletionProtection: [],
2000
2037
  description: [],
2001
2038
  validationSettings: import_smithy_client._json
2002
2039
  });
@@ -2267,6 +2304,7 @@ var de_GetPolicyStoreOutput = /* @__PURE__ */ __name((output, context) => {
2267
2304
  return (0, import_smithy_client.take)(output, {
2268
2305
  arn: import_smithy_client.expectString,
2269
2306
  createdDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "createdDate"),
2307
+ deletionProtection: import_smithy_client.expectString,
2270
2308
  description: import_smithy_client.expectString,
2271
2309
  lastUpdatedDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)), "lastUpdatedDate"),
2272
2310
  policyStoreId: import_smithy_client.expectString,
@@ -2989,7 +3027,9 @@ var paginateListPolicyTemplates = (0, import_core.createPaginator)(VerifiedPermi
2989
3027
  ServiceQuotaExceededException,
2990
3028
  PolicyDefinition,
2991
3029
  PolicyEffect,
3030
+ DeletionProtection,
2992
3031
  ValidationMode,
3032
+ InvalidStateException,
2993
3033
  EntityReference,
2994
3034
  OpenIdIssuer,
2995
3035
  UpdateOpenIdConnectTokenSelection,
@@ -211,10 +211,26 @@ export const PolicyEffect = {
211
211
  FORBID: "Forbid",
212
212
  PERMIT: "Permit",
213
213
  };
214
+ export const DeletionProtection = {
215
+ DISABLED: "DISABLED",
216
+ ENABLED: "ENABLED",
217
+ };
214
218
  export const ValidationMode = {
215
219
  OFF: "OFF",
216
220
  STRICT: "STRICT",
217
221
  };
222
+ export class InvalidStateException extends __BaseException {
223
+ name = "InvalidStateException";
224
+ $fault = "client";
225
+ constructor(opts) {
226
+ super({
227
+ name: "InvalidStateException",
228
+ $fault: "client",
229
+ ...opts,
230
+ });
231
+ Object.setPrototypeOf(this, InvalidStateException.prototype);
232
+ }
233
+ }
218
234
  export var EntityReference;
219
235
  (function (EntityReference) {
220
236
  EntityReference.visit = (value, visitor) => {
@@ -2,7 +2,7 @@ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody a
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectString as __expectString, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
- import { AccessDeniedException, AttributeValue, ConflictException, ContextDefinition, EntitiesDefinition, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, AttributeValue, ConflictException, ContextDefinition, EntitiesDefinition, InternalServerException, InvalidStateException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  import { VerifiedPermissionsServiceException as __BaseException } from "../models/VerifiedPermissionsServiceException";
7
7
  export const se_BatchGetPolicyCommand = async (input, context) => {
8
8
  const headers = sharedHeaders("BatchGetPolicy");
@@ -545,6 +545,9 @@ const de_CommandError = async (output, context) => {
545
545
  case "ServiceQuotaExceededException":
546
546
  case "com.amazonaws.verifiedpermissions#ServiceQuotaExceededException":
547
547
  throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
548
+ case "InvalidStateException":
549
+ case "com.amazonaws.verifiedpermissions#InvalidStateException":
550
+ throw await de_InvalidStateExceptionRes(parsedOutput, context);
548
551
  default:
549
552
  const parsedBody = parsedOutput.body;
550
553
  return throwDefaultError({
@@ -581,6 +584,15 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
581
584
  });
582
585
  return __decorateServiceException(exception, body);
583
586
  };
587
+ const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
588
+ const body = parsedOutput.body;
589
+ const deserialized = _json(body);
590
+ const exception = new InvalidStateException({
591
+ $metadata: deserializeMetadata(parsedOutput),
592
+ ...deserialized,
593
+ });
594
+ return __decorateServiceException(exception, body);
595
+ };
584
596
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
585
597
  const body = parsedOutput.body;
586
598
  const deserialized = _json(body);
@@ -709,6 +721,7 @@ const se_CreatePolicyInput = (input, context) => {
709
721
  const se_CreatePolicyStoreInput = (input, context) => {
710
722
  return take(input, {
711
723
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
724
+ deletionProtection: [],
712
725
  description: [],
713
726
  validationSettings: _json,
714
727
  });
@@ -989,6 +1002,7 @@ const de_GetPolicyStoreOutput = (output, context) => {
989
1002
  return take(output, {
990
1003
  arn: __expectString,
991
1004
  createdDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1005
+ deletionProtection: __expectString,
992
1006
  description: __expectString,
993
1007
  lastUpdatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
994
1008
  policyStoreId: __expectString,
@@ -50,6 +50,7 @@ declare const CreatePolicyStoreCommand_base: {
50
50
  * mode: "OFF" || "STRICT", // required
51
51
  * },
52
52
  * description: "STRING_VALUE",
53
+ * deletionProtection: "ENABLED" || "DISABLED",
53
54
  * };
54
55
  * const command = new CreatePolicyStoreCommand(input);
55
56
  * const response = await client.send(command);
@@ -51,6 +51,9 @@ declare const DeletePolicyStoreCommand_base: {
51
51
  * @see {@link DeletePolicyStoreCommandOutput} for command's `response` shape.
52
52
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
53
53
  *
54
+ * @throws {@link InvalidStateException} (client fault)
55
+ * <p>The policy store can't be deleted because deletion protection is enabled. To delete this policy store, disable deletion protection.</p>
56
+ *
54
57
  * @throws {@link AccessDeniedException} (client fault)
55
58
  * <p>You don't have sufficient access to perform this action.</p>
56
59
  *
@@ -48,6 +48,7 @@ declare const GetPolicyStoreCommand_base: {
48
48
  * // createdDate: new Date("TIMESTAMP"), // required
49
49
  * // lastUpdatedDate: new Date("TIMESTAMP"), // required
50
50
  * // description: "STRING_VALUE",
51
+ * // deletionProtection: "ENABLED" || "DISABLED",
51
52
  * // };
52
53
  *
53
54
  * ```
@@ -45,6 +45,7 @@ declare const UpdatePolicyStoreCommand_base: {
45
45
  * validationSettings: { // ValidationSettings
46
46
  * mode: "OFF" || "STRICT", // required
47
47
  * },
48
+ * deletionProtection: "ENABLED" || "DISABLED",
48
49
  * description: "STRING_VALUE",
49
50
  * };
50
51
  * const command = new UpdatePolicyStoreCommand(input);
@@ -1660,6 +1660,18 @@ export interface CreatePolicyOutput {
1660
1660
  */
1661
1661
  effect?: PolicyEffect | undefined;
1662
1662
  }
1663
+ /**
1664
+ * @public
1665
+ * @enum
1666
+ */
1667
+ export declare const DeletionProtection: {
1668
+ readonly DISABLED: "DISABLED";
1669
+ readonly ENABLED: "ENABLED";
1670
+ };
1671
+ /**
1672
+ * @public
1673
+ */
1674
+ export type DeletionProtection = (typeof DeletionProtection)[keyof typeof DeletionProtection];
1663
1675
  /**
1664
1676
  * @public
1665
1677
  * @enum
@@ -1746,6 +1758,12 @@ export interface CreatePolicyStoreInput {
1746
1758
  * @public
1747
1759
  */
1748
1760
  description?: string | undefined;
1761
+ /**
1762
+ * <p>Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted.</p>
1763
+ * <p>The default state is <code>DISABLED</code>.</p>
1764
+ * @public
1765
+ */
1766
+ deletionProtection?: DeletionProtection | undefined;
1749
1767
  }
1750
1768
  /**
1751
1769
  * @public
@@ -1891,6 +1909,18 @@ export interface DeletePolicyStoreInput {
1891
1909
  */
1892
1910
  export interface DeletePolicyStoreOutput {
1893
1911
  }
1912
+ /**
1913
+ * <p>The policy store can't be deleted because deletion protection is enabled. To delete this policy store, disable deletion protection.</p>
1914
+ * @public
1915
+ */
1916
+ export declare class InvalidStateException extends __BaseException {
1917
+ readonly name: "InvalidStateException";
1918
+ readonly $fault: "client";
1919
+ /**
1920
+ * @internal
1921
+ */
1922
+ constructor(opts: __ExceptionOptionType<InvalidStateException, __BaseException>);
1923
+ }
1894
1924
  /**
1895
1925
  * @public
1896
1926
  */
@@ -2196,6 +2226,12 @@ export interface GetPolicyStoreOutput {
2196
2226
  * @public
2197
2227
  */
2198
2228
  description?: string | undefined;
2229
+ /**
2230
+ * <p>Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted.</p>
2231
+ * <p>The default state is <code>DISABLED</code>.</p>
2232
+ * @public
2233
+ */
2234
+ deletionProtection?: DeletionProtection | undefined;
2199
2235
  }
2200
2236
  /**
2201
2237
  * @public
@@ -3556,6 +3592,12 @@ export interface UpdatePolicyStoreInput {
3556
3592
  * @public
3557
3593
  */
3558
3594
  validationSettings: ValidationSettings | undefined;
3595
+ /**
3596
+ * <p>Specifies whether the policy store can be deleted. If enabled, the policy store can't be deleted.</p>
3597
+ * <p>When you call <code>UpdatePolicyStore</code>, this parameter is unchanged unless explicitly included in the call.</p>
3598
+ * @public
3599
+ */
3600
+ deletionProtection?: DeletionProtection | undefined;
3559
3601
  /**
3560
3602
  * <p>Descriptive text that you can provide to help with identification
3561
3603
  * of the current policy store.</p>
@@ -496,6 +496,12 @@ export interface CreatePolicyOutput {
496
496
  lastUpdatedDate: Date | undefined;
497
497
  effect?: PolicyEffect | undefined;
498
498
  }
499
+ export declare const DeletionProtection: {
500
+ readonly DISABLED: "DISABLED";
501
+ readonly ENABLED: "ENABLED";
502
+ };
503
+ export type DeletionProtection =
504
+ (typeof DeletionProtection)[keyof typeof DeletionProtection];
499
505
  export declare const ValidationMode: {
500
506
  readonly OFF: "OFF";
501
507
  readonly STRICT: "STRICT";
@@ -509,6 +515,7 @@ export interface CreatePolicyStoreInput {
509
515
  clientToken?: string | undefined;
510
516
  validationSettings: ValidationSettings | undefined;
511
517
  description?: string | undefined;
518
+ deletionProtection?: DeletionProtection | undefined;
512
519
  }
513
520
  export interface CreatePolicyStoreOutput {
514
521
  policyStoreId: string | undefined;
@@ -542,6 +549,13 @@ export interface DeletePolicyStoreInput {
542
549
  policyStoreId: string | undefined;
543
550
  }
544
551
  export interface DeletePolicyStoreOutput {}
552
+ export declare class InvalidStateException extends __BaseException {
553
+ readonly name: "InvalidStateException";
554
+ readonly $fault: "client";
555
+ constructor(
556
+ opts: __ExceptionOptionType<InvalidStateException, __BaseException>
557
+ );
558
+ }
545
559
  export interface DeletePolicyTemplateInput {
546
560
  policyStoreId: string | undefined;
547
561
  policyTemplateId: string | undefined;
@@ -623,6 +637,7 @@ export interface GetPolicyStoreOutput {
623
637
  createdDate: Date | undefined;
624
638
  lastUpdatedDate: Date | undefined;
625
639
  description?: string | undefined;
640
+ deletionProtection?: DeletionProtection | undefined;
626
641
  }
627
642
  export interface GetPolicyTemplateInput {
628
643
  policyStoreId: string | undefined;
@@ -959,6 +974,7 @@ export interface PutSchemaOutput {
959
974
  export interface UpdatePolicyStoreInput {
960
975
  policyStoreId: string | undefined;
961
976
  validationSettings: ValidationSettings | undefined;
977
+ deletionProtection?: DeletionProtection | undefined;
962
978
  description?: string | undefined;
963
979
  }
964
980
  export interface UpdatePolicyStoreOutput {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-verifiedpermissions",
3
3
  "description": "AWS SDK for JavaScript Verifiedpermissions Client for Node.js, Browser and React Native",
4
- "version": "3.787.0",
4
+ "version": "3.796.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-verifiedpermissions",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.775.0",
24
- "@aws-sdk/credential-provider-node": "3.787.0",
23
+ "@aws-sdk/core": "3.796.0",
24
+ "@aws-sdk/credential-provider-node": "3.796.0",
25
25
  "@aws-sdk/middleware-host-header": "3.775.0",
26
26
  "@aws-sdk/middleware-logger": "3.775.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.775.0",
28
- "@aws-sdk/middleware-user-agent": "3.787.0",
28
+ "@aws-sdk/middleware-user-agent": "3.796.0",
29
29
  "@aws-sdk/region-config-resolver": "3.775.0",
30
30
  "@aws-sdk/types": "3.775.0",
31
31
  "@aws-sdk/util-endpoints": "3.787.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.775.0",
33
- "@aws-sdk/util-user-agent-node": "3.787.0",
33
+ "@aws-sdk/util-user-agent-node": "3.796.0",
34
34
  "@smithy/config-resolver": "^4.1.0",
35
35
  "@smithy/core": "^3.2.0",
36
36
  "@smithy/fetch-http-handler": "^5.0.2",