@aws-sdk/client-lightsail 3.1156.0 → 3.1157.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.
@@ -1,5 +1,82 @@
1
1
  import type { AlarmState, CertificateProvider, ComparisonOperator, ContactMethodVerificationProtocol, ContactProtocol, ContainerServicePowerName, HttpEndpoint, HttpProtocolIpv6, HttpTokens, InstanceHealthReason, InstanceHealthState, IpAddressType, LoadBalancerAttributeName, LoadBalancerMetricName, LoadBalancerProtocol, LoadBalancerState, LoadBalancerTlsCertificateDnsRecordCreationStateCode, LoadBalancerTlsCertificateDomainStatus, LoadBalancerTlsCertificateFailureReason, LoadBalancerTlsCertificateRenewalStatus, LoadBalancerTlsCertificateRevocationReason, LoadBalancerTlsCertificateStatus, MetricName, MetricStatistic, MetricUnit, PartnerStatus, ProfileType, RegionName, RelationalDatabaseEngine, RelationalDatabaseMetricName, RelationalDatabasePasswordVersion, ResourceBucketAccess, ResourceType, SetupStatus, TierName, TreatMissingData, ViewerMinimumTlsProtocolVersionEnum } from "./enums";
2
- import type { AccessRules, AvailabilityZone, Bucket, BucketAccessLogConfig, BucketCorsConfig, CacheBehavior, CacheBehaviorPerPath, CacheSettings, ContainerImage, ContainerService, DistributionCustomErrorResponse, DomainEntry, InputOrigin, MetricDatapoint, Operation, PortInfo, PrivateRegistryAccessRequest, ResourceLocation, Tag } from "./models_0";
2
+ import type { AccessRules, AvailabilityZone, Bucket, BucketAccessLogConfig, BucketCorsConfig, CacheBehavior, CacheBehaviorPerPath, CacheSettings, ContainerImage, ContainerService, DistributionCustomErrorResponse, DomainEntry, InputOrigin, InstanceState, KeyPair, MetricDatapoint, Operation, PortInfo, PrivateRegistryAccessRequest, ResourceLocation, Tag, WafRule } from "./models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export interface GetInstanceStateRequest {
7
+ /**
8
+ * <p>The name of the instance to get state information about.</p>
9
+ * @public
10
+ */
11
+ instanceName: string | undefined;
12
+ }
13
+ /**
14
+ * @public
15
+ */
16
+ export interface GetInstanceStateResult {
17
+ /**
18
+ * <p>The state of the instance.</p>
19
+ * @public
20
+ */
21
+ state?: InstanceState | undefined;
22
+ }
23
+ /**
24
+ * @public
25
+ */
26
+ export interface GetKeyPairRequest {
27
+ /**
28
+ * <p>The name of the key pair for which you are requesting information.</p>
29
+ * @public
30
+ */
31
+ keyPairName: string | undefined;
32
+ }
33
+ /**
34
+ * @public
35
+ */
36
+ export interface GetKeyPairResult {
37
+ /**
38
+ * <p>An array of key-value pairs containing information about the key pair.</p>
39
+ * @public
40
+ */
41
+ keyPair?: KeyPair | undefined;
42
+ }
43
+ /**
44
+ * @public
45
+ */
46
+ export interface GetKeyPairsRequest {
47
+ /**
48
+ * <p>The token to advance to the next page of results from your request.</p>
49
+ * <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results
50
+ * are paginated, the response will return a next page token that you can specify as the page
51
+ * token in a subsequent request.</p>
52
+ * @public
53
+ */
54
+ pageToken?: string | undefined;
55
+ /**
56
+ * <p>A Boolean value that indicates whether to include the default key pair in the response of
57
+ * your request.</p>
58
+ * @public
59
+ */
60
+ includeDefaultKeyPair?: boolean | undefined;
61
+ }
62
+ /**
63
+ * @public
64
+ */
65
+ export interface GetKeyPairsResult {
66
+ /**
67
+ * <p>An array of key-value pairs containing information about the key pairs.</p>
68
+ * @public
69
+ */
70
+ keyPairs?: KeyPair[] | undefined;
71
+ /**
72
+ * <p>The token to advance to the next page of results from your request.</p>
73
+ * <p>A next page token is not returned if there are no more results to display.</p>
74
+ * <p>To get the next page of results, perform another <code>GetKeyPairs</code> request and
75
+ * specify the next page token using the <code>pageToken</code> parameter.</p>
76
+ * @public
77
+ */
78
+ nextPageToken?: string | undefined;
79
+ }
3
80
  /**
4
81
  * @public
5
82
  */
@@ -3860,6 +3937,53 @@ export interface UpdateDistributionRequest {
3860
3937
  * @public
3861
3938
  */
3862
3939
  customErrorResponses?: DistributionCustomErrorResponse[] | undefined;
3940
+ /**
3941
+ * <p>Specifies whether to enable Web Application Firewall (WAF) for the distribution. WAF
3942
+ * inspects viewer requests and blocks requests that match the WAF rule groups that you
3943
+ * enable.</p>
3944
+ * <p>When you enable WAF without specifying the <code>wafRules</code> parameter, the
3945
+ * distribution has no WAF rule groups enabled and doesn't block any requests.</p>
3946
+ * <note>
3947
+ * <p>WAF is available only for distributions that use the <code>medium_1_0</code> or
3948
+ * <code>large_1_0</code> bundle.</p>
3949
+ * <p>Setting this parameter to <code>false</code> disables WAF for the distribution and
3950
+ * removes its WAF rule groups. You must enable the WAF rule groups again if you enable WAF
3951
+ * again.</p>
3952
+ * </note>
3953
+ * @public
3954
+ */
3955
+ enableWaf?: boolean | undefined;
3956
+ /**
3957
+ * <p>An array of objects that describe the WAF rule groups to enable for the
3958
+ * distribution.</p>
3959
+ * <p>The array that you specify replaces the existing WAF rule groups of the distribution.
3960
+ * To keep a WAF rule group enabled, include it in the array. To disable all WAF rule groups,
3961
+ * specify an empty array.</p>
3962
+ * <p>You can specify this parameter only when WAF is enabled for the distribution.</p>
3963
+ * <p>The WAF rule groups that you can specify depend on the bundle of the
3964
+ * distribution:</p>
3965
+ * <ul>
3966
+ * <li>
3967
+ * <p>
3968
+ * <code>medium_1_0</code> – Supports the <code>AWSManagedRulesCommonRuleSet</code>,
3969
+ * <code>AWSManagedRulesKnownBadInputsRuleSet</code>, and
3970
+ * <code>AWSManagedRulesAnonymousIpList</code> rule groups.</p>
3971
+ * </li>
3972
+ * <li>
3973
+ * <p>
3974
+ * <code>large_1_0</code> – Supports the rule groups for <code>medium_1_0</code>, plus
3975
+ * <code>AWSManagedRulesAdminProtectionRuleSet</code>,
3976
+ * <code>AWSManagedRulesSQLiRuleSet</code>, <code>AWSManagedRulesLinuxRuleSet</code>,
3977
+ * <code>AWSManagedRulesUnixRuleSet</code>, <code>AWSManagedRulesWindowsRuleSet</code>,
3978
+ * <code>AWSManagedRulesPHPRuleSet</code>, <code>AWSManagedRulesWordPressRuleSet</code>,
3979
+ * <code>AWSManagedRulesAmazonIpReputationList</code>,
3980
+ * <code>AWSManagedRulesATPRuleSet</code>, <code>AWSManagedRulesACFPRuleSet</code>, and
3981
+ * <code>AWSManagedRulesBotControlRuleSet</code> rule groups.</p>
3982
+ * </li>
3983
+ * </ul>
3984
+ * @public
3985
+ */
3986
+ wafRules?: WafRule[] | undefined;
3863
3987
  }
3864
3988
  /**
3865
3989
  * @public
@@ -462,6 +462,12 @@ export declare var UpdateRelationalDatabaseParametersRequest$: StaticStructureSc
462
462
  export declare var UpdateRelationalDatabaseParametersResult$: StaticStructureSchema;
463
463
  export declare var UpdateRelationalDatabaseRequest$: StaticStructureSchema;
464
464
  export declare var UpdateRelationalDatabaseResult$: StaticStructureSchema;
465
+ export declare var WafAcfpConfig$: StaticStructureSchema;
466
+ export declare var WafAtpConfig$: StaticStructureSchema;
467
+ export declare var WafBotControlConfig$: StaticStructureSchema;
468
+ export declare var WafConfig$: StaticStructureSchema;
469
+ export declare var WafResponseInspection$: StaticStructureSchema;
470
+ export declare var WafRule$: StaticStructureSchema;
465
471
  export declare var AllocateStaticIp$: StaticOperationSchema;
466
472
  export declare var AttachCertificateToDistribution$: StaticOperationSchema;
467
473
  export declare var AttachDisk$: StaticOperationSchema;
@@ -1,5 +1,5 @@
1
1
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import { GetInstanceStateRequest, GetInstanceStateResult } from "../models/models_0";
2
+ import { GetInstanceStateRequest, GetInstanceStateResult } from "../models/models_1";
3
3
  export { __MetadataBearer };
4
4
  export interface GetInstanceStateCommandInput extends GetInstanceStateRequest {}
5
5
  export interface GetInstanceStateCommandOutput extends GetInstanceStateResult, __MetadataBearer {}
@@ -1,5 +1,5 @@
1
1
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import { GetKeyPairRequest, GetKeyPairResult } from "../models/models_0";
2
+ import { GetKeyPairRequest, GetKeyPairResult } from "../models/models_1";
3
3
  export { __MetadataBearer };
4
4
  export interface GetKeyPairCommandInput extends GetKeyPairRequest {}
5
5
  export interface GetKeyPairCommandOutput extends GetKeyPairResult, __MetadataBearer {}
@@ -1,5 +1,5 @@
1
1
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
- import { GetKeyPairsRequest, GetKeyPairsResult } from "../models/models_0";
2
+ import { GetKeyPairsRequest, GetKeyPairsResult } from "../models/models_1";
3
3
  export { __MetadataBearer };
4
4
  export interface GetKeyPairsCommandInput extends GetKeyPairsRequest {}
5
5
  export interface GetKeyPairsCommandOutput extends GetKeyPairsResult, __MetadataBearer {}
@@ -503,6 +503,17 @@ export declare const ViewerMinimumTlsProtocolVersionEnum: {
503
503
  };
504
504
  export type ViewerMinimumTlsProtocolVersionEnum =
505
505
  (typeof ViewerMinimumTlsProtocolVersionEnum)[keyof typeof ViewerMinimumTlsProtocolVersionEnum];
506
+ export declare const WafPayloadTypeEnum: {
507
+ readonly FORM_ENCODED: "FORM_ENCODED";
508
+ readonly JSON: "JSON";
509
+ };
510
+ export type WafPayloadTypeEnum = (typeof WafPayloadTypeEnum)[keyof typeof WafPayloadTypeEnum];
511
+ export declare const WafInspectionLevelEnum: {
512
+ readonly COMMON: "COMMON";
513
+ readonly TARGETED: "TARGETED";
514
+ };
515
+ export type WafInspectionLevelEnum =
516
+ (typeof WafInspectionLevelEnum)[keyof typeof WafInspectionLevelEnum];
506
517
  export declare const Status: {
507
518
  readonly FailedInstanceCreation: "failedInstanceCreation";
508
519
  readonly FailedStartingGUISession: "failedStartingGUISession";
@@ -538,6 +549,8 @@ export declare const DistributionMetricName: {
538
549
  readonly Http5xxErrorRate: "Http5xxErrorRate";
539
550
  readonly Requests: "Requests";
540
551
  readonly TotalErrorRate: "TotalErrorRate";
552
+ readonly WafAllowedRequests: "WafAllowedRequests";
553
+ readonly WafBlockedRequests: "WafBlockedRequests";
541
554
  };
542
555
  export type DistributionMetricName =
543
556
  (typeof DistributionMetricName)[keyof typeof DistributionMetricName];
@@ -62,6 +62,8 @@ import {
62
62
  StatusType,
63
63
  TreatMissingData,
64
64
  ViewerMinimumTlsProtocolVersionEnum,
65
+ WafInspectionLevelEnum,
66
+ WafPayloadTypeEnum,
65
67
  } from "./enums";
66
68
  export interface AccessKeyLastUsed {
67
69
  lastUsedDate?: Date | undefined;
@@ -666,6 +668,32 @@ export interface InputOrigin {
666
668
  responseTimeout?: number | undefined;
667
669
  ipAddressType?: OriginIpAddressTypeEnum | undefined;
668
670
  }
671
+ export interface WafResponseInspection {
672
+ successCodes?: number[] | undefined;
673
+ failureCodes?: number[] | undefined;
674
+ }
675
+ export interface WafAcfpConfig {
676
+ payloadType?: WafPayloadTypeEnum | undefined;
677
+ creationPath?: string | undefined;
678
+ registrationPagePath?: string | undefined;
679
+ responseInspection?: WafResponseInspection | undefined;
680
+ }
681
+ export interface WafAtpConfig {
682
+ loginPath?: string | undefined;
683
+ payloadType?: WafPayloadTypeEnum | undefined;
684
+ usernameField?: string | undefined;
685
+ passwordField?: string | undefined;
686
+ responseInspection?: WafResponseInspection | undefined;
687
+ }
688
+ export interface WafBotControlConfig {
689
+ inspectionLevel?: WafInspectionLevelEnum | undefined;
690
+ }
691
+ export interface WafRule {
692
+ name: string | undefined;
693
+ atpConfig?: WafAtpConfig | undefined;
694
+ acfpConfig?: WafAcfpConfig | undefined;
695
+ botControlConfig?: WafBotControlConfig | undefined;
696
+ }
669
697
  export interface CreateDistributionRequest {
670
698
  distributionName: string | undefined;
671
699
  origin: InputOrigin | undefined;
@@ -680,6 +708,8 @@ export interface CreateDistributionRequest {
680
708
  enablePrivateOriginAccess?: boolean | undefined;
681
709
  defaultRootObject?: string | undefined;
682
710
  customErrorResponses?: DistributionCustomErrorResponse[] | undefined;
711
+ enableWaf?: boolean | undefined;
712
+ wafRules?: WafRule[] | undefined;
683
713
  }
684
714
  export interface Origin {
685
715
  name?: string | undefined;
@@ -690,6 +720,10 @@ export interface Origin {
690
720
  ipAddressType?: OriginIpAddressTypeEnum | undefined;
691
721
  isPrivateOriginAccessEnabled?: boolean | undefined;
692
722
  }
723
+ export interface WafConfig {
724
+ isWafEnabled?: boolean | undefined;
725
+ wafRules?: WafRule[] | undefined;
726
+ }
693
727
  export interface LightsailDistribution {
694
728
  name?: string | undefined;
695
729
  arn?: string | undefined;
@@ -714,6 +748,7 @@ export interface LightsailDistribution {
714
748
  viewerMinimumTlsProtocolVersion?: string | undefined;
715
749
  defaultRootObject?: string | undefined;
716
750
  customErrorResponses?: DistributionCustomErrorResponse[] | undefined;
751
+ waf?: WafConfig | undefined;
717
752
  }
718
753
  export interface CreateDistributionResult {
719
754
  distribution?: LightsailDistribution | undefined;
@@ -1579,23 +1614,3 @@ export interface GetInstanceSnapshotsResult {
1579
1614
  instanceSnapshots?: InstanceSnapshot[] | undefined;
1580
1615
  nextPageToken?: string | undefined;
1581
1616
  }
1582
- export interface GetInstanceStateRequest {
1583
- instanceName: string | undefined;
1584
- }
1585
- export interface GetInstanceStateResult {
1586
- state?: InstanceState | undefined;
1587
- }
1588
- export interface GetKeyPairRequest {
1589
- keyPairName: string | undefined;
1590
- }
1591
- export interface GetKeyPairResult {
1592
- keyPair?: KeyPair | undefined;
1593
- }
1594
- export interface GetKeyPairsRequest {
1595
- pageToken?: string | undefined;
1596
- includeDefaultKeyPair?: boolean | undefined;
1597
- }
1598
- export interface GetKeyPairsResult {
1599
- keyPairs?: KeyPair[] | undefined;
1600
- nextPageToken?: string | undefined;
1601
- }
@@ -51,13 +51,36 @@ import {
51
51
  DistributionCustomErrorResponse,
52
52
  DomainEntry,
53
53
  InputOrigin,
54
+ InstanceState,
55
+ KeyPair,
54
56
  MetricDatapoint,
55
57
  Operation,
56
58
  PortInfo,
57
59
  PrivateRegistryAccessRequest,
58
60
  ResourceLocation,
59
61
  Tag,
62
+ WafRule,
60
63
  } from "./models_0";
64
+ export interface GetInstanceStateRequest {
65
+ instanceName: string | undefined;
66
+ }
67
+ export interface GetInstanceStateResult {
68
+ state?: InstanceState | undefined;
69
+ }
70
+ export interface GetKeyPairRequest {
71
+ keyPairName: string | undefined;
72
+ }
73
+ export interface GetKeyPairResult {
74
+ keyPair?: KeyPair | undefined;
75
+ }
76
+ export interface GetKeyPairsRequest {
77
+ pageToken?: string | undefined;
78
+ includeDefaultKeyPair?: boolean | undefined;
79
+ }
80
+ export interface GetKeyPairsResult {
81
+ keyPairs?: KeyPair[] | undefined;
82
+ nextPageToken?: string | undefined;
83
+ }
61
84
  export interface GetLoadBalancerRequest {
62
85
  loadBalancerName: string | undefined;
63
86
  }
@@ -709,6 +732,8 @@ export interface UpdateDistributionRequest {
709
732
  enablePrivateOriginAccess?: boolean | undefined;
710
733
  defaultRootObject?: string | undefined;
711
734
  customErrorResponses?: DistributionCustomErrorResponse[] | undefined;
735
+ enableWaf?: boolean | undefined;
736
+ wafRules?: WafRule[] | undefined;
712
737
  }
713
738
  export interface UpdateDistributionResult {
714
739
  operation?: Operation | undefined;
@@ -457,6 +457,12 @@ export declare var UpdateRelationalDatabaseParametersRequest$: StaticStructureSc
457
457
  export declare var UpdateRelationalDatabaseParametersResult$: StaticStructureSchema;
458
458
  export declare var UpdateRelationalDatabaseRequest$: StaticStructureSchema;
459
459
  export declare var UpdateRelationalDatabaseResult$: StaticStructureSchema;
460
+ export declare var WafAcfpConfig$: StaticStructureSchema;
461
+ export declare var WafAtpConfig$: StaticStructureSchema;
462
+ export declare var WafBotControlConfig$: StaticStructureSchema;
463
+ export declare var WafConfig$: StaticStructureSchema;
464
+ export declare var WafResponseInspection$: StaticStructureSchema;
465
+ export declare var WafRule$: StaticStructureSchema;
460
466
  export declare var AllocateStaticIp$: StaticOperationSchema;
461
467
  export declare var AttachCertificateToDistribution$: StaticOperationSchema;
462
468
  export declare var AttachDisk$: StaticOperationSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-lightsail",
3
- "version": "3.1156.0",
3
+ "version": "3.1157.0",
4
4
  "description": "AWS SDK for JavaScript Lightsail Client for Node.js, Browser and React Native",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lightsail",
6
6
  "license": "Apache-2.0",
@@ -46,12 +46,12 @@
46
46
  "test:index": "tsc -p tsconfig.test.json && node ./test/index-objects.spec.mjs"
47
47
  },
48
48
  "dependencies": {
49
- "@aws-sdk/core": "^3.978.5",
50
- "@aws-sdk/credential-provider-node": "^3.972.88",
49
+ "@aws-sdk/core": "^3.978.6",
50
+ "@aws-sdk/credential-provider-node": "^3.972.89",
51
51
  "@aws-sdk/types": "^3.975.0",
52
- "@smithy/core": "^3.36.1",
52
+ "@smithy/core": "^3.37.0",
53
53
  "@smithy/fetch-http-handler": "^5.8.0",
54
- "@smithy/node-http-handler": "^4.12.1",
54
+ "@smithy/node-http-handler": "^4.13.0",
55
55
  "@smithy/types": "^4.19.0",
56
56
  "tslib": "^2.6.2"
57
57
  },