- 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.
CreateEventActionCommand
This operation creates an event action.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataExchangeClient, CreateEventActionCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import
// const { DataExchangeClient, CreateEventActionCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import
const client = new DataExchangeClient(config);
const input = { // CreateEventActionRequest
Action: { // Action
ExportRevisionToS3: { // AutoExportRevisionToS3RequestDetails
Encryption: { // ExportServerSideEncryption
KmsKeyArn: "STRING_VALUE",
Type: "STRING_VALUE", // required
},
RevisionDestination: { // AutoExportRevisionDestinationEntry
Bucket: "STRING_VALUE", // required
KeyPattern: "STRING_VALUE",
},
},
},
Event: { // Event
RevisionPublished: { // RevisionPublished
DataSetId: "STRING_VALUE", // required
},
},
};
const command = new CreateEventActionCommand(input);
const response = await client.send(command);
// { // CreateEventActionResponse
// Action: { // Action
// ExportRevisionToS3: { // AutoExportRevisionToS3RequestDetails
// Encryption: { // ExportServerSideEncryption
// KmsKeyArn: "STRING_VALUE",
// Type: "STRING_VALUE", // required
// },
// RevisionDestination: { // AutoExportRevisionDestinationEntry
// Bucket: "STRING_VALUE", // required
// KeyPattern: "STRING_VALUE",
// },
// },
// },
// Arn: "STRING_VALUE",
// CreatedAt: new Date("TIMESTAMP"),
// Event: { // Event
// RevisionPublished: { // RevisionPublished
// DataSetId: "STRING_VALUE", // required
// },
// },
// Id: "STRING_VALUE",
// UpdatedAt: new Date("TIMESTAMP"),
// };
CreateEventActionCommand Input
See CreateEventActionCommandInput for more details
Parameter | Type | Description |
---|
CreateEventActionCommand Output
See CreateEventActionCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Action | Action | undefined | What occurs after a certain event. |
Arn | string | undefined | The ARN for the event action. |
CreatedAt | Date | undefined | The date and time that the event action was created, in ISO 8601 format. |
Event | Event | undefined | What occurs to start an action. |
Id | string | undefined | The unique identifier for the event action. |
UpdatedAt | Date | undefined | The date and time that the event action was last updated, in ISO 8601 format. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Access to the resource is denied. |
InternalServerException | server | An exception occurred with the service. |
ServiceLimitExceededException | client | The request has exceeded the quotas imposed by the service. |
ThrottlingException | client | The limit on the number of requests per second was exceeded. |
ValidationException | client | The request was invalid. |
DataExchangeServiceException | Base exception class for all service exceptions from DataExchange service. |