Class S3SourceActionProps
Construction properties of the {@link S3SourceAction S3 source Action}.
Inheritance
Namespace: Amazon.CDK.AWS.CodePipeline.Actions
Assembly: Amazon.CDK.AWS.CodePipeline.Actions.dll
Syntax (csharp)
public class S3SourceActionProps : Object, IS3SourceActionProps, ICommonAwsActionProps, ICommonActionProps
Syntax (vb)
Public Class S3SourceActionProps
Inherits Object
Implements IS3SourceActionProps, 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
Constructors
S3SourceActionProps() |
Properties
ActionName | The physical, human-readable name of the Action. |
Bucket | The Amazon S3 bucket that stores the source code. |
BucketKey | The key within the S3 bucket that stores the source code. |
Output | |
Role | The Role in which context's this Action will be executing in. |
RunOrder | The runOrder property for this Action. |
Trigger | How should CodePipeline detect source changes for this Action. |
VariablesNamespace | The name of the namespace to use for variables emitted by this action. |
Constructors
S3SourceActionProps()
public S3SourceActionProps()
Properties
ActionName
The physical, human-readable name of the Action.
public string ActionName { get; set; }
Property Value
System.String
Remarks
Note that Action names must be unique within a single Stage.
Bucket
The Amazon S3 bucket that stores the source code.
public IBucket Bucket { get; set; }
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.
public string BucketKey { get; set; }
Property Value
System.String
Examples
"path/to/file.zip";
Output
Role
The Role in which context's this Action will be executing in.
public IRole Role { get; set; }
Property Value
Remarks
The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your {@link IAction.bind} method in the {@link ActionBindOptions.role} property.
Default: a new Role will be generated
RunOrder
The runOrder property for this Action.
public Nullable<double> RunOrder { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
RunOrder determines the relative order in which multiple Actions in the same Stage execute.
Default: 1
See: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
Trigger
How should CodePipeline detect source changes for this Action.
public Nullable<S3Trigger> Trigger { get; set; }
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
VariablesNamespace
The name of the namespace to use for variables emitted by this action.
public string VariablesNamespace { get; set; }
Property Value
System.String
Remarks
Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set