GetSubscriptionGrantCommand

Gets the subscription grant in Amazon DataZone.

Example Syntax

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

import { DataZoneClient, GetSubscriptionGrantCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, GetSubscriptionGrantCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // GetSubscriptionGrantInput
  domainIdentifier: "STRING_VALUE", // required
  identifier: "STRING_VALUE", // required
};
const command = new GetSubscriptionGrantCommand(input);
const response = await client.send(command);
// { // GetSubscriptionGrantOutput
//   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",
// };

GetSubscriptionGrantCommand Input

Parameter
Type
Description
domainIdentifier
Required
string | undefined

The ID of the Amazon DataZone domain in which the subscription grant exists.

identifier
Required
string | undefined

The ID of the subscription grant.

GetSubscriptionGrantCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
createdAt
Required
Date | undefined

The timestamp of when the subscription grant is created.

createdBy
Required
string | undefined

The Amazon DataZone user who created the subscription grant.

domainId
Required
string | undefined

The ID of the Amazon DataZone domain in which the subscription grant exists.

grantedEntity
Required
GrantedEntity | undefined

The entity to which the subscription is granted.

id
Required
string | undefined

The ID of the subscription grant.

status
Required
SubscriptionGrantOverallStatus | undefined

The status of the subscription grant.

subscriptionTargetId
Required
string | undefined

The subscription target ID associated with the subscription grant.

updatedAt
Required
Date | undefined

The timestamp of when the subscription grant was upated.

assets
SubscribedAsset[] | undefined

The assets for which the subscription grant is created.

subscriptionId
string | undefined

The identifier of the subscription.

updatedBy
string | undefined

The Amazon DataZone user who updated the subscription grant.

Throws

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.