Interface IS3SourceActionProps
Construction properties of the S3SourceAction S3 source Action
.
Inherited Members
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IS3SourceActionProps : ICommonAwsActionProps, ICommonActionProps
Syntax (vb)
Public Interface IS3SourceActionProps
Inherits ICommonAwsActionProps, ICommonActionProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudTrail;
Bucket sourceBucket;
var sourceOutput = new Artifact();
var key = "some/key.zip";
var trail = new Trail(this, "CloudTrail");
trail.AddS3EventSelector(new [] { new S3EventSelector {
Bucket = sourceBucket,
ObjectPrefix = key
} }, new AddEventSelectorOptions {
ReadWriteType = ReadWriteType.WRITE_ONLY
});
var sourceAction = new S3SourceAction(new S3SourceActionProps {
ActionName = "S3Source",
BucketKey = key,
Bucket = sourceBucket,
Output = sourceOutput,
Trigger = S3Trigger.EVENTS
});
Synopsis
Properties
Bucket | The Amazon S3 bucket that stores the source code. |
BucketKey | The key within the S3 bucket that stores the source code. |
Output | |
Trigger | How should CodePipeline detect source changes for this Action. |
Properties
Bucket
The Amazon S3 bucket that stores the source code.
IBucket Bucket { get; }
Property Value
Remarks
If you import an encrypted bucket in your stack, please specify
the encryption key at import time by using Bucket.fromBucketAttributes()
method.
BucketKey
The key within the S3 bucket that stores the source code.
string BucketKey { get; }
Property Value
System.String
Examples
"path/to/file.zip";
Output
Trigger
How should CodePipeline detect source changes for this Action.
virtual Nullable<S3Trigger> Trigger { get; }
Property Value
System.Nullable<S3Trigger>
Remarks
Note that if this is S3Trigger.EVENTS, you need to make sure to include the source Bucket in a CloudTrail Trail, as otherwise the CloudWatch Events will not be emitted.
Default: S3Trigger.POLL
See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/log-s3-data-events.html