S3SourceOptions Struct
Options for S3 sources.
| Source | pipelines/lib/codepipeline/codepipeline-source.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { pipelines } from 'aws-cdk-lib';
declare const role: iam.Role;
const s3SourceOptions: pipelines.S3SourceOptions = {
actionName: 'actionName',
role: role,
trigger: codepipeline_actions.S3Trigger.NONE,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codepipeline_actions as codepipeline_actions
from aws_cdk import aws_iam as iam
from aws_cdk import pipelines
# role: iam.Role
s3_source_options = pipelines.S3SourceOptions(
action_name="actionName",
role=role,
trigger=codepipeline_actions.S3Trigger.NONE
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codepipeline.actions.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.pipelines.*;
Role role;
S3SourceOptions s3SourceOptions = S3SourceOptions.builder()
.actionName("actionName")
.role(role)
.trigger(S3Trigger.NONE)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodePipeline.Actions;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.Pipelines;
Role role;
var s3SourceOptions = new S3SourceOptions {
ActionName = "actionName",
Role = role,
Trigger = S3Trigger.NONE
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var role Role
s3SourceOptions := &S3SourceOptions{
ActionName: jsii.String("actionName"),
Role: role,
Trigger: awscdk.Aws_codepipeline_actions.S3Trigger_NONE,
}
Properties
actionNameoptionalstringaction_nameoptionalstractionNameoptionalStringActionNameoptionalstringActionNameoptional*string #The action name used for this source in the CodePipeline.
Default: The bucket name
The role that will be assumed by the pipeline prior to executing the `S3Source` action.
Default: a new role will be generated
triggeroptionalS3TriggertriggeroptionalS3TriggertriggeroptionalS3TriggerTriggeroptionalS3TriggerTriggeroptionalS3Trigger = S3Trigger.POLL #How should CodePipeline detect source changes for this Action.
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.