- 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.
UpdateSubscriptionGrantStatusCommand
Updates the status of the specified subscription grant status in Amazon DataZone.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, UpdateSubscriptionGrantStatusCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, UpdateSubscriptionGrantStatusCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // UpdateSubscriptionGrantStatusInput
domainIdentifier: "STRING_VALUE", // required
identifier: "STRING_VALUE", // required
assetIdentifier: "STRING_VALUE", // required
status: "GRANT_PENDING" || "REVOKE_PENDING" || "GRANT_IN_PROGRESS" || "REVOKE_IN_PROGRESS" || "GRANTED" || "REVOKED" || "GRANT_FAILED" || "REVOKE_FAILED", // required
failureCause: { // FailureCause
message: "STRING_VALUE",
},
targetName: "STRING_VALUE",
};
const command = new UpdateSubscriptionGrantStatusCommand(input);
const response = await client.send(command);
// { // UpdateSubscriptionGrantStatusOutput
// 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",
// };
UpdateSubscriptionGrantStatusCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
assetIdentifier Required | string | undefined | The identifier of the asset the subscription grant status of which is to be updated. |
domainIdentifier Required | string | undefined | The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated. |
identifier Required | string | undefined | The identifier of the subscription grant the status of which is to be updated. |
status Required | SubscriptionGrantStatus | undefined | The status to be updated as part of the |
failureCause | FailureCause | undefined | Specifies the error message that is returned if the operation cannot be successfully completed. |
targetName | string | undefined | The target name to be updated as part of the |
UpdateSubscriptionGrantStatusCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
createdAt Required | Date | undefined | The timestamp of when the subscription grant status was created. |
createdBy Required | string | undefined | The Amazon DataZone domain user who created the subscription grant status. |
domainId Required | string | undefined | The identifier of the Amazon DataZone domain in which a subscription grant status is to be updated. |
grantedEntity Required | GrantedEntity | undefined | The granted entity to be updated as part of the |
id Required | string | undefined | The identifier of the subscription grant. |
status Required | SubscriptionGrantOverallStatus | undefined | The status to be updated as part of the |
subscriptionTargetId Required | string | undefined | The identifier of the subscription target whose subscription grant status is to be updated. |
updatedAt Required | Date | undefined | The timestamp of when the subscription grant status is to be updated. |
assets | SubscribedAsset[] | undefined | The details of the asset 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 status. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ConflictException | client | There is a conflict while performing 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. |