aws.dataexchange.EventAction
Explore with Pulumi AI
Resource for managing an AWS Data Exchange Event Action.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.dataexchange.EventAction("example", {
    event: {
        revisionPublished: {
            dataSetId: exampleAwsDataexchangeDataSet.id,
        },
    },
    action: {
        exportRevisionToS3: {
            revisionDestination: {
                bucket: exampleAwsS3Bucket.bucket,
                keyPattern: "${Revision.CreatedAt}/${Asset.Name}",
            },
            encryption: {
                type: "aws:kms",
                kmsKeyArn: exampleAwsKmsKey.arn,
            },
        },
    },
});
import pulumi
import pulumi_aws as aws
example = aws.dataexchange.EventAction("example",
    event={
        "revision_published": {
            "data_set_id": example_aws_dataexchange_data_set["id"],
        },
    },
    action={
        "export_revision_to_s3": {
            "revision_destination": {
                "bucket": example_aws_s3_bucket["bucket"],
                "key_pattern": "${Revision.CreatedAt}/${Asset.Name}",
            },
            "encryption": {
                "type": "aws:kms",
                "kms_key_arn": example_aws_kms_key["arn"],
            },
        },
    })
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dataexchange"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dataexchange.NewEventAction(ctx, "example", &dataexchange.EventActionArgs{
			Event: &dataexchange.EventActionEventArgs{
				RevisionPublished: &dataexchange.EventActionEventRevisionPublishedArgs{
					DataSetId: pulumi.Any(exampleAwsDataexchangeDataSet.Id),
				},
			},
			Action: &dataexchange.EventActionActionArgs{
				ExportRevisionToS3: &dataexchange.EventActionActionExportRevisionToS3Args{
					RevisionDestination: &dataexchange.EventActionActionExportRevisionToS3RevisionDestinationArgs{
						Bucket:     pulumi.Any(exampleAwsS3Bucket.Bucket),
						KeyPattern: pulumi.String("${Revision.CreatedAt}/${Asset.Name}"),
					},
					Encryption: &dataexchange.EventActionActionExportRevisionToS3EncryptionArgs{
						Type:      pulumi.String("aws:kms"),
						KmsKeyArn: pulumi.Any(exampleAwsKmsKey.Arn),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = new Aws.DataExchange.EventAction("example", new()
    {
        Event = new Aws.DataExchange.Inputs.EventActionEventArgs
        {
            RevisionPublished = new Aws.DataExchange.Inputs.EventActionEventRevisionPublishedArgs
            {
                DataSetId = exampleAwsDataexchangeDataSet.Id,
            },
        },
        Action = new Aws.DataExchange.Inputs.EventActionActionArgs
        {
            ExportRevisionToS3 = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3Args
            {
                RevisionDestination = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3RevisionDestinationArgs
                {
                    Bucket = exampleAwsS3Bucket.Bucket,
                    KeyPattern = "${Revision.CreatedAt}/${Asset.Name}",
                },
                Encryption = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3EncryptionArgs
                {
                    Type = "aws:kms",
                    KmsKeyArn = exampleAwsKmsKey.Arn,
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dataexchange.EventAction;
import com.pulumi.aws.dataexchange.EventActionArgs;
import com.pulumi.aws.dataexchange.inputs.EventActionEventArgs;
import com.pulumi.aws.dataexchange.inputs.EventActionEventRevisionPublishedArgs;
import com.pulumi.aws.dataexchange.inputs.EventActionActionArgs;
import com.pulumi.aws.dataexchange.inputs.EventActionActionExportRevisionToS3Args;
import com.pulumi.aws.dataexchange.inputs.EventActionActionExportRevisionToS3RevisionDestinationArgs;
import com.pulumi.aws.dataexchange.inputs.EventActionActionExportRevisionToS3EncryptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new EventAction("example", EventActionArgs.builder()
            .event(EventActionEventArgs.builder()
                .revisionPublished(EventActionEventRevisionPublishedArgs.builder()
                    .dataSetId(exampleAwsDataexchangeDataSet.id())
                    .build())
                .build())
            .action(EventActionActionArgs.builder()
                .exportRevisionToS3(EventActionActionExportRevisionToS3Args.builder()
                    .revisionDestination(EventActionActionExportRevisionToS3RevisionDestinationArgs.builder()
                        .bucket(exampleAwsS3Bucket.bucket())
                        .keyPattern("${Revision.CreatedAt}/${Asset.Name}")
                        .build())
                    .encryption(EventActionActionExportRevisionToS3EncryptionArgs.builder()
                        .type("aws:kms")
                        .kmsKeyArn(exampleAwsKmsKey.arn())
                        .build())
                    .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: aws:dataexchange:EventAction
    properties:
      event:
        revisionPublished:
          dataSetId: ${exampleAwsDataexchangeDataSet.id}
      action:
        exportRevisionToS3:
          revisionDestination:
            bucket: ${exampleAwsS3Bucket.bucket}
            keyPattern: $${Revision.CreatedAt}/$${Asset.Name}
          encryption:
            type: aws:kms
            kmsKeyArn: ${exampleAwsKmsKey.arn}
Create EventAction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EventAction(name: string, args?: EventActionArgs, opts?: CustomResourceOptions);@overload
def EventAction(resource_name: str,
                args: Optional[EventActionArgs] = None,
                opts: Optional[ResourceOptions] = None)
@overload
def EventAction(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                action: Optional[EventActionActionArgs] = None,
                event: Optional[EventActionEventArgs] = None)func NewEventAction(ctx *Context, name string, args *EventActionArgs, opts ...ResourceOption) (*EventAction, error)public EventAction(string name, EventActionArgs? args = null, CustomResourceOptions? opts = null)
public EventAction(String name, EventActionArgs args)
public EventAction(String name, EventActionArgs args, CustomResourceOptions options)
type: aws:dataexchange:EventAction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args EventActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args EventActionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args EventActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EventActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EventActionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var eventActionResource = new Aws.DataExchange.EventAction("eventActionResource", new()
{
    Action = new Aws.DataExchange.Inputs.EventActionActionArgs
    {
        ExportRevisionToS3 = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3Args
        {
            Encryption = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3EncryptionArgs
            {
                KmsKeyArn = "string",
                Type = "string",
            },
            RevisionDestination = new Aws.DataExchange.Inputs.EventActionActionExportRevisionToS3RevisionDestinationArgs
            {
                Bucket = "string",
                KeyPattern = "string",
            },
        },
    },
    Event = new Aws.DataExchange.Inputs.EventActionEventArgs
    {
        RevisionPublished = new Aws.DataExchange.Inputs.EventActionEventRevisionPublishedArgs
        {
            DataSetId = "string",
        },
    },
});
example, err := dataexchange.NewEventAction(ctx, "eventActionResource", &dataexchange.EventActionArgs{
	Action: &dataexchange.EventActionActionArgs{
		ExportRevisionToS3: &dataexchange.EventActionActionExportRevisionToS3Args{
			Encryption: &dataexchange.EventActionActionExportRevisionToS3EncryptionArgs{
				KmsKeyArn: pulumi.String("string"),
				Type:      pulumi.String("string"),
			},
			RevisionDestination: &dataexchange.EventActionActionExportRevisionToS3RevisionDestinationArgs{
				Bucket:     pulumi.String("string"),
				KeyPattern: pulumi.String("string"),
			},
		},
	},
	Event: &dataexchange.EventActionEventArgs{
		RevisionPublished: &dataexchange.EventActionEventRevisionPublishedArgs{
			DataSetId: pulumi.String("string"),
		},
	},
})
var eventActionResource = new EventAction("eventActionResource", EventActionArgs.builder()
    .action(EventActionActionArgs.builder()
        .exportRevisionToS3(EventActionActionExportRevisionToS3Args.builder()
            .encryption(EventActionActionExportRevisionToS3EncryptionArgs.builder()
                .kmsKeyArn("string")
                .type("string")
                .build())
            .revisionDestination(EventActionActionExportRevisionToS3RevisionDestinationArgs.builder()
                .bucket("string")
                .keyPattern("string")
                .build())
            .build())
        .build())
    .event(EventActionEventArgs.builder()
        .revisionPublished(EventActionEventRevisionPublishedArgs.builder()
            .dataSetId("string")
            .build())
        .build())
    .build());
event_action_resource = aws.dataexchange.EventAction("eventActionResource",
    action={
        "export_revision_to_s3": {
            "encryption": {
                "kms_key_arn": "string",
                "type": "string",
            },
            "revision_destination": {
                "bucket": "string",
                "key_pattern": "string",
            },
        },
    },
    event={
        "revision_published": {
            "data_set_id": "string",
        },
    })
const eventActionResource = new aws.dataexchange.EventAction("eventActionResource", {
    action: {
        exportRevisionToS3: {
            encryption: {
                kmsKeyArn: "string",
                type: "string",
            },
            revisionDestination: {
                bucket: "string",
                keyPattern: "string",
            },
        },
    },
    event: {
        revisionPublished: {
            dataSetId: "string",
        },
    },
});
type: aws:dataexchange:EventAction
properties:
    action:
        exportRevisionToS3:
            encryption:
                kmsKeyArn: string
                type: string
            revisionDestination:
                bucket: string
                keyPattern: string
    event:
        revisionPublished:
            dataSetId: string
EventAction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The EventAction resource accepts the following input properties:
- Action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- Event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- Action
EventAction Action Args 
- Describes the action to take.
Described in actionConfiguration Block below.
- Event
EventAction Event Args 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- action
EventAction Action Args 
- Describes the action to take.
Described in actionConfiguration Block below.
- event
EventAction Event Args 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- action Property Map
- Describes the action to take.
Described in actionConfiguration Block below.
- event Property Map
- Describes the event that triggers the action. Described ineventConfiguration Block below.
Outputs
All input properties are implicitly available as output properties. Additionally, the EventAction resource produces the following output properties:
- arn str
- Amazon Resource Name (ARN) of the event action.
- created_at str
- Date and time when the resource was created.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_at str
- Data and time when the resource was last updated.
Look up Existing EventAction Resource
Get an existing EventAction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: EventActionState, opts?: CustomResourceOptions): EventAction@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[EventActionActionArgs] = None,
        arn: Optional[str] = None,
        created_at: Optional[str] = None,
        event: Optional[EventActionEventArgs] = None,
        updated_at: Optional[str] = None) -> EventActionfunc GetEventAction(ctx *Context, name string, id IDInput, state *EventActionState, opts ...ResourceOption) (*EventAction, error)public static EventAction Get(string name, Input<string> id, EventActionState? state, CustomResourceOptions? opts = null)public static EventAction get(String name, Output<String> id, EventActionState state, CustomResourceOptions options)resources:  _:    type: aws:dataexchange:EventAction    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- Arn string
- Amazon Resource Name (ARN) of the event action.
- CreatedAt string
- Date and time when the resource was created.
- Event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- UpdatedAt string
- Data and time when the resource was last updated.
- Action
EventAction Action Args 
- Describes the action to take.
Described in actionConfiguration Block below.
- Arn string
- Amazon Resource Name (ARN) of the event action.
- CreatedAt string
- Date and time when the resource was created.
- Event
EventAction Event Args 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- UpdatedAt string
- Data and time when the resource was last updated.
- action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- arn String
- Amazon Resource Name (ARN) of the event action.
- createdAt String
- Date and time when the resource was created.
- event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- updatedAt String
- Data and time when the resource was last updated.
- action
EventAction Action 
- Describes the action to take.
Described in actionConfiguration Block below.
- arn string
- Amazon Resource Name (ARN) of the event action.
- createdAt string
- Date and time when the resource was created.
- event
EventAction Event 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- updatedAt string
- Data and time when the resource was last updated.
- action
EventAction Action Args 
- Describes the action to take.
Described in actionConfiguration Block below.
- arn str
- Amazon Resource Name (ARN) of the event action.
- created_at str
- Date and time when the resource was created.
- event
EventAction Event Args 
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- updated_at str
- Data and time when the resource was last updated.
- action Property Map
- Describes the action to take.
Described in actionConfiguration Block below.
- arn String
- Amazon Resource Name (ARN) of the event action.
- createdAt String
- Date and time when the resource was created.
- event Property Map
- Describes the event that triggers the action. Described ineventConfiguration Block below.
- updatedAt String
- Data and time when the resource was last updated.
Supporting Types
EventActionAction, EventActionActionArgs      
- ExportRevision EventTo S3 Action Action Export Revision To S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
- ExportRevision EventTo S3 Action Action Export Revision To S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
- exportRevision EventTo S3 Action Action Export Revision To S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
- exportRevision EventTo S3 Action Action Export Revision To S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
- export_revision_ Eventto_ s3 Action Action Export Revision To S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
- exportRevision Property MapTo S3 
- Configuration for an Export Revision to S3 action.
Described in export_revision_to_s3Configuration Block
EventActionActionExportRevisionToS3, EventActionActionExportRevisionToS3Args              
- Encryption
EventAction Action Export Revision To S3Encryption 
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- RevisionDestination EventAction Action Export Revision To S3Revision Destination 
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
- Encryption
EventAction Action Export Revision To S3Encryption 
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- RevisionDestination EventAction Action Export Revision To S3Revision Destination 
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
- encryption
EventAction Action Export Revision To S3Encryption 
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- revisionDestination EventAction Action Export Revision To S3Revision Destination 
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
- encryption
EventAction Action Export Revision To S3Encryption 
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- revisionDestination EventAction Action Export Revision To S3Revision Destination 
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
- encryption
EventAction Action Export Revision To S3Encryption 
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- revision_destination EventAction Action Export Revision To S3Revision Destination 
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
- encryption Property Map
- Configures server-side encryption of the exported revision.
Described in encryptionConfiguration Block below.
- revisionDestination Property Map
- Configures the S3 destination of the exported revision.
Described in revision_destinationConfiguration Block below.
EventActionActionExportRevisionToS3Encryption, EventActionActionExportRevisionToS3EncryptionArgs              
- kms_key_ strarn 
- ARN of the KMS key used for encryption.
- type str
- Type of server-side encryption.
Valid values are aws:kmsoraws:s3.
EventActionActionExportRevisionToS3RevisionDestination, EventActionActionExportRevisionToS3RevisionDestinationArgs                
- Bucket string
- The S3 bucket where the revision will be exported.
- KeyPattern string
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
- Bucket string
- The S3 bucket where the revision will be exported.
- KeyPattern string
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
- bucket String
- The S3 bucket where the revision will be exported.
- keyPattern String
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
- bucket string
- The S3 bucket where the revision will be exported.
- keyPattern string
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
- bucket str
- The S3 bucket where the revision will be exported.
- key_pattern str
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
- bucket String
- The S3 bucket where the revision will be exported.
- keyPattern String
- Pattern for naming revisions in the S3 bucket.
Defaults to ${Revision.CreatedAt}/${Asset.Name}.
EventActionEvent, EventActionEventArgs      
- RevisionPublished EventAction Event Revision Published 
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
- RevisionPublished EventAction Event Revision Published 
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
- revisionPublished EventAction Event Revision Published 
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
- revisionPublished EventAction Event Revision Published 
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
- revision_published EventAction Event Revision Published 
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
- revisionPublished Property Map
- Configuration for a Revision Published event.
Described in revision_publishedConfiguration Block below.
EventActionEventRevisionPublished, EventActionEventRevisionPublishedArgs          
- DataSet stringId 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
- DataSet stringId 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
- dataSet StringId 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
- dataSet stringId 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
- data_set_ strid 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
- dataSet StringId 
- The ID of the data set to monitor for revision publications. Changing this value will recreate the resource.
Import
Using pulumi import, import Data Exchange Event Action using the id. For example:
$ pulumi import aws:dataexchange/eventAction:EventAction example example-event-action-id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.