@aws-sdk/client-ram 3.47.0 → 3.49.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist-cjs/RAM.js +15 -0
  3. package/dist-cjs/commands/ListPermissionVersionsCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +14 -2
  6. package/dist-cjs/pagination/ListPermissionVersionsPaginator.js +35 -0
  7. package/dist-cjs/pagination/index.js +1 -0
  8. package/dist-cjs/protocols/Aws_restJson1.js +124 -1
  9. package/dist-es/RAM.js +15 -0
  10. package/dist-es/commands/ListPermissionVersionsCommand.js +39 -0
  11. package/dist-es/commands/index.js +1 -0
  12. package/dist-es/models/models_0.js +8 -0
  13. package/dist-es/pagination/ListPermissionVersionsPaginator.js +74 -0
  14. package/dist-es/pagination/index.js +1 -0
  15. package/dist-es/protocols/Aws_restJson1.js +138 -0
  16. package/dist-types/RAM.d.ts +7 -0
  17. package/dist-types/RAMClient.d.ts +3 -2
  18. package/dist-types/commands/ListPermissionVersionsCommand.d.ts +35 -0
  19. package/dist-types/commands/index.d.ts +1 -0
  20. package/dist-types/models/models_0.d.ts +57 -1
  21. package/dist-types/pagination/ListPermissionVersionsPaginator.d.ts +4 -0
  22. package/dist-types/pagination/index.d.ts +1 -0
  23. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  24. package/dist-types/ts3.4/RAM.d.ts +5 -0
  25. package/dist-types/ts3.4/RAMClient.d.ts +3 -2
  26. package/dist-types/ts3.4/commands/ListPermissionVersionsCommand.d.ts +17 -0
  27. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  28. package/dist-types/ts3.4/models/models_0.d.ts +22 -0
  29. package/dist-types/ts3.4/pagination/ListPermissionVersionsPaginator.d.ts +4 -0
  30. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  31. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  32. package/package.json +40 -34
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.49.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.48.0...v3.49.0) (2022-01-29)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-ram
9
+
10
+
11
+
12
+
13
+
14
+ # [3.48.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.2...v3.48.0) (2022-01-22)
15
+
16
+
17
+ ### Features
18
+
19
+ * **clients:** update clients as of 2022/01/21 ([#3228](https://github.com/aws/aws-sdk-js-v3/issues/3228)) ([fa713ef](https://github.com/aws/aws-sdk-js-v3/commit/fa713efca6b2f424c27535d000359f08830960b1))
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.47.2](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.1...v3.47.2) (2022-01-21)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-ram
28
+
29
+
30
+
31
+
32
+
33
+ ## [3.47.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.47.0-release-test-1...v3.47.1) (2022-01-20)
34
+
35
+ **Note:** Version bump only for package @aws-sdk/client-ram
36
+
37
+
38
+
39
+
40
+
6
41
  # [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
7
42
 
8
43
 
package/dist-cjs/RAM.js CHANGED
@@ -16,6 +16,7 @@ const GetResourceShareInvitationsCommand_1 = require("./commands/GetResourceShar
16
16
  const GetResourceSharesCommand_1 = require("./commands/GetResourceSharesCommand");
17
17
  const ListPendingInvitationResourcesCommand_1 = require("./commands/ListPendingInvitationResourcesCommand");
18
18
  const ListPermissionsCommand_1 = require("./commands/ListPermissionsCommand");
19
+ const ListPermissionVersionsCommand_1 = require("./commands/ListPermissionVersionsCommand");
19
20
  const ListPrincipalsCommand_1 = require("./commands/ListPrincipalsCommand");
20
21
  const ListResourcesCommand_1 = require("./commands/ListResourcesCommand");
21
22
  const ListResourceSharePermissionsCommand_1 = require("./commands/ListResourceSharePermissionsCommand");
@@ -237,6 +238,20 @@ class RAM extends RAMClient_1.RAMClient {
237
238
  return this.send(command, optionsOrCb);
238
239
  }
239
240
  }
241
+ listPermissionVersions(args, optionsOrCb, cb) {
242
+ const command = new ListPermissionVersionsCommand_1.ListPermissionVersionsCommand(args);
243
+ if (typeof optionsOrCb === "function") {
244
+ this.send(command, optionsOrCb);
245
+ }
246
+ else if (typeof cb === "function") {
247
+ if (typeof optionsOrCb !== "object")
248
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
249
+ this.send(command, optionsOrCb || {}, cb);
250
+ }
251
+ else {
252
+ return this.send(command, optionsOrCb);
253
+ }
254
+ }
240
255
  listPrincipals(args, optionsOrCb, cb) {
241
256
  const command = new ListPrincipalsCommand_1.ListPrincipalsCommand(args);
242
257
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListPermissionVersionsCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class ListPermissionVersionsCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "RAMClient";
18
+ const commandName = "ListPermissionVersionsCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.ListPermissionVersionsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListPermissionVersionsResponse.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return Aws_restJson1_1.serializeAws_restJson1ListPermissionVersionsCommand(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return Aws_restJson1_1.deserializeAws_restJson1ListPermissionVersionsCommand(output, context);
34
+ }
35
+ }
36
+ exports.ListPermissionVersionsCommand = ListPermissionVersionsCommand;
@@ -15,6 +15,7 @@ tslib_1.__exportStar(require("./GetResourceShareAssociationsCommand"), exports);
15
15
  tslib_1.__exportStar(require("./GetResourceShareInvitationsCommand"), exports);
16
16
  tslib_1.__exportStar(require("./GetResourceSharesCommand"), exports);
17
17
  tslib_1.__exportStar(require("./ListPendingInvitationResourcesCommand"), exports);
18
+ tslib_1.__exportStar(require("./ListPermissionVersionsCommand"), exports);
18
19
  tslib_1.__exportStar(require("./ListPermissionsCommand"), exports);
19
20
  tslib_1.__exportStar(require("./ListPrincipalsCommand"), exports);
20
21
  tslib_1.__exportStar(require("./ListResourceSharePermissionsCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceNameAndResourceType = exports.ListResourceTypesRequest = exports.ListResourceSharePermissionsResponse = exports.ListResourceSharePermissionsRequest = exports.ListResourcesResponse = exports.ListResourcesRequest = exports.ListPrincipalsResponse = exports.Principal = exports.ListPrincipalsRequest = exports.ListPermissionsResponse = exports.ResourceSharePermissionSummary = exports.ListPermissionsRequest = exports.ListPendingInvitationResourcesResponse = exports.Resource = exports.ResourceRegionScope = exports.ListPendingInvitationResourcesRequest = exports.ResourceRegionScopeFilter = exports.GetResourceSharesResponse = exports.GetResourceSharesRequest = exports.TagFilter = exports.ResourceOwner = exports.GetResourceShareInvitationsResponse = exports.GetResourceShareInvitationsRequest = exports.GetResourceShareAssociationsResponse = exports.GetResourceShareAssociationsRequest = exports.GetResourcePoliciesResponse = exports.GetResourcePoliciesRequest = exports.GetPermissionResponse = exports.ResourceSharePermissionDetail = exports.GetPermissionRequest = exports.EnableSharingWithAwsOrganizationResponse = exports.EnableSharingWithAwsOrganizationRequest = exports.DisassociateResourceSharePermissionResponse = exports.DisassociateResourceSharePermissionRequest = exports.DisassociateResourceShareResponse = exports.DisassociateResourceShareRequest = exports.DeleteResourceShareResponse = exports.DeleteResourceShareRequest = exports.CreateResourceShareResponse = exports.ResourceShare = exports.CreateResourceShareRequest = exports.Tag = exports.AssociateResourceSharePermissionResponse = exports.AssociateResourceSharePermissionRequest = exports.AssociateResourceShareResponse = exports.AssociateResourceShareRequest = exports.AcceptResourceShareInvitationResponse = exports.ResourceShareInvitation = exports.ResourceShareAssociation = exports.AcceptResourceShareInvitationRequest = void 0;
4
- exports.UpdateResourceShareResponse = exports.UpdateResourceShareRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.RejectResourceShareInvitationResponse = exports.RejectResourceShareInvitationRequest = exports.PromoteResourceShareCreatedFromPolicyResponse = exports.PromoteResourceShareCreatedFromPolicyRequest = exports.ListResourceTypesResponse = void 0;
3
+ exports.ListResourceSharePermissionsResponse = exports.ListResourceSharePermissionsRequest = exports.ListResourcesResponse = exports.ListResourcesRequest = exports.ListPrincipalsResponse = exports.Principal = exports.ListPrincipalsRequest = exports.ListPermissionVersionsResponse = exports.ListPermissionVersionsRequest = exports.ListPermissionsResponse = exports.ResourceSharePermissionSummary = exports.ListPermissionsRequest = exports.ListPendingInvitationResourcesResponse = exports.Resource = exports.ResourceRegionScope = exports.ListPendingInvitationResourcesRequest = exports.ResourceRegionScopeFilter = exports.GetResourceSharesResponse = exports.GetResourceSharesRequest = exports.TagFilter = exports.ResourceOwner = exports.GetResourceShareInvitationsResponse = exports.GetResourceShareInvitationsRequest = exports.GetResourceShareAssociationsResponse = exports.GetResourceShareAssociationsRequest = exports.GetResourcePoliciesResponse = exports.GetResourcePoliciesRequest = exports.GetPermissionResponse = exports.ResourceSharePermissionDetail = exports.GetPermissionRequest = exports.EnableSharingWithAwsOrganizationResponse = exports.EnableSharingWithAwsOrganizationRequest = exports.DisassociateResourceSharePermissionResponse = exports.DisassociateResourceSharePermissionRequest = exports.DisassociateResourceShareResponse = exports.DisassociateResourceShareRequest = exports.DeleteResourceShareResponse = exports.DeleteResourceShareRequest = exports.CreateResourceShareResponse = exports.ResourceShare = exports.CreateResourceShareRequest = exports.Tag = exports.AssociateResourceSharePermissionResponse = exports.AssociateResourceSharePermissionRequest = exports.AssociateResourceShareResponse = exports.AssociateResourceShareRequest = exports.AcceptResourceShareInvitationResponse = exports.ResourceShareInvitation = exports.ResourceShareAssociation = exports.AcceptResourceShareInvitationRequest = void 0;
4
+ exports.UpdateResourceShareResponse = exports.UpdateResourceShareRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.RejectResourceShareInvitationResponse = exports.RejectResourceShareInvitationRequest = exports.PromoteResourceShareCreatedFromPolicyResponse = exports.PromoteResourceShareCreatedFromPolicyRequest = exports.ListResourceTypesResponse = exports.ServiceNameAndResourceType = exports.ListResourceTypesRequest = void 0;
5
5
  var AcceptResourceShareInvitationRequest;
6
6
  (function (AcceptResourceShareInvitationRequest) {
7
7
  AcceptResourceShareInvitationRequest.filterSensitiveLog = (obj) => ({
@@ -246,6 +246,18 @@ var ListPermissionsResponse;
246
246
  ...obj,
247
247
  });
248
248
  })(ListPermissionsResponse = exports.ListPermissionsResponse || (exports.ListPermissionsResponse = {}));
249
+ var ListPermissionVersionsRequest;
250
+ (function (ListPermissionVersionsRequest) {
251
+ ListPermissionVersionsRequest.filterSensitiveLog = (obj) => ({
252
+ ...obj,
253
+ });
254
+ })(ListPermissionVersionsRequest = exports.ListPermissionVersionsRequest || (exports.ListPermissionVersionsRequest = {}));
255
+ var ListPermissionVersionsResponse;
256
+ (function (ListPermissionVersionsResponse) {
257
+ ListPermissionVersionsResponse.filterSensitiveLog = (obj) => ({
258
+ ...obj,
259
+ });
260
+ })(ListPermissionVersionsResponse = exports.ListPermissionVersionsResponse || (exports.ListPermissionVersionsResponse = {}));
249
261
  var ListPrincipalsRequest;
250
262
  (function (ListPrincipalsRequest) {
251
263
  ListPrincipalsRequest.filterSensitiveLog = (obj) => ({
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListPermissionVersions = void 0;
4
+ const ListPermissionVersionsCommand_1 = require("../commands/ListPermissionVersionsCommand");
5
+ const RAM_1 = require("../RAM");
6
+ const RAMClient_1 = require("../RAMClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListPermissionVersionsCommand_1.ListPermissionVersionsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listPermissionVersions(input, ...args);
12
+ };
13
+ async function* paginateListPermissionVersions(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.nextToken = token;
19
+ input["maxResults"] = config.pageSize;
20
+ if (config.client instanceof RAM_1.RAM) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof RAMClient_1.RAMClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected RAM | RAMClient");
28
+ }
29
+ yield page;
30
+ token = page.nextToken;
31
+ hasNext = !!token;
32
+ }
33
+ return undefined;
34
+ }
35
+ exports.paginateListPermissionVersions = paginateListPermissionVersions;
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./GetResourceShareInvitationsPaginator"), exports)
7
7
  tslib_1.__exportStar(require("./GetResourceSharesPaginator"), exports);
8
8
  tslib_1.__exportStar(require("./Interfaces"), exports);
9
9
  tslib_1.__exportStar(require("./ListPendingInvitationResourcesPaginator"), exports);
10
+ tslib_1.__exportStar(require("./ListPermissionVersionsPaginator"), exports);
10
11
  tslib_1.__exportStar(require("./ListPermissionsPaginator"), exports);
11
12
  tslib_1.__exportStar(require("./ListPrincipalsPaginator"), exports);
12
13
  tslib_1.__exportStar(require("./ListResourceSharePermissionsPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateResourceShareCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RejectResourceShareInvitationCommand = exports.deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommand = exports.deserializeAws_restJson1ListResourceTypesCommand = exports.deserializeAws_restJson1ListResourceSharePermissionsCommand = exports.deserializeAws_restJson1ListResourcesCommand = exports.deserializeAws_restJson1ListPrincipalsCommand = exports.deserializeAws_restJson1ListPermissionsCommand = exports.deserializeAws_restJson1ListPendingInvitationResourcesCommand = exports.deserializeAws_restJson1GetResourceSharesCommand = exports.deserializeAws_restJson1GetResourceShareInvitationsCommand = exports.deserializeAws_restJson1GetResourceShareAssociationsCommand = exports.deserializeAws_restJson1GetResourcePoliciesCommand = exports.deserializeAws_restJson1GetPermissionCommand = exports.deserializeAws_restJson1EnableSharingWithAwsOrganizationCommand = exports.deserializeAws_restJson1DisassociateResourceSharePermissionCommand = exports.deserializeAws_restJson1DisassociateResourceShareCommand = exports.deserializeAws_restJson1DeleteResourceShareCommand = exports.deserializeAws_restJson1CreateResourceShareCommand = exports.deserializeAws_restJson1AssociateResourceSharePermissionCommand = exports.deserializeAws_restJson1AssociateResourceShareCommand = exports.deserializeAws_restJson1AcceptResourceShareInvitationCommand = exports.serializeAws_restJson1UpdateResourceShareCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1RejectResourceShareInvitationCommand = exports.serializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommand = exports.serializeAws_restJson1ListResourceTypesCommand = exports.serializeAws_restJson1ListResourceSharePermissionsCommand = exports.serializeAws_restJson1ListResourcesCommand = exports.serializeAws_restJson1ListPrincipalsCommand = exports.serializeAws_restJson1ListPermissionsCommand = exports.serializeAws_restJson1ListPendingInvitationResourcesCommand = exports.serializeAws_restJson1GetResourceSharesCommand = exports.serializeAws_restJson1GetResourceShareInvitationsCommand = exports.serializeAws_restJson1GetResourceShareAssociationsCommand = exports.serializeAws_restJson1GetResourcePoliciesCommand = exports.serializeAws_restJson1GetPermissionCommand = exports.serializeAws_restJson1EnableSharingWithAwsOrganizationCommand = exports.serializeAws_restJson1DisassociateResourceSharePermissionCommand = exports.serializeAws_restJson1DisassociateResourceShareCommand = exports.serializeAws_restJson1DeleteResourceShareCommand = exports.serializeAws_restJson1CreateResourceShareCommand = exports.serializeAws_restJson1AssociateResourceSharePermissionCommand = exports.serializeAws_restJson1AssociateResourceShareCommand = exports.serializeAws_restJson1AcceptResourceShareInvitationCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateResourceShareCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RejectResourceShareInvitationCommand = exports.deserializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommand = exports.deserializeAws_restJson1ListResourceTypesCommand = exports.deserializeAws_restJson1ListResourceSharePermissionsCommand = exports.deserializeAws_restJson1ListResourcesCommand = exports.deserializeAws_restJson1ListPrincipalsCommand = exports.deserializeAws_restJson1ListPermissionVersionsCommand = exports.deserializeAws_restJson1ListPermissionsCommand = exports.deserializeAws_restJson1ListPendingInvitationResourcesCommand = exports.deserializeAws_restJson1GetResourceSharesCommand = exports.deserializeAws_restJson1GetResourceShareInvitationsCommand = exports.deserializeAws_restJson1GetResourceShareAssociationsCommand = exports.deserializeAws_restJson1GetResourcePoliciesCommand = exports.deserializeAws_restJson1GetPermissionCommand = exports.deserializeAws_restJson1EnableSharingWithAwsOrganizationCommand = exports.deserializeAws_restJson1DisassociateResourceSharePermissionCommand = exports.deserializeAws_restJson1DisassociateResourceShareCommand = exports.deserializeAws_restJson1DeleteResourceShareCommand = exports.deserializeAws_restJson1CreateResourceShareCommand = exports.deserializeAws_restJson1AssociateResourceSharePermissionCommand = exports.deserializeAws_restJson1AssociateResourceShareCommand = exports.deserializeAws_restJson1AcceptResourceShareInvitationCommand = exports.serializeAws_restJson1UpdateResourceShareCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1RejectResourceShareInvitationCommand = exports.serializeAws_restJson1PromoteResourceShareCreatedFromPolicyCommand = exports.serializeAws_restJson1ListResourceTypesCommand = exports.serializeAws_restJson1ListResourceSharePermissionsCommand = exports.serializeAws_restJson1ListResourcesCommand = exports.serializeAws_restJson1ListPrincipalsCommand = exports.serializeAws_restJson1ListPermissionVersionsCommand = exports.serializeAws_restJson1ListPermissionsCommand = exports.serializeAws_restJson1ListPendingInvitationResourcesCommand = exports.serializeAws_restJson1GetResourceSharesCommand = exports.serializeAws_restJson1GetResourceShareInvitationsCommand = exports.serializeAws_restJson1GetResourceShareAssociationsCommand = exports.serializeAws_restJson1GetResourcePoliciesCommand = exports.serializeAws_restJson1GetPermissionCommand = exports.serializeAws_restJson1EnableSharingWithAwsOrganizationCommand = exports.serializeAws_restJson1DisassociateResourceSharePermissionCommand = exports.serializeAws_restJson1DisassociateResourceShareCommand = exports.serializeAws_restJson1DeleteResourceShareCommand = exports.serializeAws_restJson1CreateResourceShareCommand = exports.serializeAws_restJson1AssociateResourceSharePermissionCommand = exports.serializeAws_restJson1AssociateResourceShareCommand = exports.serializeAws_restJson1AcceptResourceShareInvitationCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const serializeAws_restJson1AcceptResourceShareInvitationCommand = async (input, context) => {
@@ -411,6 +411,29 @@ const serializeAws_restJson1ListPermissionsCommand = async (input, context) => {
411
411
  });
412
412
  };
413
413
  exports.serializeAws_restJson1ListPermissionsCommand = serializeAws_restJson1ListPermissionsCommand;
414
+ const serializeAws_restJson1ListPermissionVersionsCommand = async (input, context) => {
415
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
416
+ const headers = {
417
+ "content-type": "application/json",
418
+ };
419
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionversions";
420
+ let body;
421
+ body = JSON.stringify({
422
+ ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
423
+ ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
424
+ ...(input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn }),
425
+ });
426
+ return new protocol_http_1.HttpRequest({
427
+ protocol,
428
+ hostname,
429
+ port,
430
+ method: "POST",
431
+ headers,
432
+ path: resolvedPath,
433
+ body,
434
+ });
435
+ };
436
+ exports.serializeAws_restJson1ListPermissionVersionsCommand = serializeAws_restJson1ListPermissionVersionsCommand;
414
437
  const serializeAws_restJson1ListPrincipalsCommand = async (input, context) => {
415
438
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
416
439
  const headers = {
@@ -2224,6 +2247,106 @@ const deserializeAws_restJson1ListPermissionsCommandError = async (output, conte
2224
2247
  delete response.Message;
2225
2248
  return Promise.reject(Object.assign(new Error(message), response));
2226
2249
  };
2250
+ const deserializeAws_restJson1ListPermissionVersionsCommand = async (output, context) => {
2251
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2252
+ return deserializeAws_restJson1ListPermissionVersionsCommandError(output, context);
2253
+ }
2254
+ const contents = {
2255
+ $metadata: deserializeMetadata(output),
2256
+ nextToken: undefined,
2257
+ permissions: undefined,
2258
+ };
2259
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
2260
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2261
+ contents.nextToken = smithy_client_1.expectString(data.nextToken);
2262
+ }
2263
+ if (data.permissions !== undefined && data.permissions !== null) {
2264
+ contents.permissions = deserializeAws_restJson1ResourceSharePermissionList(data.permissions, context);
2265
+ }
2266
+ return Promise.resolve(contents);
2267
+ };
2268
+ exports.deserializeAws_restJson1ListPermissionVersionsCommand = deserializeAws_restJson1ListPermissionVersionsCommand;
2269
+ const deserializeAws_restJson1ListPermissionVersionsCommandError = async (output, context) => {
2270
+ const parsedOutput = {
2271
+ ...output,
2272
+ body: await parseBody(output.body, context),
2273
+ };
2274
+ let response;
2275
+ let errorCode = "UnknownError";
2276
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2277
+ switch (errorCode) {
2278
+ case "InvalidNextTokenException":
2279
+ case "com.amazonaws.ram#InvalidNextTokenException":
2280
+ response = {
2281
+ ...(await deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)),
2282
+ name: errorCode,
2283
+ $metadata: deserializeMetadata(output),
2284
+ };
2285
+ break;
2286
+ case "InvalidParameterException":
2287
+ case "com.amazonaws.ram#InvalidParameterException":
2288
+ response = {
2289
+ ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
2290
+ name: errorCode,
2291
+ $metadata: deserializeMetadata(output),
2292
+ };
2293
+ break;
2294
+ case "MalformedArnException":
2295
+ case "com.amazonaws.ram#MalformedArnException":
2296
+ response = {
2297
+ ...(await deserializeAws_restJson1MalformedArnExceptionResponse(parsedOutput, context)),
2298
+ name: errorCode,
2299
+ $metadata: deserializeMetadata(output),
2300
+ };
2301
+ break;
2302
+ case "OperationNotPermittedException":
2303
+ case "com.amazonaws.ram#OperationNotPermittedException":
2304
+ response = {
2305
+ ...(await deserializeAws_restJson1OperationNotPermittedExceptionResponse(parsedOutput, context)),
2306
+ name: errorCode,
2307
+ $metadata: deserializeMetadata(output),
2308
+ };
2309
+ break;
2310
+ case "ServerInternalException":
2311
+ case "com.amazonaws.ram#ServerInternalException":
2312
+ response = {
2313
+ ...(await deserializeAws_restJson1ServerInternalExceptionResponse(parsedOutput, context)),
2314
+ name: errorCode,
2315
+ $metadata: deserializeMetadata(output),
2316
+ };
2317
+ break;
2318
+ case "ServiceUnavailableException":
2319
+ case "com.amazonaws.ram#ServiceUnavailableException":
2320
+ response = {
2321
+ ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
2322
+ name: errorCode,
2323
+ $metadata: deserializeMetadata(output),
2324
+ };
2325
+ break;
2326
+ case "UnknownResourceException":
2327
+ case "com.amazonaws.ram#UnknownResourceException":
2328
+ response = {
2329
+ ...(await deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context)),
2330
+ name: errorCode,
2331
+ $metadata: deserializeMetadata(output),
2332
+ };
2333
+ break;
2334
+ default:
2335
+ const parsedBody = parsedOutput.body;
2336
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2337
+ response = {
2338
+ ...parsedBody,
2339
+ name: `${errorCode}`,
2340
+ message: parsedBody.message || parsedBody.Message || errorCode,
2341
+ $fault: "client",
2342
+ $metadata: deserializeMetadata(output),
2343
+ };
2344
+ }
2345
+ const message = response.message || response.Message || errorCode;
2346
+ response.message = message;
2347
+ delete response.Message;
2348
+ return Promise.reject(Object.assign(new Error(message), response));
2349
+ };
2227
2350
  const deserializeAws_restJson1ListPrincipalsCommand = async (output, context) => {
2228
2351
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2229
2352
  return deserializeAws_restJson1ListPrincipalsCommandError(output, context);
package/dist-es/RAM.js CHANGED
@@ -14,6 +14,7 @@ import { GetResourceShareInvitationsCommand, } from "./commands/GetResourceShare
14
14
  import { GetResourceSharesCommand, } from "./commands/GetResourceSharesCommand";
15
15
  import { ListPendingInvitationResourcesCommand, } from "./commands/ListPendingInvitationResourcesCommand";
16
16
  import { ListPermissionsCommand, } from "./commands/ListPermissionsCommand";
17
+ import { ListPermissionVersionsCommand, } from "./commands/ListPermissionVersionsCommand";
17
18
  import { ListPrincipalsCommand, } from "./commands/ListPrincipalsCommand";
18
19
  import { ListResourcesCommand, } from "./commands/ListResourcesCommand";
19
20
  import { ListResourceSharePermissionsCommand, } from "./commands/ListResourceSharePermissionsCommand";
@@ -239,6 +240,20 @@ var RAM = (function (_super) {
239
240
  return this.send(command, optionsOrCb);
240
241
  }
241
242
  };
243
+ RAM.prototype.listPermissionVersions = function (args, optionsOrCb, cb) {
244
+ var command = new ListPermissionVersionsCommand(args);
245
+ if (typeof optionsOrCb === "function") {
246
+ this.send(command, optionsOrCb);
247
+ }
248
+ else if (typeof cb === "function") {
249
+ if (typeof optionsOrCb !== "object")
250
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
251
+ this.send(command, optionsOrCb || {}, cb);
252
+ }
253
+ else {
254
+ return this.send(command, optionsOrCb);
255
+ }
256
+ };
242
257
  RAM.prototype.listPrincipals = function (args, optionsOrCb, cb) {
243
258
  var command = new ListPrincipalsCommand(args);
244
259
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListPermissionVersionsRequest, ListPermissionVersionsResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ListPermissionVersionsCommand, serializeAws_restJson1ListPermissionVersionsCommand, } from "../protocols/Aws_restJson1";
6
+ var ListPermissionVersionsCommand = (function (_super) {
7
+ __extends(ListPermissionVersionsCommand, _super);
8
+ function ListPermissionVersionsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListPermissionVersionsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "RAMClient";
18
+ var commandName = "ListPermissionVersionsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListPermissionVersionsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ListPermissionVersionsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListPermissionVersionsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ListPermissionVersionsCommand(input, context);
33
+ };
34
+ ListPermissionVersionsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ListPermissionVersionsCommand(output, context);
36
+ };
37
+ return ListPermissionVersionsCommand;
38
+ }($Command));
39
+ export { ListPermissionVersionsCommand };
@@ -12,6 +12,7 @@ export * from "./GetResourceShareAssociationsCommand";
12
12
  export * from "./GetResourceShareInvitationsCommand";
13
13
  export * from "./GetResourceSharesCommand";
14
14
  export * from "./ListPendingInvitationResourcesCommand";
15
+ export * from "./ListPermissionVersionsCommand";
15
16
  export * from "./ListPermissionsCommand";
16
17
  export * from "./ListPrincipalsCommand";
17
18
  export * from "./ListResourceSharePermissionsCommand";
@@ -167,6 +167,14 @@ export var ListPermissionsResponse;
167
167
  (function (ListPermissionsResponse) {
168
168
  ListPermissionsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
169
  })(ListPermissionsResponse || (ListPermissionsResponse = {}));
170
+ export var ListPermissionVersionsRequest;
171
+ (function (ListPermissionVersionsRequest) {
172
+ ListPermissionVersionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
+ })(ListPermissionVersionsRequest || (ListPermissionVersionsRequest = {}));
174
+ export var ListPermissionVersionsResponse;
175
+ (function (ListPermissionVersionsResponse) {
176
+ ListPermissionVersionsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
177
+ })(ListPermissionVersionsResponse || (ListPermissionVersionsResponse = {}));
170
178
  export var ListPrincipalsRequest;
171
179
  (function (ListPrincipalsRequest) {
172
180
  ListPrincipalsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -0,0 +1,74 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListPermissionVersionsCommand, } from "../commands/ListPermissionVersionsCommand";
3
+ import { RAM } from "../RAM";
4
+ import { RAMClient } from "../RAMClient";
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 ListPermissionVersionsCommand(input)], __read(args)))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
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.listPermissionVersions.apply(client, __spreadArray([input], __read(args)))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListPermissionVersions(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListPermissionVersions_1() {
39
+ var token, hasNext, page;
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 RAM)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof RAMClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected RAM | RAMClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ token = page.nextToken;
67
+ hasNext = !!token;
68
+ return [3, 1];
69
+ case 9: return [4, __await(undefined)];
70
+ case 10: return [2, _a.sent()];
71
+ }
72
+ });
73
+ });
74
+ }
@@ -4,6 +4,7 @@ export * from "./GetResourceShareInvitationsPaginator";
4
4
  export * from "./GetResourceSharesPaginator";
5
5
  export * from "./Interfaces";
6
6
  export * from "./ListPendingInvitationResourcesPaginator";
7
+ export * from "./ListPermissionVersionsPaginator";
7
8
  export * from "./ListPermissionsPaginator";
8
9
  export * from "./ListPrincipalsPaginator";
9
10
  export * from "./ListResourceSharePermissionsPaginator";
@@ -411,6 +411,30 @@ export var serializeAws_restJson1ListPermissionsCommand = function (input, conte
411
411
  }
412
412
  });
413
413
  }); };
414
+ export var serializeAws_restJson1ListPermissionVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
415
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
416
+ return __generator(this, function (_c) {
417
+ switch (_c.label) {
418
+ case 0: return [4, context.endpoint()];
419
+ case 1:
420
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
421
+ headers = {
422
+ "content-type": "application/json",
423
+ };
424
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listpermissionversions";
425
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn })));
426
+ return [2, new __HttpRequest({
427
+ protocol: protocol,
428
+ hostname: hostname,
429
+ port: port,
430
+ method: "POST",
431
+ headers: headers,
432
+ path: resolvedPath,
433
+ body: body,
434
+ })];
435
+ }
436
+ });
437
+ }); };
414
438
  export var serializeAws_restJson1ListPrincipalsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
415
439
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
416
440
  return __generator(this, function (_c) {
@@ -2438,6 +2462,120 @@ var deserializeAws_restJson1ListPermissionsCommandError = function (output, cont
2438
2462
  }
2439
2463
  });
2440
2464
  }); };
2465
+ export var deserializeAws_restJson1ListPermissionVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2466
+ var contents, data, _a, _b;
2467
+ return __generator(this, function (_c) {
2468
+ switch (_c.label) {
2469
+ case 0:
2470
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2471
+ return [2, deserializeAws_restJson1ListPermissionVersionsCommandError(output, context)];
2472
+ }
2473
+ contents = {
2474
+ $metadata: deserializeMetadata(output),
2475
+ nextToken: undefined,
2476
+ permissions: undefined,
2477
+ };
2478
+ _a = __expectNonNull;
2479
+ _b = __expectObject;
2480
+ return [4, parseBody(output.body, context)];
2481
+ case 1:
2482
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2483
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2484
+ contents.nextToken = __expectString(data.nextToken);
2485
+ }
2486
+ if (data.permissions !== undefined && data.permissions !== null) {
2487
+ contents.permissions = deserializeAws_restJson1ResourceSharePermissionList(data.permissions, context);
2488
+ }
2489
+ return [2, Promise.resolve(contents)];
2490
+ }
2491
+ });
2492
+ }); };
2493
+ var deserializeAws_restJson1ListPermissionVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2494
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
2495
+ var _k;
2496
+ return __generator(this, function (_l) {
2497
+ switch (_l.label) {
2498
+ case 0:
2499
+ _a = [__assign({}, output)];
2500
+ _k = {};
2501
+ return [4, parseBody(output.body, context)];
2502
+ case 1:
2503
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
2504
+ errorCode = "UnknownError";
2505
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2506
+ _b = errorCode;
2507
+ switch (_b) {
2508
+ case "InvalidNextTokenException": return [3, 2];
2509
+ case "com.amazonaws.ram#InvalidNextTokenException": return [3, 2];
2510
+ case "InvalidParameterException": return [3, 4];
2511
+ case "com.amazonaws.ram#InvalidParameterException": return [3, 4];
2512
+ case "MalformedArnException": return [3, 6];
2513
+ case "com.amazonaws.ram#MalformedArnException": return [3, 6];
2514
+ case "OperationNotPermittedException": return [3, 8];
2515
+ case "com.amazonaws.ram#OperationNotPermittedException": return [3, 8];
2516
+ case "ServerInternalException": return [3, 10];
2517
+ case "com.amazonaws.ram#ServerInternalException": return [3, 10];
2518
+ case "ServiceUnavailableException": return [3, 12];
2519
+ case "com.amazonaws.ram#ServiceUnavailableException": return [3, 12];
2520
+ case "UnknownResourceException": return [3, 14];
2521
+ case "com.amazonaws.ram#UnknownResourceException": return [3, 14];
2522
+ }
2523
+ return [3, 16];
2524
+ case 2:
2525
+ _c = [{}];
2526
+ return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
2527
+ case 3:
2528
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2529
+ return [3, 17];
2530
+ case 4:
2531
+ _d = [{}];
2532
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
2533
+ case 5:
2534
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2535
+ return [3, 17];
2536
+ case 6:
2537
+ _e = [{}];
2538
+ return [4, deserializeAws_restJson1MalformedArnExceptionResponse(parsedOutput, context)];
2539
+ case 7:
2540
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2541
+ return [3, 17];
2542
+ case 8:
2543
+ _f = [{}];
2544
+ return [4, deserializeAws_restJson1OperationNotPermittedExceptionResponse(parsedOutput, context)];
2545
+ case 9:
2546
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2547
+ return [3, 17];
2548
+ case 10:
2549
+ _g = [{}];
2550
+ return [4, deserializeAws_restJson1ServerInternalExceptionResponse(parsedOutput, context)];
2551
+ case 11:
2552
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2553
+ return [3, 17];
2554
+ case 12:
2555
+ _h = [{}];
2556
+ return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
2557
+ case 13:
2558
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2559
+ return [3, 17];
2560
+ case 14:
2561
+ _j = [{}];
2562
+ return [4, deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context)];
2563
+ case 15:
2564
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2565
+ return [3, 17];
2566
+ case 16:
2567
+ parsedBody = parsedOutput.body;
2568
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2569
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2570
+ _l.label = 17;
2571
+ case 17:
2572
+ message = response.message || response.Message || errorCode;
2573
+ response.message = message;
2574
+ delete response.Message;
2575
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2576
+ }
2577
+ });
2578
+ }); };
2441
2579
  export var deserializeAws_restJson1ListPrincipalsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2442
2580
  var contents, data, _a, _b;
2443
2581
  return __generator(this, function (_c) {
@@ -14,6 +14,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
14
14
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "./commands/GetResourceSharesCommand";
15
15
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "./commands/ListPendingInvitationResourcesCommand";
16
16
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
17
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "./commands/ListPermissionVersionsCommand";
17
18
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "./commands/ListPrincipalsCommand";
18
19
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand";
19
20
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "./commands/ListResourceSharePermissionsCommand";
@@ -169,6 +170,12 @@ export declare class RAM extends RAMClient {
169
170
  listPermissions(args: ListPermissionsCommandInput, options?: __HttpHandlerOptions): Promise<ListPermissionsCommandOutput>;
170
171
  listPermissions(args: ListPermissionsCommandInput, cb: (err: any, data?: ListPermissionsCommandOutput) => void): void;
171
172
  listPermissions(args: ListPermissionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPermissionsCommandOutput) => void): void;
173
+ /**
174
+ * <p>Lists the available versions of the specified RAM permission.</p>
175
+ */
176
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, options?: __HttpHandlerOptions): Promise<ListPermissionVersionsCommandOutput>;
177
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, cb: (err: any, data?: ListPermissionVersionsCommandOutput) => void): void;
178
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPermissionVersionsCommandOutput) => void): void;
172
179
  /**
173
180
  * <p>Lists the principals that you are sharing resources with or that are sharing resources
174
181
  * with you.</p>
@@ -21,6 +21,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
21
21
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "./commands/GetResourceSharesCommand";
22
22
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "./commands/ListPendingInvitationResourcesCommand";
23
23
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
24
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "./commands/ListPermissionVersionsCommand";
24
25
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "./commands/ListPrincipalsCommand";
25
26
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand";
26
27
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "./commands/ListResourceSharePermissionsCommand";
@@ -30,8 +31,8 @@ import { RejectResourceShareInvitationCommandInput, RejectResourceShareInvitatio
30
31
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
31
32
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
32
33
  import { UpdateResourceShareCommandInput, UpdateResourceShareCommandOutput } from "./commands/UpdateResourceShareCommand";
33
- export declare type ServiceInputTypes = AcceptResourceShareInvitationCommandInput | AssociateResourceShareCommandInput | AssociateResourceSharePermissionCommandInput | CreateResourceShareCommandInput | DeleteResourceShareCommandInput | DisassociateResourceShareCommandInput | DisassociateResourceSharePermissionCommandInput | EnableSharingWithAwsOrganizationCommandInput | GetPermissionCommandInput | GetResourcePoliciesCommandInput | GetResourceShareAssociationsCommandInput | GetResourceShareInvitationsCommandInput | GetResourceSharesCommandInput | ListPendingInvitationResourcesCommandInput | ListPermissionsCommandInput | ListPrincipalsCommandInput | ListResourceSharePermissionsCommandInput | ListResourceTypesCommandInput | ListResourcesCommandInput | PromoteResourceShareCreatedFromPolicyCommandInput | RejectResourceShareInvitationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateResourceShareCommandInput;
34
- export declare type ServiceOutputTypes = AcceptResourceShareInvitationCommandOutput | AssociateResourceShareCommandOutput | AssociateResourceSharePermissionCommandOutput | CreateResourceShareCommandOutput | DeleteResourceShareCommandOutput | DisassociateResourceShareCommandOutput | DisassociateResourceSharePermissionCommandOutput | EnableSharingWithAwsOrganizationCommandOutput | GetPermissionCommandOutput | GetResourcePoliciesCommandOutput | GetResourceShareAssociationsCommandOutput | GetResourceShareInvitationsCommandOutput | GetResourceSharesCommandOutput | ListPendingInvitationResourcesCommandOutput | ListPermissionsCommandOutput | ListPrincipalsCommandOutput | ListResourceSharePermissionsCommandOutput | ListResourceTypesCommandOutput | ListResourcesCommandOutput | PromoteResourceShareCreatedFromPolicyCommandOutput | RejectResourceShareInvitationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateResourceShareCommandOutput;
34
+ export declare type ServiceInputTypes = AcceptResourceShareInvitationCommandInput | AssociateResourceShareCommandInput | AssociateResourceSharePermissionCommandInput | CreateResourceShareCommandInput | DeleteResourceShareCommandInput | DisassociateResourceShareCommandInput | DisassociateResourceSharePermissionCommandInput | EnableSharingWithAwsOrganizationCommandInput | GetPermissionCommandInput | GetResourcePoliciesCommandInput | GetResourceShareAssociationsCommandInput | GetResourceShareInvitationsCommandInput | GetResourceSharesCommandInput | ListPendingInvitationResourcesCommandInput | ListPermissionVersionsCommandInput | ListPermissionsCommandInput | ListPrincipalsCommandInput | ListResourceSharePermissionsCommandInput | ListResourceTypesCommandInput | ListResourcesCommandInput | PromoteResourceShareCreatedFromPolicyCommandInput | RejectResourceShareInvitationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateResourceShareCommandInput;
35
+ export declare type ServiceOutputTypes = AcceptResourceShareInvitationCommandOutput | AssociateResourceShareCommandOutput | AssociateResourceSharePermissionCommandOutput | CreateResourceShareCommandOutput | DeleteResourceShareCommandOutput | DisassociateResourceShareCommandOutput | DisassociateResourceSharePermissionCommandOutput | EnableSharingWithAwsOrganizationCommandOutput | GetPermissionCommandOutput | GetResourcePoliciesCommandOutput | GetResourceShareAssociationsCommandOutput | GetResourceShareInvitationsCommandOutput | GetResourceSharesCommandOutput | ListPendingInvitationResourcesCommandOutput | ListPermissionVersionsCommandOutput | ListPermissionsCommandOutput | ListPrincipalsCommandOutput | ListResourceSharePermissionsCommandOutput | ListResourceTypesCommandOutput | ListResourcesCommandOutput | PromoteResourceShareCreatedFromPolicyCommandOutput | RejectResourceShareInvitationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateResourceShareCommandOutput;
35
36
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
36
37
  /**
37
38
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -0,0 +1,35 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { ListPermissionVersionsRequest, ListPermissionVersionsResponse } from "../models/models_0";
4
+ import { RAMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RAMClient";
5
+ export interface ListPermissionVersionsCommandInput extends ListPermissionVersionsRequest {
6
+ }
7
+ export interface ListPermissionVersionsCommandOutput extends ListPermissionVersionsResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Lists the available versions of the specified RAM permission.</p>
11
+ * @example
12
+ * Use a bare-bones client and the command you need to make an API call.
13
+ * ```javascript
14
+ * import { RAMClient, ListPermissionVersionsCommand } from "@aws-sdk/client-ram"; // ES Modules import
15
+ * // const { RAMClient, ListPermissionVersionsCommand } = require("@aws-sdk/client-ram"); // CommonJS import
16
+ * const client = new RAMClient(config);
17
+ * const command = new ListPermissionVersionsCommand(input);
18
+ * const response = await client.send(command);
19
+ * ```
20
+ *
21
+ * @see {@link ListPermissionVersionsCommandInput} for command's `input` shape.
22
+ * @see {@link ListPermissionVersionsCommandOutput} for command's `response` shape.
23
+ * @see {@link RAMClientResolvedConfig | config} for RAMClient's `config` shape.
24
+ *
25
+ */
26
+ export declare class ListPermissionVersionsCommand extends $Command<ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput, RAMClientResolvedConfig> {
27
+ readonly input: ListPermissionVersionsCommandInput;
28
+ constructor(input: ListPermissionVersionsCommandInput);
29
+ /**
30
+ * @internal
31
+ */
32
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: RAMClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -12,6 +12,7 @@ export * from "./GetResourceShareAssociationsCommand";
12
12
  export * from "./GetResourceShareInvitationsCommand";
13
13
  export * from "./GetResourceSharesCommand";
14
14
  export * from "./ListPendingInvitationResourcesCommand";
15
+ export * from "./ListPermissionVersionsCommand";
15
16
  export * from "./ListPermissionsCommand";
16
17
  export * from "./ListPrincipalsCommand";
17
18
  export * from "./ListResourceSharePermissionsCommand";
@@ -414,7 +414,9 @@ export interface AssociateResourceSharePermissionRequest {
414
414
  clientToken?: string;
415
415
  /**
416
416
  * <p>Specifies the version of the RAM permission to associate with the resource share. If you don't
417
- * specify this parameter, the operation uses the version designated as the default.</p>
417
+ * specify this parameter, the operation uses the version designated as the default. You
418
+ * can use the <a>ListPermissionVersions</a> operation to discover the available
419
+ * versions of a permission.</p>
418
420
  */
419
421
  permissionVersion?: number;
420
422
  }
@@ -1541,6 +1543,60 @@ export declare namespace ListPermissionsResponse {
1541
1543
  */
1542
1544
  const filterSensitiveLog: (obj: ListPermissionsResponse) => any;
1543
1545
  }
1546
+ export interface ListPermissionVersionsRequest {
1547
+ /**
1548
+ * <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission whose versions you want to list. You
1549
+ * can use the <code>permissionVersion</code> parameter on the <a>AssociateResourceSharePermission</a> operation to specify a non-default
1550
+ * version to attach.</p>
1551
+ */
1552
+ permissionArn: string | undefined;
1553
+ /**
1554
+ * <p>Specifies that you want to receive the next page of results. Valid
1555
+ * only if you received a <code>NextToken</code> response in the previous request. If you
1556
+ * did, it indicates that more output is available. Set this parameter to the value
1557
+ * provided by the previous call's <code>NextToken</code> response to request the
1558
+ * next page of results.</p>
1559
+ */
1560
+ nextToken?: string;
1561
+ /**
1562
+ * <p>Specifies the total number of results that you want included on each page
1563
+ * of the response. If you do not include this parameter, it defaults to a value that is
1564
+ * specific to the operation. If additional items exist beyond the number you specify, the
1565
+ * <code>NextToken</code> response element is returned with a value (not null).
1566
+ * Include the specified value as the <code>NextToken</code> request parameter in the next
1567
+ * call to the operation to get the next part of the results. Note that the service might
1568
+ * return fewer results than the maximum even when there are more results available. You
1569
+ * should check <code>NextToken</code> after every operation to ensure that you receive all
1570
+ * of the results.</p>
1571
+ */
1572
+ maxResults?: number;
1573
+ }
1574
+ export declare namespace ListPermissionVersionsRequest {
1575
+ /**
1576
+ * @internal
1577
+ */
1578
+ const filterSensitiveLog: (obj: ListPermissionVersionsRequest) => any;
1579
+ }
1580
+ export interface ListPermissionVersionsResponse {
1581
+ /**
1582
+ * <p>An array of objects that contain details for each of the available versions.</p>
1583
+ */
1584
+ permissions?: ResourceSharePermissionSummary[];
1585
+ /**
1586
+ * <p>If present, this value indicates that more output is available than
1587
+ * is included in the current response. Use this value in the <code>NextToken</code>
1588
+ * request parameter in a subsequent call to the operation to get the next part of the
1589
+ * output. You should repeat this until the <code>NextToken</code> response element comes
1590
+ * back as <code>null</code>. This indicates that this is the last page of results.</p>
1591
+ */
1592
+ nextToken?: string;
1593
+ }
1594
+ export declare namespace ListPermissionVersionsResponse {
1595
+ /**
1596
+ * @internal
1597
+ */
1598
+ const filterSensitiveLog: (obj: ListPermissionVersionsResponse) => any;
1599
+ }
1544
1600
  export interface ListPrincipalsRequest {
1545
1601
  /**
1546
1602
  * <p>Specifies that you want to list information for only resource shares that match the
@@ -0,0 +1,4 @@
1
+ import { Paginator } from "@aws-sdk/types";
2
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "../commands/ListPermissionVersionsCommand";
3
+ import { RAMPaginationConfiguration } from "./Interfaces";
4
+ export declare function paginateListPermissionVersions(config: RAMPaginationConfiguration, input: ListPermissionVersionsCommandInput, ...additionalArguments: any): Paginator<ListPermissionVersionsCommandOutput>;
@@ -4,6 +4,7 @@ export * from "./GetResourceShareInvitationsPaginator";
4
4
  export * from "./GetResourceSharesPaginator";
5
5
  export * from "./Interfaces";
6
6
  export * from "./ListPendingInvitationResourcesPaginator";
7
+ export * from "./ListPermissionVersionsPaginator";
7
8
  export * from "./ListPermissionsPaginator";
8
9
  export * from "./ListPrincipalsPaginator";
9
10
  export * from "./ListResourceSharePermissionsPaginator";
@@ -15,6 +15,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
15
15
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "../commands/GetResourceSharesCommand";
16
16
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "../commands/ListPendingInvitationResourcesCommand";
17
17
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand";
18
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "../commands/ListPermissionVersionsCommand";
18
19
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "../commands/ListPrincipalsCommand";
19
20
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "../commands/ListResourcesCommand";
20
21
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "../commands/ListResourceSharePermissionsCommand";
@@ -39,6 +40,7 @@ export declare const serializeAws_restJson1GetResourceShareInvitationsCommand: (
39
40
  export declare const serializeAws_restJson1GetResourceSharesCommand: (input: GetResourceSharesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
40
41
  export declare const serializeAws_restJson1ListPendingInvitationResourcesCommand: (input: ListPendingInvitationResourcesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
41
42
  export declare const serializeAws_restJson1ListPermissionsCommand: (input: ListPermissionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
43
+ export declare const serializeAws_restJson1ListPermissionVersionsCommand: (input: ListPermissionVersionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
42
44
  export declare const serializeAws_restJson1ListPrincipalsCommand: (input: ListPrincipalsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
43
45
  export declare const serializeAws_restJson1ListResourcesCommand: (input: ListResourcesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
44
46
  export declare const serializeAws_restJson1ListResourceSharePermissionsCommand: (input: ListResourceSharePermissionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -63,6 +65,7 @@ export declare const deserializeAws_restJson1GetResourceShareInvitationsCommand:
63
65
  export declare const deserializeAws_restJson1GetResourceSharesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetResourceSharesCommandOutput>;
64
66
  export declare const deserializeAws_restJson1ListPendingInvitationResourcesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPendingInvitationResourcesCommandOutput>;
65
67
  export declare const deserializeAws_restJson1ListPermissionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPermissionsCommandOutput>;
68
+ export declare const deserializeAws_restJson1ListPermissionVersionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPermissionVersionsCommandOutput>;
66
69
  export declare const deserializeAws_restJson1ListPrincipalsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPrincipalsCommandOutput>;
67
70
  export declare const deserializeAws_restJson1ListResourcesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListResourcesCommandOutput>;
68
71
  export declare const deserializeAws_restJson1ListResourceSharePermissionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListResourceSharePermissionsCommandOutput>;
@@ -14,6 +14,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
14
14
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "./commands/GetResourceSharesCommand";
15
15
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "./commands/ListPendingInvitationResourcesCommand";
16
16
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
17
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "./commands/ListPermissionVersionsCommand";
17
18
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "./commands/ListPrincipalsCommand";
18
19
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand";
19
20
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "./commands/ListResourceSharePermissionsCommand";
@@ -87,6 +88,10 @@ export declare class RAM extends RAMClient {
87
88
  listPermissions(args: ListPermissionsCommandInput, cb: (err: any, data?: ListPermissionsCommandOutput) => void): void;
88
89
  listPermissions(args: ListPermissionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPermissionsCommandOutput) => void): void;
89
90
 
91
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, options?: __HttpHandlerOptions): Promise<ListPermissionVersionsCommandOutput>;
92
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, cb: (err: any, data?: ListPermissionVersionsCommandOutput) => void): void;
93
+ listPermissionVersions(args: ListPermissionVersionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPermissionVersionsCommandOutput) => void): void;
94
+
90
95
  listPrincipals(args: ListPrincipalsCommandInput, options?: __HttpHandlerOptions): Promise<ListPrincipalsCommandOutput>;
91
96
  listPrincipals(args: ListPrincipalsCommandInput, cb: (err: any, data?: ListPrincipalsCommandOutput) => void): void;
92
97
  listPrincipals(args: ListPrincipalsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPrincipalsCommandOutput) => void): void;
@@ -21,6 +21,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
21
21
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "./commands/GetResourceSharesCommand";
22
22
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "./commands/ListPendingInvitationResourcesCommand";
23
23
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "./commands/ListPermissionsCommand";
24
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "./commands/ListPermissionVersionsCommand";
24
25
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "./commands/ListPrincipalsCommand";
25
26
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "./commands/ListResourcesCommand";
26
27
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "./commands/ListResourceSharePermissionsCommand";
@@ -30,8 +31,8 @@ import { RejectResourceShareInvitationCommandInput, RejectResourceShareInvitatio
30
31
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
31
32
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
32
33
  import { UpdateResourceShareCommandInput, UpdateResourceShareCommandOutput } from "./commands/UpdateResourceShareCommand";
33
- export declare type ServiceInputTypes = AcceptResourceShareInvitationCommandInput | AssociateResourceShareCommandInput | AssociateResourceSharePermissionCommandInput | CreateResourceShareCommandInput | DeleteResourceShareCommandInput | DisassociateResourceShareCommandInput | DisassociateResourceSharePermissionCommandInput | EnableSharingWithAwsOrganizationCommandInput | GetPermissionCommandInput | GetResourcePoliciesCommandInput | GetResourceShareAssociationsCommandInput | GetResourceShareInvitationsCommandInput | GetResourceSharesCommandInput | ListPendingInvitationResourcesCommandInput | ListPermissionsCommandInput | ListPrincipalsCommandInput | ListResourceSharePermissionsCommandInput | ListResourceTypesCommandInput | ListResourcesCommandInput | PromoteResourceShareCreatedFromPolicyCommandInput | RejectResourceShareInvitationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateResourceShareCommandInput;
34
- export declare type ServiceOutputTypes = AcceptResourceShareInvitationCommandOutput | AssociateResourceShareCommandOutput | AssociateResourceSharePermissionCommandOutput | CreateResourceShareCommandOutput | DeleteResourceShareCommandOutput | DisassociateResourceShareCommandOutput | DisassociateResourceSharePermissionCommandOutput | EnableSharingWithAwsOrganizationCommandOutput | GetPermissionCommandOutput | GetResourcePoliciesCommandOutput | GetResourceShareAssociationsCommandOutput | GetResourceShareInvitationsCommandOutput | GetResourceSharesCommandOutput | ListPendingInvitationResourcesCommandOutput | ListPermissionsCommandOutput | ListPrincipalsCommandOutput | ListResourceSharePermissionsCommandOutput | ListResourceTypesCommandOutput | ListResourcesCommandOutput | PromoteResourceShareCreatedFromPolicyCommandOutput | RejectResourceShareInvitationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateResourceShareCommandOutput;
34
+ export declare type ServiceInputTypes = AcceptResourceShareInvitationCommandInput | AssociateResourceShareCommandInput | AssociateResourceSharePermissionCommandInput | CreateResourceShareCommandInput | DeleteResourceShareCommandInput | DisassociateResourceShareCommandInput | DisassociateResourceSharePermissionCommandInput | EnableSharingWithAwsOrganizationCommandInput | GetPermissionCommandInput | GetResourcePoliciesCommandInput | GetResourceShareAssociationsCommandInput | GetResourceShareInvitationsCommandInput | GetResourceSharesCommandInput | ListPendingInvitationResourcesCommandInput | ListPermissionVersionsCommandInput | ListPermissionsCommandInput | ListPrincipalsCommandInput | ListResourceSharePermissionsCommandInput | ListResourceTypesCommandInput | ListResourcesCommandInput | PromoteResourceShareCreatedFromPolicyCommandInput | RejectResourceShareInvitationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateResourceShareCommandInput;
35
+ export declare type ServiceOutputTypes = AcceptResourceShareInvitationCommandOutput | AssociateResourceShareCommandOutput | AssociateResourceSharePermissionCommandOutput | CreateResourceShareCommandOutput | DeleteResourceShareCommandOutput | DisassociateResourceShareCommandOutput | DisassociateResourceSharePermissionCommandOutput | EnableSharingWithAwsOrganizationCommandOutput | GetPermissionCommandOutput | GetResourcePoliciesCommandOutput | GetResourceShareAssociationsCommandOutput | GetResourceShareInvitationsCommandOutput | GetResourceSharesCommandOutput | ListPendingInvitationResourcesCommandOutput | ListPermissionVersionsCommandOutput | ListPermissionsCommandOutput | ListPrincipalsCommandOutput | ListResourceSharePermissionsCommandOutput | ListResourceTypesCommandOutput | ListResourcesCommandOutput | PromoteResourceShareCreatedFromPolicyCommandOutput | RejectResourceShareInvitationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateResourceShareCommandOutput;
35
36
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
36
37
 
37
38
  requestHandler?: __HttpHandler;
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { ListPermissionVersionsRequest, ListPermissionVersionsResponse } from "../models/models_0";
4
+ import { RAMClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RAMClient";
5
+ export interface ListPermissionVersionsCommandInput extends ListPermissionVersionsRequest {
6
+ }
7
+ export interface ListPermissionVersionsCommandOutput extends ListPermissionVersionsResponse, __MetadataBearer {
8
+ }
9
+
10
+ export declare class ListPermissionVersionsCommand extends $Command<ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput, RAMClientResolvedConfig> {
11
+ readonly input: ListPermissionVersionsCommandInput;
12
+ constructor(input: ListPermissionVersionsCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: RAMClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
@@ -12,6 +12,7 @@ export * from "./GetResourceShareAssociationsCommand";
12
12
  export * from "./GetResourceShareInvitationsCommand";
13
13
  export * from "./GetResourceSharesCommand";
14
14
  export * from "./ListPendingInvitationResourcesCommand";
15
+ export * from "./ListPermissionVersionsCommand";
15
16
  export * from "./ListPermissionsCommand";
16
17
  export * from "./ListPrincipalsCommand";
17
18
  export * from "./ListResourceSharePermissionsCommand";
@@ -666,6 +666,28 @@ export declare namespace ListPermissionsResponse {
666
666
 
667
667
  const filterSensitiveLog: (obj: ListPermissionsResponse) => any;
668
668
  }
669
+ export interface ListPermissionVersionsRequest {
670
+
671
+ permissionArn: string | undefined;
672
+
673
+ nextToken?: string;
674
+
675
+ maxResults?: number;
676
+ }
677
+ export declare namespace ListPermissionVersionsRequest {
678
+
679
+ const filterSensitiveLog: (obj: ListPermissionVersionsRequest) => any;
680
+ }
681
+ export interface ListPermissionVersionsResponse {
682
+
683
+ permissions?: ResourceSharePermissionSummary[];
684
+
685
+ nextToken?: string;
686
+ }
687
+ export declare namespace ListPermissionVersionsResponse {
688
+
689
+ const filterSensitiveLog: (obj: ListPermissionVersionsResponse) => any;
690
+ }
669
691
  export interface ListPrincipalsRequest {
670
692
 
671
693
  resourceOwner: ResourceOwner | string | undefined;
@@ -0,0 +1,4 @@
1
+ import { Paginator } from "@aws-sdk/types";
2
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "../commands/ListPermissionVersionsCommand";
3
+ import { RAMPaginationConfiguration } from "./Interfaces";
4
+ export declare function paginateListPermissionVersions(config: RAMPaginationConfiguration, input: ListPermissionVersionsCommandInput, ...additionalArguments: any): Paginator<ListPermissionVersionsCommandOutput>;
@@ -4,6 +4,7 @@ export * from "./GetResourceShareInvitationsPaginator";
4
4
  export * from "./GetResourceSharesPaginator";
5
5
  export * from "./Interfaces";
6
6
  export * from "./ListPendingInvitationResourcesPaginator";
7
+ export * from "./ListPermissionVersionsPaginator";
7
8
  export * from "./ListPermissionsPaginator";
8
9
  export * from "./ListPrincipalsPaginator";
9
10
  export * from "./ListResourceSharePermissionsPaginator";
@@ -15,6 +15,7 @@ import { GetResourceShareInvitationsCommandInput, GetResourceShareInvitationsCom
15
15
  import { GetResourceSharesCommandInput, GetResourceSharesCommandOutput } from "../commands/GetResourceSharesCommand";
16
16
  import { ListPendingInvitationResourcesCommandInput, ListPendingInvitationResourcesCommandOutput } from "../commands/ListPendingInvitationResourcesCommand";
17
17
  import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand";
18
+ import { ListPermissionVersionsCommandInput, ListPermissionVersionsCommandOutput } from "../commands/ListPermissionVersionsCommand";
18
19
  import { ListPrincipalsCommandInput, ListPrincipalsCommandOutput } from "../commands/ListPrincipalsCommand";
19
20
  import { ListResourcesCommandInput, ListResourcesCommandOutput } from "../commands/ListResourcesCommand";
20
21
  import { ListResourceSharePermissionsCommandInput, ListResourceSharePermissionsCommandOutput } from "../commands/ListResourceSharePermissionsCommand";
@@ -39,6 +40,7 @@ export declare const serializeAws_restJson1GetResourceShareInvitationsCommand: (
39
40
  export declare const serializeAws_restJson1GetResourceSharesCommand: (input: GetResourceSharesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
40
41
  export declare const serializeAws_restJson1ListPendingInvitationResourcesCommand: (input: ListPendingInvitationResourcesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
41
42
  export declare const serializeAws_restJson1ListPermissionsCommand: (input: ListPermissionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
43
+ export declare const serializeAws_restJson1ListPermissionVersionsCommand: (input: ListPermissionVersionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
42
44
  export declare const serializeAws_restJson1ListPrincipalsCommand: (input: ListPrincipalsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
43
45
  export declare const serializeAws_restJson1ListResourcesCommand: (input: ListResourcesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
44
46
  export declare const serializeAws_restJson1ListResourceSharePermissionsCommand: (input: ListResourceSharePermissionsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -63,6 +65,7 @@ export declare const deserializeAws_restJson1GetResourceShareInvitationsCommand:
63
65
  export declare const deserializeAws_restJson1GetResourceSharesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetResourceSharesCommandOutput>;
64
66
  export declare const deserializeAws_restJson1ListPendingInvitationResourcesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPendingInvitationResourcesCommandOutput>;
65
67
  export declare const deserializeAws_restJson1ListPermissionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPermissionsCommandOutput>;
68
+ export declare const deserializeAws_restJson1ListPermissionVersionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPermissionVersionsCommandOutput>;
66
69
  export declare const deserializeAws_restJson1ListPrincipalsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListPrincipalsCommandOutput>;
67
70
  export declare const deserializeAws_restJson1ListResourcesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListResourcesCommandOutput>;
68
71
  export declare const deserializeAws_restJson1ListResourceSharePermissionsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListResourceSharePermissionsCommandOutput>;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ram",
3
3
  "description": "AWS SDK for JavaScript Ram Client for Node.js, Browser and React Native",
4
- "version": "3.47.0",
4
+ "version": "3.49.0",
5
5
  "scripts": {
6
- "build": "yarn build:cjs && yarn build:es && yarn build:types",
6
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
8
8
  "build:docs": "typedoc",
9
9
  "build:es": "tsc -p tsconfig.es.json",
@@ -18,41 +18,47 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.47.0",
22
- "@aws-sdk/config-resolver": "3.47.0",
23
- "@aws-sdk/credential-provider-node": "3.47.0",
24
- "@aws-sdk/fetch-http-handler": "3.47.0",
25
- "@aws-sdk/hash-node": "3.47.0",
26
- "@aws-sdk/invalid-dependency": "3.47.0",
27
- "@aws-sdk/middleware-content-length": "3.47.0",
28
- "@aws-sdk/middleware-host-header": "3.47.0",
29
- "@aws-sdk/middleware-logger": "3.47.0",
30
- "@aws-sdk/middleware-retry": "3.47.0",
31
- "@aws-sdk/middleware-serde": "3.47.0",
32
- "@aws-sdk/middleware-signing": "3.47.0",
33
- "@aws-sdk/middleware-stack": "3.47.0",
34
- "@aws-sdk/middleware-user-agent": "3.47.0",
35
- "@aws-sdk/node-config-provider": "3.47.0",
36
- "@aws-sdk/node-http-handler": "3.47.0",
37
- "@aws-sdk/protocol-http": "3.47.0",
38
- "@aws-sdk/smithy-client": "3.47.0",
39
- "@aws-sdk/types": "3.47.0",
40
- "@aws-sdk/url-parser": "3.47.0",
41
- "@aws-sdk/util-base64-browser": "3.47.0",
42
- "@aws-sdk/util-base64-node": "3.47.0",
43
- "@aws-sdk/util-body-length-browser": "3.47.0",
44
- "@aws-sdk/util-body-length-node": "3.47.0",
45
- "@aws-sdk/util-defaults-mode-browser": "3.47.0",
46
- "@aws-sdk/util-defaults-mode-node": "3.47.0",
47
- "@aws-sdk/util-user-agent-browser": "3.47.0",
48
- "@aws-sdk/util-user-agent-node": "3.47.0",
49
- "@aws-sdk/util-utf8-browser": "3.47.0",
50
- "@aws-sdk/util-utf8-node": "3.47.0",
21
+ "@aws-sdk/client-sts": "3.49.0",
22
+ "@aws-sdk/config-resolver": "3.49.0",
23
+ "@aws-sdk/credential-provider-node": "3.49.0",
24
+ "@aws-sdk/fetch-http-handler": "3.49.0",
25
+ "@aws-sdk/hash-node": "3.49.0",
26
+ "@aws-sdk/invalid-dependency": "3.49.0",
27
+ "@aws-sdk/middleware-content-length": "3.49.0",
28
+ "@aws-sdk/middleware-host-header": "3.49.0",
29
+ "@aws-sdk/middleware-logger": "3.49.0",
30
+ "@aws-sdk/middleware-retry": "3.49.0",
31
+ "@aws-sdk/middleware-serde": "3.49.0",
32
+ "@aws-sdk/middleware-signing": "3.49.0",
33
+ "@aws-sdk/middleware-stack": "3.49.0",
34
+ "@aws-sdk/middleware-user-agent": "3.49.0",
35
+ "@aws-sdk/node-config-provider": "3.49.0",
36
+ "@aws-sdk/node-http-handler": "3.49.0",
37
+ "@aws-sdk/protocol-http": "3.49.0",
38
+ "@aws-sdk/smithy-client": "3.49.0",
39
+ "@aws-sdk/types": "3.49.0",
40
+ "@aws-sdk/url-parser": "3.49.0",
41
+ "@aws-sdk/util-base64-browser": "3.49.0",
42
+ "@aws-sdk/util-base64-node": "3.49.0",
43
+ "@aws-sdk/util-body-length-browser": "3.49.0",
44
+ "@aws-sdk/util-body-length-node": "3.49.0",
45
+ "@aws-sdk/util-defaults-mode-browser": "3.49.0",
46
+ "@aws-sdk/util-defaults-mode-node": "3.49.0",
47
+ "@aws-sdk/util-user-agent-browser": "3.49.0",
48
+ "@aws-sdk/util-user-agent-node": "3.49.0",
49
+ "@aws-sdk/util-utf8-browser": "3.49.0",
50
+ "@aws-sdk/util-utf8-node": "3.49.0",
51
51
  "tslib": "^2.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@aws-sdk/service-client-documentation-generator": "3.47.0",
55
- "@types/node": "^12.7.5"
54
+ "@aws-sdk/service-client-documentation-generator": "3.49.0",
55
+ "@tsconfig/recommended": "1.0.1",
56
+ "@types/node": "^12.7.5",
57
+ "concurrently": "7.0.0",
58
+ "downlevel-dts": "0.7.0",
59
+ "rimraf": "3.0.2",
60
+ "typedoc": "0.19.2",
61
+ "typescript": "~4.3.5"
56
62
  },
57
63
  "engines": {
58
64
  "node": ">=12.0.0"