@aws-sdk/client-rbin 3.186.0 → 3.188.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,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { UntagResourceRequestFilterSensitiveLog, UntagResourceResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1UntagResourceCommand, serializeAws_restJson1UntagResourceCommand, } from "../protocols/Aws_restJson1";
6
- var UntagResourceCommand = (function (_super) {
7
- __extends(UntagResourceCommand, _super);
8
- function UntagResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class UntagResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- UntagResourceCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RbinClient";
18
- var commandName = "UntagResourceCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RbinClient";
15
+ const commandName = "UntagResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: UntagResourceRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: UntagResourceResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- UntagResourceCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1UntagResourceCommand(input, context);
33
- };
34
- UntagResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1UntagResourceCommand(output, context);
36
- };
37
- return UntagResourceCommand;
38
- }($Command));
39
- export { UntagResourceCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { UpdateRuleRequestFilterSensitiveLog, UpdateRuleResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1UpdateRuleCommand, serializeAws_restJson1UpdateRuleCommand, } from "../protocols/Aws_restJson1";
6
- var UpdateRuleCommand = (function (_super) {
7
- __extends(UpdateRuleCommand, _super);
8
- function UpdateRuleCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class UpdateRuleCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- UpdateRuleCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RbinClient";
18
- var commandName = "UpdateRuleCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RbinClient";
15
+ const commandName = "UpdateRuleCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: UpdateRuleRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: UpdateRuleResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- UpdateRuleCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1UpdateRuleCommand(input, context);
33
- };
34
- UpdateRuleCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1UpdateRuleCommand(output, context);
36
- };
37
- return UpdateRuleCommand;
38
- }($Command));
39
- export { UpdateRuleCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "ca-central-1": {
5
4
  variants: [
6
5
  {
@@ -58,7 +57,7 @@ var regionHash = {
58
57
  ],
59
58
  },
60
59
  };
61
- var partitionHash = {
60
+ const partitionHash = {
62
61
  aws: {
63
62
  regions: [
64
63
  "af-south-1",
@@ -183,8 +182,9 @@ var partitionHash = {
183
182
  ],
184
183
  },
185
184
  };
186
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
187
- return __generator(this, function (_a) {
188
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "rbin", regionHash: regionHash, partitionHash: partitionHash }))];
189
- });
190
- }); };
185
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
186
+ ...options,
187
+ signingService: "rbin",
188
+ regionHash,
189
+ partitionHash,
190
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var RbinServiceException = (function (_super) {
4
- __extends(RbinServiceException, _super);
5
- function RbinServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, RbinServiceException.prototype);
8
- return _this;
2
+ export class RbinServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, RbinServiceException.prototype);
9
6
  }
10
- return RbinServiceException;
11
- }(__ServiceException));
12
- export { RbinServiceException };
7
+ }
@@ -1,4 +1,3 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { RbinServiceException as __BaseException } from "./RbinServiceException";
3
2
  export var ResourceType;
4
3
  (function (ResourceType) {
@@ -14,91 +13,131 @@ export var RuleStatus;
14
13
  RuleStatus["AVAILABLE"] = "available";
15
14
  RuleStatus["PENDING"] = "pending";
16
15
  })(RuleStatus || (RuleStatus = {}));
17
- var InternalServerException = (function (_super) {
18
- __extends(InternalServerException, _super);
19
- function InternalServerException(opts) {
20
- var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
21
- _this.name = "InternalServerException";
22
- _this.$fault = "server";
23
- Object.setPrototypeOf(_this, InternalServerException.prototype);
24
- _this.Message = opts.Message;
25
- return _this;
16
+ export class InternalServerException extends __BaseException {
17
+ constructor(opts) {
18
+ super({
19
+ name: "InternalServerException",
20
+ $fault: "server",
21
+ ...opts,
22
+ });
23
+ this.name = "InternalServerException";
24
+ this.$fault = "server";
25
+ Object.setPrototypeOf(this, InternalServerException.prototype);
26
+ this.Message = opts.Message;
26
27
  }
27
- return InternalServerException;
28
- }(__BaseException));
29
- export { InternalServerException };
28
+ }
30
29
  export var ServiceQuotaExceededExceptionReason;
31
30
  (function (ServiceQuotaExceededExceptionReason) {
32
31
  ServiceQuotaExceededExceptionReason["SERVICE_QUOTA_EXCEEDED"] = "SERVICE_QUOTA_EXCEEDED";
33
32
  })(ServiceQuotaExceededExceptionReason || (ServiceQuotaExceededExceptionReason = {}));
34
- var ServiceQuotaExceededException = (function (_super) {
35
- __extends(ServiceQuotaExceededException, _super);
36
- function ServiceQuotaExceededException(opts) {
37
- var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
38
- _this.name = "ServiceQuotaExceededException";
39
- _this.$fault = "client";
40
- Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
41
- _this.Message = opts.Message;
42
- _this.Reason = opts.Reason;
43
- return _this;
33
+ export class ServiceQuotaExceededException extends __BaseException {
34
+ constructor(opts) {
35
+ super({
36
+ name: "ServiceQuotaExceededException",
37
+ $fault: "client",
38
+ ...opts,
39
+ });
40
+ this.name = "ServiceQuotaExceededException";
41
+ this.$fault = "client";
42
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
43
+ this.Message = opts.Message;
44
+ this.Reason = opts.Reason;
44
45
  }
45
- return ServiceQuotaExceededException;
46
- }(__BaseException));
47
- export { ServiceQuotaExceededException };
46
+ }
48
47
  export var ValidationExceptionReason;
49
48
  (function (ValidationExceptionReason) {
50
49
  ValidationExceptionReason["INVALID_PAGE_TOKEN"] = "INVALID_PAGE_TOKEN";
51
50
  ValidationExceptionReason["INVALID_PARAMETER_VALUE"] = "INVALID_PARAMETER_VALUE";
52
51
  })(ValidationExceptionReason || (ValidationExceptionReason = {}));
53
- var ValidationException = (function (_super) {
54
- __extends(ValidationException, _super);
55
- function ValidationException(opts) {
56
- var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
57
- _this.name = "ValidationException";
58
- _this.$fault = "client";
59
- Object.setPrototypeOf(_this, ValidationException.prototype);
60
- _this.Message = opts.Message;
61
- _this.Reason = opts.Reason;
62
- return _this;
52
+ export class ValidationException extends __BaseException {
53
+ constructor(opts) {
54
+ super({
55
+ name: "ValidationException",
56
+ $fault: "client",
57
+ ...opts,
58
+ });
59
+ this.name = "ValidationException";
60
+ this.$fault = "client";
61
+ Object.setPrototypeOf(this, ValidationException.prototype);
62
+ this.Message = opts.Message;
63
+ this.Reason = opts.Reason;
63
64
  }
64
- return ValidationException;
65
- }(__BaseException));
66
- export { ValidationException };
65
+ }
67
66
  export var ResourceNotFoundExceptionReason;
68
67
  (function (ResourceNotFoundExceptionReason) {
69
68
  ResourceNotFoundExceptionReason["RULE_NOT_FOUND"] = "RULE_NOT_FOUND";
70
69
  })(ResourceNotFoundExceptionReason || (ResourceNotFoundExceptionReason = {}));
71
- var ResourceNotFoundException = (function (_super) {
72
- __extends(ResourceNotFoundException, _super);
73
- function ResourceNotFoundException(opts) {
74
- var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
75
- _this.name = "ResourceNotFoundException";
76
- _this.$fault = "client";
77
- Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
78
- _this.Message = opts.Message;
79
- _this.Reason = opts.Reason;
80
- return _this;
70
+ export class ResourceNotFoundException extends __BaseException {
71
+ constructor(opts) {
72
+ super({
73
+ name: "ResourceNotFoundException",
74
+ $fault: "client",
75
+ ...opts,
76
+ });
77
+ this.name = "ResourceNotFoundException";
78
+ this.$fault = "client";
79
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
80
+ this.Message = opts.Message;
81
+ this.Reason = opts.Reason;
81
82
  }
82
- return ResourceNotFoundException;
83
- }(__BaseException));
84
- export { ResourceNotFoundException };
85
- export var ResourceTagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
86
- export var RetentionPeriodFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
87
- export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
88
- export var CreateRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
89
- export var CreateRuleResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
90
- export var DeleteRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
91
- export var DeleteRuleResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
92
- export var GetRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
93
- export var GetRuleResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
94
- export var ListRulesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
95
- export var RuleSummaryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
96
- export var ListRulesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
97
- export var ListTagsForResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
98
- export var ListTagsForResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
99
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
100
- export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
101
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
- export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
103
- export var UpdateRuleRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
104
- export var UpdateRuleResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
83
+ }
84
+ export const ResourceTagFilterSensitiveLog = (obj) => ({
85
+ ...obj,
86
+ });
87
+ export const RetentionPeriodFilterSensitiveLog = (obj) => ({
88
+ ...obj,
89
+ });
90
+ export const TagFilterSensitiveLog = (obj) => ({
91
+ ...obj,
92
+ });
93
+ export const CreateRuleRequestFilterSensitiveLog = (obj) => ({
94
+ ...obj,
95
+ });
96
+ export const CreateRuleResponseFilterSensitiveLog = (obj) => ({
97
+ ...obj,
98
+ });
99
+ export const DeleteRuleRequestFilterSensitiveLog = (obj) => ({
100
+ ...obj,
101
+ });
102
+ export const DeleteRuleResponseFilterSensitiveLog = (obj) => ({
103
+ ...obj,
104
+ });
105
+ export const GetRuleRequestFilterSensitiveLog = (obj) => ({
106
+ ...obj,
107
+ });
108
+ export const GetRuleResponseFilterSensitiveLog = (obj) => ({
109
+ ...obj,
110
+ });
111
+ export const ListRulesRequestFilterSensitiveLog = (obj) => ({
112
+ ...obj,
113
+ });
114
+ export const RuleSummaryFilterSensitiveLog = (obj) => ({
115
+ ...obj,
116
+ });
117
+ export const ListRulesResponseFilterSensitiveLog = (obj) => ({
118
+ ...obj,
119
+ });
120
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
121
+ ...obj,
122
+ });
123
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
124
+ ...obj,
125
+ });
126
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
127
+ ...obj,
128
+ });
129
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
130
+ ...obj,
131
+ });
132
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
133
+ ...obj,
134
+ });
135
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
136
+ ...obj,
137
+ });
138
+ export const UpdateRuleRequestFilterSensitiveLog = (obj) => ({
139
+ ...obj,
140
+ });
141
+ export const UpdateRuleResponseFilterSensitiveLog = (obj) => ({
142
+ ...obj,
143
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListRulesCommand } from "../commands/ListRulesCommand";
3
2
  import { Rbin } from "../Rbin";
4
3
  import { RbinClient } from "../RbinClient";
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 ListRulesCommand(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 ListRulesCommand(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.listRules.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.listRules(input, ...args);
32
9
  };
33
- export function paginateListRules(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListRules(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 Rbin) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof RbinClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected Rbin | RbinClient");
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 paginateListRules_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 Rbin)) 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 RbinClient)) 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 Rbin | RbinClient");
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
  }