@aws-sdk/client-waf 3.51.0 → 3.54.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.
@@ -5,7 +5,7 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
- import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
8
+ import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { CreateByteMatchSetCommandInput, CreateByteMatchSetCommandOutput } from "./commands/CreateByteMatchSetCommand";
10
10
  import { CreateGeoMatchSetCommandInput, CreateGeoMatchSetCommandOutput } from "./commands/CreateGeoMatchSetCommand";
11
11
  import { CreateIPSetCommandInput, CreateIPSetCommandOutput } from "./commands/CreateIPSetCommand";
@@ -105,7 +105,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
105
105
  * A function that can calculate the length of a request body.
106
106
  * @internal
107
107
  */
108
- bodyLengthChecker?: (body: any) => number | undefined;
108
+ bodyLengthChecker?: __BodyLengthCalculator;
109
109
  /**
110
110
  * A function that converts a stream into an array of bytes.
111
111
  * @internal
@@ -2,3 +2,4 @@ export * from "./WAF";
2
2
  export * from "./WAFClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { WAFServiceException } from "./models/WAFServiceException";
@@ -0,0 +1,10 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ /**
3
+ * Base exception class for all service exceptions from WAF service.
4
+ */
5
+ export declare class WAFServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { WAFServiceException as __BaseException } from "./WAFServiceException";
2
3
  export declare enum WafActionType {
3
4
  ALLOW = "ALLOW",
4
5
  BLOCK = "BLOCK",
@@ -627,25 +628,35 @@ export declare namespace CreateByteMatchSetResponse {
627
628
  /**
628
629
  * <p>The name specified is invalid.</p>
629
630
  */
630
- export interface WAFDisallowedNameException extends __SmithyException, $MetadataBearer {
631
- name: "WAFDisallowedNameException";
632
- $fault: "client";
633
- message?: string;
631
+ export declare class WAFDisallowedNameException extends __BaseException {
632
+ readonly name: "WAFDisallowedNameException";
633
+ readonly $fault: "client";
634
+ /**
635
+ * @internal
636
+ */
637
+ constructor(opts: __ExceptionOptionType<WAFDisallowedNameException, __BaseException>);
634
638
  }
635
639
  /**
636
640
  * <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
637
641
  */
638
- export interface WAFInternalErrorException extends __SmithyException, $MetadataBearer {
639
- name: "WAFInternalErrorException";
640
- $fault: "server";
641
- message?: string;
642
+ export declare class WAFInternalErrorException extends __BaseException {
643
+ readonly name: "WAFInternalErrorException";
644
+ readonly $fault: "server";
645
+ /**
646
+ * @internal
647
+ */
648
+ constructor(opts: __ExceptionOptionType<WAFInternalErrorException, __BaseException>);
642
649
  }
643
650
  /**
644
651
  * <p>The operation failed because you tried to create, update, or delete an object by using an invalid account identifier.</p>
645
652
  */
646
- export interface WAFInvalidAccountException extends __SmithyException, $MetadataBearer {
647
- name: "WAFInvalidAccountException";
648
- $fault: "client";
653
+ export declare class WAFInvalidAccountException extends __BaseException {
654
+ readonly name: "WAFInvalidAccountException";
655
+ readonly $fault: "client";
656
+ /**
657
+ * @internal
658
+ */
659
+ constructor(opts: __ExceptionOptionType<WAFInvalidAccountException, __BaseException>);
649
660
  }
650
661
  export declare enum ParameterExceptionField {
651
662
  BYTE_MATCH_FIELD_TYPE = "BYTE_MATCH_FIELD_TYPE",
@@ -713,30 +724,40 @@ export declare enum ParameterExceptionReason {
713
724
  * </li>
714
725
  * </ul>
715
726
  */
716
- export interface WAFInvalidParameterException extends __SmithyException, $MetadataBearer {
717
- name: "WAFInvalidParameterException";
718
- $fault: "client";
727
+ export declare class WAFInvalidParameterException extends __BaseException {
728
+ readonly name: "WAFInvalidParameterException";
729
+ readonly $fault: "client";
719
730
  field?: ParameterExceptionField | string;
720
731
  parameter?: string;
721
732
  reason?: ParameterExceptionReason | string;
733
+ /**
734
+ * @internal
735
+ */
736
+ constructor(opts: __ExceptionOptionType<WAFInvalidParameterException, __BaseException>);
722
737
  }
723
738
  /**
724
739
  * <p>The operation exceeds a resource limit, for example, the maximum number of <code>WebACL</code> objects that you can create
725
740
  * for an AWS account. For more information, see
726
741
  * <a href="https://docs.aws.amazon.com/waf/latest/developerguide/limits.html">Limits</a> in the <i>AWS WAF Developer Guide</i>.</p>
727
742
  */
728
- export interface WAFLimitsExceededException extends __SmithyException, $MetadataBearer {
729
- name: "WAFLimitsExceededException";
730
- $fault: "client";
731
- message?: string;
743
+ export declare class WAFLimitsExceededException extends __BaseException {
744
+ readonly name: "WAFLimitsExceededException";
745
+ readonly $fault: "client";
746
+ /**
747
+ * @internal
748
+ */
749
+ constructor(opts: __ExceptionOptionType<WAFLimitsExceededException, __BaseException>);
732
750
  }
733
751
  /**
734
752
  * <p>The operation failed because you tried to create, update, or delete an object by using a change token that has already been used.</p>
735
753
  */
736
- export interface WAFStaleDataException extends __SmithyException, $MetadataBearer {
737
- name: "WAFStaleDataException";
738
- $fault: "client";
739
- message?: string;
754
+ export declare class WAFStaleDataException extends __BaseException {
755
+ readonly name: "WAFStaleDataException";
756
+ readonly $fault: "client";
757
+ /**
758
+ * @internal
759
+ */
760
+ constructor(opts: __ExceptionOptionType<WAFStaleDataException, __BaseException>);
740
761
  }
741
762
  export interface CreateGeoMatchSetRequest {
742
763
  /**
@@ -1435,26 +1456,35 @@ export declare namespace CreateRateBasedRuleResponse {
1435
1456
  /**
1436
1457
  * <p></p>
1437
1458
  */
1438
- export interface WAFBadRequestException extends __SmithyException, $MetadataBearer {
1439
- name: "WAFBadRequestException";
1440
- $fault: "client";
1441
- message?: string;
1459
+ export declare class WAFBadRequestException extends __BaseException {
1460
+ readonly name: "WAFBadRequestException";
1461
+ readonly $fault: "client";
1462
+ /**
1463
+ * @internal
1464
+ */
1465
+ constructor(opts: __ExceptionOptionType<WAFBadRequestException, __BaseException>);
1442
1466
  }
1443
1467
  /**
1444
1468
  * <p></p>
1445
1469
  */
1446
- export interface WAFTagOperationException extends __SmithyException, $MetadataBearer {
1447
- name: "WAFTagOperationException";
1448
- $fault: "client";
1449
- message?: string;
1470
+ export declare class WAFTagOperationException extends __BaseException {
1471
+ readonly name: "WAFTagOperationException";
1472
+ readonly $fault: "client";
1473
+ /**
1474
+ * @internal
1475
+ */
1476
+ constructor(opts: __ExceptionOptionType<WAFTagOperationException, __BaseException>);
1450
1477
  }
1451
1478
  /**
1452
1479
  * <p></p>
1453
1480
  */
1454
- export interface WAFTagOperationInternalErrorException extends __SmithyException, $MetadataBearer {
1455
- name: "WAFTagOperationInternalErrorException";
1456
- $fault: "server";
1457
- message?: string;
1481
+ export declare class WAFTagOperationInternalErrorException extends __BaseException {
1482
+ readonly name: "WAFTagOperationInternalErrorException";
1483
+ readonly $fault: "server";
1484
+ /**
1485
+ * @internal
1486
+ */
1487
+ constructor(opts: __ExceptionOptionType<WAFTagOperationInternalErrorException, __BaseException>);
1458
1488
  }
1459
1489
  export interface CreateRegexMatchSetRequest {
1460
1490
  /**
@@ -2566,12 +2596,15 @@ export declare enum MigrationErrorType {
2566
2596
  * </li>
2567
2597
  * </ul>
2568
2598
  */
2569
- export interface WAFEntityMigrationException extends __SmithyException, $MetadataBearer {
2570
- name: "WAFEntityMigrationException";
2571
- $fault: "client";
2572
- message?: string;
2599
+ export declare class WAFEntityMigrationException extends __BaseException {
2600
+ readonly name: "WAFEntityMigrationException";
2601
+ readonly $fault: "client";
2573
2602
  MigrationErrorType?: MigrationErrorType | string;
2574
2603
  MigrationErrorReason?: string;
2604
+ /**
2605
+ * @internal
2606
+ */
2607
+ constructor(opts: __ExceptionOptionType<WAFEntityMigrationException, __BaseException>);
2575
2608
  }
2576
2609
  /**
2577
2610
  * <p>The operation failed because there was nothing to do. For example:</p>
@@ -2596,18 +2629,24 @@ export interface WAFEntityMigrationException extends __SmithyException, $Metadat
2596
2629
  * </li>
2597
2630
  * </ul>
2598
2631
  */
2599
- export interface WAFInvalidOperationException extends __SmithyException, $MetadataBearer {
2600
- name: "WAFInvalidOperationException";
2601
- $fault: "client";
2602
- message?: string;
2632
+ export declare class WAFInvalidOperationException extends __BaseException {
2633
+ readonly name: "WAFInvalidOperationException";
2634
+ readonly $fault: "client";
2635
+ /**
2636
+ * @internal
2637
+ */
2638
+ constructor(opts: __ExceptionOptionType<WAFInvalidOperationException, __BaseException>);
2603
2639
  }
2604
2640
  /**
2605
2641
  * <p>The operation failed because the referenced object doesn't exist.</p>
2606
2642
  */
2607
- export interface WAFNonexistentItemException extends __SmithyException, $MetadataBearer {
2608
- name: "WAFNonexistentItemException";
2609
- $fault: "client";
2610
- message?: string;
2643
+ export declare class WAFNonexistentItemException extends __BaseException {
2644
+ readonly name: "WAFNonexistentItemException";
2645
+ readonly $fault: "client";
2646
+ /**
2647
+ * @internal
2648
+ */
2649
+ constructor(opts: __ExceptionOptionType<WAFNonexistentItemException, __BaseException>);
2611
2650
  }
2612
2651
  /**
2613
2652
  * <p>A request to create an <a>XssMatchSet</a>.</p>
@@ -2856,10 +2895,13 @@ export declare namespace DeleteByteMatchSetResponse {
2856
2895
  * </li>
2857
2896
  * </ul>
2858
2897
  */
2859
- export interface WAFNonEmptyEntityException extends __SmithyException, $MetadataBearer {
2860
- name: "WAFNonEmptyEntityException";
2861
- $fault: "client";
2862
- message?: string;
2898
+ export declare class WAFNonEmptyEntityException extends __BaseException {
2899
+ readonly name: "WAFNonEmptyEntityException";
2900
+ readonly $fault: "client";
2901
+ /**
2902
+ * @internal
2903
+ */
2904
+ constructor(opts: __ExceptionOptionType<WAFNonEmptyEntityException, __BaseException>);
2863
2905
  }
2864
2906
  /**
2865
2907
  * <p>The operation failed because you tried to delete an object that is still in use. For example:</p>
@@ -2872,10 +2914,13 @@ export interface WAFNonEmptyEntityException extends __SmithyException, $Metadata
2872
2914
  * </li>
2873
2915
  * </ul>
2874
2916
  */
2875
- export interface WAFReferencedItemException extends __SmithyException, $MetadataBearer {
2876
- name: "WAFReferencedItemException";
2877
- $fault: "client";
2878
- message?: string;
2917
+ export declare class WAFReferencedItemException extends __BaseException {
2918
+ readonly name: "WAFReferencedItemException";
2919
+ readonly $fault: "client";
2920
+ /**
2921
+ * @internal
2922
+ */
2923
+ constructor(opts: __ExceptionOptionType<WAFReferencedItemException, __BaseException>);
2879
2924
  }
2880
2925
  export interface DeleteGeoMatchSetRequest {
2881
2926
  /**
@@ -5180,10 +5225,13 @@ export declare namespace PutLoggingConfigurationResponse {
5180
5225
  /**
5181
5226
  * <p>AWS WAF is not able to access the service linked role. This can be caused by a previous <code>PutLoggingConfiguration</code> request, which can lock the service linked role for about 20 seconds. Please try your request again. The service linked role can also be locked by a previous <code>DeleteServiceLinkedRole</code> request, which can lock the role for 15 minutes or more. If you recently made a <code>DeleteServiceLinkedRole</code>, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.</p>
5182
5227
  */
5183
- export interface WAFServiceLinkedRoleErrorException extends __SmithyException, $MetadataBearer {
5184
- name: "WAFServiceLinkedRoleErrorException";
5185
- $fault: "client";
5186
- message?: string;
5228
+ export declare class WAFServiceLinkedRoleErrorException extends __BaseException {
5229
+ readonly name: "WAFServiceLinkedRoleErrorException";
5230
+ readonly $fault: "client";
5231
+ /**
5232
+ * @internal
5233
+ */
5234
+ constructor(opts: __ExceptionOptionType<WAFServiceLinkedRoleErrorException, __BaseException>);
5187
5235
  }
5188
5236
  export interface PutPermissionPolicyRequest {
5189
5237
  /**
@@ -5241,10 +5289,13 @@ export declare namespace PutPermissionPolicyResponse {
5241
5289
  * </li>
5242
5290
  * </ul>
5243
5291
  */
5244
- export interface WAFInvalidPermissionPolicyException extends __SmithyException, $MetadataBearer {
5245
- name: "WAFInvalidPermissionPolicyException";
5246
- $fault: "client";
5247
- message?: string;
5292
+ export declare class WAFInvalidPermissionPolicyException extends __BaseException {
5293
+ readonly name: "WAFInvalidPermissionPolicyException";
5294
+ readonly $fault: "client";
5295
+ /**
5296
+ * @internal
5297
+ */
5298
+ constructor(opts: __ExceptionOptionType<WAFInvalidPermissionPolicyException, __BaseException>);
5248
5299
  }
5249
5300
  export interface TagResourceRequest {
5250
5301
  /**
@@ -5399,10 +5450,13 @@ export declare namespace UpdateByteMatchSetResponse {
5399
5450
  * </li>
5400
5451
  * </ul>
5401
5452
  */
5402
- export interface WAFNonexistentContainerException extends __SmithyException, $MetadataBearer {
5403
- name: "WAFNonexistentContainerException";
5404
- $fault: "client";
5405
- message?: string;
5453
+ export declare class WAFNonexistentContainerException extends __BaseException {
5454
+ readonly name: "WAFNonexistentContainerException";
5455
+ readonly $fault: "client";
5456
+ /**
5457
+ * @internal
5458
+ */
5459
+ constructor(opts: __ExceptionOptionType<WAFNonexistentContainerException, __BaseException>);
5406
5460
  }
5407
5461
  /**
5408
5462
  * <note>
@@ -5756,10 +5810,13 @@ export declare namespace UpdateRegexPatternSetResponse {
5756
5810
  /**
5757
5811
  * <p>The regular expression (regex) you specified in <code>RegexPatternString</code> is invalid.</p>
5758
5812
  */
5759
- export interface WAFInvalidRegexPatternException extends __SmithyException, $MetadataBearer {
5760
- name: "WAFInvalidRegexPatternException";
5761
- $fault: "client";
5762
- message?: string;
5813
+ export declare class WAFInvalidRegexPatternException extends __BaseException {
5814
+ readonly name: "WAFInvalidRegexPatternException";
5815
+ readonly $fault: "client";
5816
+ /**
5817
+ * @internal
5818
+ */
5819
+ constructor(opts: __ExceptionOptionType<WAFInvalidRegexPatternException, __BaseException>);
5763
5820
  }
5764
5821
  export interface UpdateRuleRequest {
5765
5822
  /**
@@ -6150,10 +6207,13 @@ export declare namespace UpdateWebACLResponse {
6150
6207
  /**
6151
6208
  * <p>The specified subscription does not exist.</p>
6152
6209
  */
6153
- export interface WAFSubscriptionNotFoundException extends __SmithyException, $MetadataBearer {
6154
- name: "WAFSubscriptionNotFoundException";
6155
- $fault: "client";
6156
- message?: string;
6210
+ export declare class WAFSubscriptionNotFoundException extends __BaseException {
6211
+ readonly name: "WAFSubscriptionNotFoundException";
6212
+ readonly $fault: "client";
6213
+ /**
6214
+ * @internal
6215
+ */
6216
+ constructor(opts: __ExceptionOptionType<WAFSubscriptionNotFoundException, __BaseException>);
6157
6217
  }
6158
6218
  /**
6159
6219
  * <note>
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: WAFClientConfig) => {
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
9
  base64Decoder: import("@aws-sdk/types").Decoder;
10
10
  base64Encoder: import("@aws-sdk/types").Encoder;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
14
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: WAFClientConfig) => {
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
9
  base64Decoder: import("@aws-sdk/types").Decoder;
10
10
  base64Encoder: import("@aws-sdk/types").Encoder;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
14
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: WAFClientConfig) => {
8
8
  requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | import("@aws-sdk/fetch-http-handler").FetchHttpHandler;
9
9
  apiVersion: string;
10
10
  urlParser: import("@aws-sdk/types").UrlParser;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  streamCollector: import("@aws-sdk/types").StreamCollector;
13
13
  base64Decoder: import("@aws-sdk/types").Decoder;
14
14
  base64Encoder: import("@aws-sdk/types").Encoder;
@@ -5,7 +5,7 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
- import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
8
+ import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { CreateByteMatchSetCommandInput, CreateByteMatchSetCommandOutput } from "./commands/CreateByteMatchSetCommand";
10
10
  import { CreateGeoMatchSetCommandInput, CreateGeoMatchSetCommandOutput } from "./commands/CreateGeoMatchSetCommand";
11
11
  import { CreateIPSetCommandInput, CreateIPSetCommandOutput } from "./commands/CreateIPSetCommand";
@@ -93,7 +93,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
93
93
 
94
94
  urlParser?: __UrlParser;
95
95
 
96
- bodyLengthChecker?: (body: any) => number | undefined;
96
+ bodyLengthChecker?: __BodyLengthCalculator;
97
97
 
98
98
  streamCollector?: __StreamCollector;
99
99
 
@@ -2,3 +2,4 @@ export * from "./WAF";
2
2
  export * from "./WAFClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { WAFServiceException } from "./models/WAFServiceException";
@@ -0,0 +1,6 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+
3
+ export declare class WAFServiceException extends __ServiceException {
4
+
5
+ constructor(options: __ServiceExceptionOptions);
6
+ }