- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListSubscriptionGrantsCommand
Lists subscription grants.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, ListSubscriptionGrantsCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, ListSubscriptionGrantsCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // ListSubscriptionGrantsInput
domainIdentifier: "STRING_VALUE", // required
environmentId: "STRING_VALUE",
subscriptionTargetId: "STRING_VALUE",
subscribedListingId: "STRING_VALUE",
subscriptionId: "STRING_VALUE",
owningProjectId: "STRING_VALUE",
sortBy: "CREATED_AT" || "UPDATED_AT",
sortOrder: "ASCENDING" || "DESCENDING",
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListSubscriptionGrantsCommand(input);
const response = await client.send(command);
// { // ListSubscriptionGrantsOutput
// items: [ // SubscriptionGrants // required
// { // SubscriptionGrantSummary
// id: "STRING_VALUE", // required
// createdBy: "STRING_VALUE", // required
// updatedBy: "STRING_VALUE",
// domainId: "STRING_VALUE", // required
// createdAt: new Date("TIMESTAMP"), // required
// updatedAt: new Date("TIMESTAMP"), // required
// subscriptionTargetId: "STRING_VALUE", // required
// grantedEntity: { // GrantedEntity Union: only one key present
// listing: { // ListingRevision
// id: "STRING_VALUE", // required
// revision: "STRING_VALUE", // required
// },
// },
// status: "PENDING" || "IN_PROGRESS" || "GRANT_FAILED" || "REVOKE_FAILED" || "GRANT_AND_REVOKE_FAILED" || "COMPLETED" || "INACCESSIBLE", // required
// assets: [ // SubscribedAssets
// { // SubscribedAsset
// assetId: "STRING_VALUE", // required
// assetRevision: "STRING_VALUE", // required
// status: "GRANT_PENDING" || "REVOKE_PENDING" || "GRANT_IN_PROGRESS" || "REVOKE_IN_PROGRESS" || "GRANTED" || "REVOKED" || "GRANT_FAILED" || "REVOKE_FAILED", // required
// targetName: "STRING_VALUE",
// failureCause: { // FailureCause
// message: "STRING_VALUE",
// },
// grantedTimestamp: new Date("TIMESTAMP"),
// failureTimestamp: new Date("TIMESTAMP"),
// assetScope: { // AssetScope
// assetId: "STRING_VALUE", // required
// filterIds: [ // FilterIds // required
// "STRING_VALUE",
// ],
// status: "STRING_VALUE", // required
// errorMessage: "STRING_VALUE",
// },
// },
// ],
// subscriptionId: "STRING_VALUE",
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListSubscriptionGrantsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainIdentifier Required | string | undefined | The identifier of the Amazon DataZone domain. |
environmentId | string | undefined | The identifier of the Amazon DataZone environment. |
maxResults | number | undefined | The maximum number of subscription grants to return in a single call to |
nextToken | string | undefined | When the number of subscription grants is greater than the default value for the |
owningProjectId | string | undefined | The ID of the owning project of the subscription grants. |
sortBy | SortKey | undefined | Specifies the way of sorting the results of this action. |
sortOrder | SortOrder | undefined | Specifies the sort order of this action. |
subscribedListingId | string | undefined | The identifier of the subscribed listing. |
subscriptionId | string | undefined | The identifier of the subscription. |
subscriptionTargetId | string | undefined | The identifier of the subscription target. |
ListSubscriptionGrantsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
items Required | SubscriptionGrantSummary[] | undefined | The results of the |
nextToken | string | undefined | When the number of subscription grants is greater than the default value for the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | The request has failed because of an unknown error, exception or failure. |
ResourceNotFoundException | client | The specified resource cannot be found. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input fails to satisfy the constraints specified by the Amazon Web Services service. |
UnauthorizedException | client | You do not have permission to perform this action. |
DataZoneServiceException | Base exception class for all service exceptions from DataZone service. |