@aws-sdk/client-route53-recovery-cluster 3.181.0 → 3.183.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,88 +1,87 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { Route53RecoveryClusterServiceException as __BaseException } from "./Route53RecoveryClusterServiceException";
3
- var AccessDeniedException = (function (_super) {
4
- __extends(AccessDeniedException, _super);
5
- function AccessDeniedException(opts) {
6
- var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
7
- _this.name = "AccessDeniedException";
8
- _this.$fault = "client";
9
- Object.setPrototypeOf(_this, AccessDeniedException.prototype);
10
- return _this;
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
11
12
  }
12
- return AccessDeniedException;
13
- }(__BaseException));
14
- export { AccessDeniedException };
15
- var ConflictException = (function (_super) {
16
- __extends(ConflictException, _super);
17
- function ConflictException(opts) {
18
- var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
19
- _this.name = "ConflictException";
20
- _this.$fault = "client";
21
- Object.setPrototypeOf(_this, ConflictException.prototype);
22
- _this.resourceId = opts.resourceId;
23
- _this.resourceType = opts.resourceType;
24
- return _this;
13
+ }
14
+ export class ConflictException extends __BaseException {
15
+ constructor(opts) {
16
+ super({
17
+ name: "ConflictException",
18
+ $fault: "client",
19
+ ...opts,
20
+ });
21
+ this.name = "ConflictException";
22
+ this.$fault = "client";
23
+ Object.setPrototypeOf(this, ConflictException.prototype);
24
+ this.resourceId = opts.resourceId;
25
+ this.resourceType = opts.resourceType;
25
26
  }
26
- return ConflictException;
27
- }(__BaseException));
28
- export { ConflictException };
29
- var EndpointTemporarilyUnavailableException = (function (_super) {
30
- __extends(EndpointTemporarilyUnavailableException, _super);
31
- function EndpointTemporarilyUnavailableException(opts) {
32
- var _this = _super.call(this, __assign({ name: "EndpointTemporarilyUnavailableException", $fault: "server" }, opts)) || this;
33
- _this.name = "EndpointTemporarilyUnavailableException";
34
- _this.$fault = "server";
35
- Object.setPrototypeOf(_this, EndpointTemporarilyUnavailableException.prototype);
36
- return _this;
27
+ }
28
+ export class EndpointTemporarilyUnavailableException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "EndpointTemporarilyUnavailableException",
32
+ $fault: "server",
33
+ ...opts,
34
+ });
35
+ this.name = "EndpointTemporarilyUnavailableException";
36
+ this.$fault = "server";
37
+ Object.setPrototypeOf(this, EndpointTemporarilyUnavailableException.prototype);
37
38
  }
38
- return EndpointTemporarilyUnavailableException;
39
- }(__BaseException));
40
- export { EndpointTemporarilyUnavailableException };
39
+ }
41
40
  export var RoutingControlState;
42
41
  (function (RoutingControlState) {
43
42
  RoutingControlState["Off"] = "Off";
44
43
  RoutingControlState["On"] = "On";
45
44
  })(RoutingControlState || (RoutingControlState = {}));
46
- var InternalServerException = (function (_super) {
47
- __extends(InternalServerException, _super);
48
- function InternalServerException(opts) {
49
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
50
- _this.name = "InternalServerException";
51
- _this.$fault = "server";
52
- Object.setPrototypeOf(_this, InternalServerException.prototype);
53
- _this.retryAfterSeconds = opts.retryAfterSeconds;
54
- return _this;
45
+ export class InternalServerException extends __BaseException {
46
+ constructor(opts) {
47
+ super({
48
+ name: "InternalServerException",
49
+ $fault: "server",
50
+ ...opts,
51
+ });
52
+ this.name = "InternalServerException";
53
+ this.$fault = "server";
54
+ Object.setPrototypeOf(this, InternalServerException.prototype);
55
+ this.retryAfterSeconds = opts.retryAfterSeconds;
55
56
  }
56
- return InternalServerException;
57
- }(__BaseException));
58
- export { InternalServerException };
59
- var ResourceNotFoundException = (function (_super) {
60
- __extends(ResourceNotFoundException, _super);
61
- function ResourceNotFoundException(opts) {
62
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
63
- _this.name = "ResourceNotFoundException";
64
- _this.$fault = "client";
65
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
66
- _this.resourceId = opts.resourceId;
67
- _this.resourceType = opts.resourceType;
68
- return _this;
57
+ }
58
+ export class ResourceNotFoundException extends __BaseException {
59
+ constructor(opts) {
60
+ super({
61
+ name: "ResourceNotFoundException",
62
+ $fault: "client",
63
+ ...opts,
64
+ });
65
+ this.name = "ResourceNotFoundException";
66
+ this.$fault = "client";
67
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
68
+ this.resourceId = opts.resourceId;
69
+ this.resourceType = opts.resourceType;
69
70
  }
70
- return ResourceNotFoundException;
71
- }(__BaseException));
72
- export { ResourceNotFoundException };
73
- var ThrottlingException = (function (_super) {
74
- __extends(ThrottlingException, _super);
75
- function ThrottlingException(opts) {
76
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
77
- _this.name = "ThrottlingException";
78
- _this.$fault = "client";
79
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
80
- _this.retryAfterSeconds = opts.retryAfterSeconds;
81
- return _this;
71
+ }
72
+ export class ThrottlingException extends __BaseException {
73
+ constructor(opts) {
74
+ super({
75
+ name: "ThrottlingException",
76
+ $fault: "client",
77
+ ...opts,
78
+ });
79
+ this.name = "ThrottlingException";
80
+ this.$fault = "client";
81
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
82
+ this.retryAfterSeconds = opts.retryAfterSeconds;
82
83
  }
83
- return ThrottlingException;
84
- }(__BaseException));
85
- export { ThrottlingException };
84
+ }
86
85
  export var ValidationExceptionReason;
87
86
  (function (ValidationExceptionReason) {
88
87
  ValidationExceptionReason["CANNOT_PARSE"] = "cannotParse";
@@ -90,44 +89,66 @@ export var ValidationExceptionReason;
90
89
  ValidationExceptionReason["OTHER"] = "other";
91
90
  ValidationExceptionReason["UNKNOWN_OPERATION"] = "unknownOperation";
92
91
  })(ValidationExceptionReason || (ValidationExceptionReason = {}));
93
- var ValidationException = (function (_super) {
94
- __extends(ValidationException, _super);
95
- function ValidationException(opts) {
96
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
97
- _this.name = "ValidationException";
98
- _this.$fault = "client";
99
- Object.setPrototypeOf(_this, ValidationException.prototype);
100
- _this.reason = opts.reason;
101
- _this.fields = opts.fields;
102
- return _this;
92
+ export class ValidationException extends __BaseException {
93
+ constructor(opts) {
94
+ super({
95
+ name: "ValidationException",
96
+ $fault: "client",
97
+ ...opts,
98
+ });
99
+ this.name = "ValidationException";
100
+ this.$fault = "client";
101
+ Object.setPrototypeOf(this, ValidationException.prototype);
102
+ this.reason = opts.reason;
103
+ this.fields = opts.fields;
103
104
  }
104
- return ValidationException;
105
- }(__BaseException));
106
- export { ValidationException };
107
- var ServiceLimitExceededException = (function (_super) {
108
- __extends(ServiceLimitExceededException, _super);
109
- function ServiceLimitExceededException(opts) {
110
- var _this = _super.call(this, __assign({ name: "ServiceLimitExceededException", $fault: "client" }, opts)) || this;
111
- _this.name = "ServiceLimitExceededException";
112
- _this.$fault = "client";
113
- Object.setPrototypeOf(_this, ServiceLimitExceededException.prototype);
114
- _this.resourceId = opts.resourceId;
115
- _this.resourceType = opts.resourceType;
116
- _this.limitCode = opts.limitCode;
117
- _this.serviceCode = opts.serviceCode;
118
- return _this;
105
+ }
106
+ export class ServiceLimitExceededException extends __BaseException {
107
+ constructor(opts) {
108
+ super({
109
+ name: "ServiceLimitExceededException",
110
+ $fault: "client",
111
+ ...opts,
112
+ });
113
+ this.name = "ServiceLimitExceededException";
114
+ this.$fault = "client";
115
+ Object.setPrototypeOf(this, ServiceLimitExceededException.prototype);
116
+ this.resourceId = opts.resourceId;
117
+ this.resourceType = opts.resourceType;
118
+ this.limitCode = opts.limitCode;
119
+ this.serviceCode = opts.serviceCode;
119
120
  }
120
- return ServiceLimitExceededException;
121
- }(__BaseException));
122
- export { ServiceLimitExceededException };
123
- export var GetRoutingControlStateRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
- export var GetRoutingControlStateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
- export var ValidationExceptionFieldFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- export var ListRoutingControlsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- export var RoutingControlFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
- export var ListRoutingControlsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
- export var UpdateRoutingControlStateRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
- export var UpdateRoutingControlStateResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- export var UpdateRoutingControlStateEntryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
- export var UpdateRoutingControlStatesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var UpdateRoutingControlStatesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
121
+ }
122
+ export const GetRoutingControlStateRequestFilterSensitiveLog = (obj) => ({
123
+ ...obj,
124
+ });
125
+ export const GetRoutingControlStateResponseFilterSensitiveLog = (obj) => ({
126
+ ...obj,
127
+ });
128
+ export const ValidationExceptionFieldFilterSensitiveLog = (obj) => ({
129
+ ...obj,
130
+ });
131
+ export const ListRoutingControlsRequestFilterSensitiveLog = (obj) => ({
132
+ ...obj,
133
+ });
134
+ export const RoutingControlFilterSensitiveLog = (obj) => ({
135
+ ...obj,
136
+ });
137
+ export const ListRoutingControlsResponseFilterSensitiveLog = (obj) => ({
138
+ ...obj,
139
+ });
140
+ export const UpdateRoutingControlStateRequestFilterSensitiveLog = (obj) => ({
141
+ ...obj,
142
+ });
143
+ export const UpdateRoutingControlStateResponseFilterSensitiveLog = (obj) => ({
144
+ ...obj,
145
+ });
146
+ export const UpdateRoutingControlStateEntryFilterSensitiveLog = (obj) => ({
147
+ ...obj,
148
+ });
149
+ export const UpdateRoutingControlStatesRequestFilterSensitiveLog = (obj) => ({
150
+ ...obj,
151
+ });
152
+ export const UpdateRoutingControlStatesResponseFilterSensitiveLog = (obj) => ({
153
+ ...obj,
154
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListRoutingControlsCommand, } from "../commands/ListRoutingControlsCommand";
3
2
  import { Route53RecoveryCluster } from "../Route53RecoveryCluster";
4
3
  import { Route53RecoveryClusterClient } from "../Route53RecoveryClusterClient";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListRoutingControlsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListRoutingControlsCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listRoutingControls.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listRoutingControls(input, ...args);
32
9
  };
33
- export function paginateListRoutingControls(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListRoutingControls(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.NextToken = token;
16
+ input["MaxResults"] = config.pageSize;
17
+ if (config.client instanceof Route53RecoveryCluster) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof Route53RecoveryClusterClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected Route53RecoveryCluster | Route53RecoveryClusterClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListRoutingControls_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.NextToken = token;
49
- input["MaxResults"] = config.pageSize;
50
- if (!(config.client instanceof Route53RecoveryCluster)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof Route53RecoveryClusterClient)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected Route53RecoveryCluster | Route53RecoveryClusterClient");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.NextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }