ListDistributedGrantsCommand

Lists the grants distributed for the specified license.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LicenseManagerClient, ListDistributedGrantsCommand } from "@aws-sdk/client-license-manager"; // ES Modules import
// const { LicenseManagerClient, ListDistributedGrantsCommand } = require("@aws-sdk/client-license-manager"); // CommonJS import
const client = new LicenseManagerClient(config);
const input = { // ListDistributedGrantsRequest
  GrantArns: [ // ArnList
    "STRING_VALUE",
  ],
  Filters: [ // FilterList
    { // Filter
      Name: "STRING_VALUE",
      Values: [ // FilterValues
        "STRING_VALUE",
      ],
    },
  ],
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListDistributedGrantsCommand(input);
const response = await client.send(command);
// { // ListDistributedGrantsResponse
//   Grants: [ // GrantList
//     { // Grant
//       GrantArn: "STRING_VALUE", // required
//       GrantName: "STRING_VALUE", // required
//       ParentArn: "STRING_VALUE", // required
//       LicenseArn: "STRING_VALUE", // required
//       GranteePrincipalArn: "STRING_VALUE", // required
//       HomeRegion: "STRING_VALUE", // required
//       GrantStatus: "PENDING_WORKFLOW" || "PENDING_ACCEPT" || "REJECTED" || "ACTIVE" || "FAILED_WORKFLOW" || "DELETED" || "PENDING_DELETE" || "DISABLED" || "WORKFLOW_COMPLETED", // required
//       StatusReason: "STRING_VALUE",
//       Version: "STRING_VALUE", // required
//       GrantedOperations: [ // AllowedOperationList // required
//         "CreateGrant" || "CheckoutLicense" || "CheckoutBorrowLicense" || "CheckInLicense" || "ExtendConsumptionLicense" || "ListPurchasedLicenses" || "CreateToken",
//       ],
//       Options: { // Options
//         ActivationOverrideBehavior: "DISTRIBUTED_GRANTS_ONLY" || "ALL_GRANTS_PERMITTED_BY_ISSUER",
//       },
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListDistributedGrantsCommand Input

Parameter
Type
Description
Filters
Filter[] | undefined

Filters to scope the results. The following filters are supported:

  • LicenseArn

  • GrantStatus

  • GranteePrincipalARN

  • ProductSKU

  • LicenseIssuerName

GrantArns
string[] | undefined

Amazon Resource Names (ARNs) of the grants.

MaxResults
number | undefined

Maximum number of results to return in a single call.

NextToken
string | undefined

Token for the next set of results.

ListDistributedGrantsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Grants
Grant[] | undefined

Distributed grant details.

NextToken
string | undefined

Token for the next set of results.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to resource denied.

AuthorizationException
client

The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.

InvalidParameterValueException
client

One or more parameter values are not valid.

RateLimitExceededException
client

Too many requests have been submitted. Try again after a brief wait.

ResourceLimitExceededException
client

Your resource limits have been exceeded.

ServerInternalException
server

The server experienced an internal error. Try again.

ValidationException
client

The provided input is not valid. Try your request again.

LicenseManagerServiceException
Base exception class for all service exceptions from LicenseManager service.