DeploymentSourceContext Struct
Bind context for ISources.
| Source | aws-s3-deployment/lib/source.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_s3_deployment as s3_deployment } from 'aws-cdk-lib';
declare const role: iam.Role;
const deploymentSourceContext: s3_deployment.DeploymentSourceContext = {
handlerRole: role,
};
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_iam as iam
from aws_cdk import aws_s3_deployment as s3_deployment
# role: iam.Role
deployment_source_context = s3_deployment.DeploymentSourceContext(
handler_role=role
)
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.iam.*;
import software.amazon.awscdk.services.s3.deployment.*;
Role role;
DeploymentSourceContext deploymentSourceContext = DeploymentSourceContext.builder()
.handlerRole(role)
.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.IAM;
using Amazon.CDK.AWS.S3.Deployment;
Role role;
var deploymentSourceContext = new DeploymentSourceContext {
HandlerRole = role
};
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"
var role Role
deploymentSourceContext := &DeploymentSourceContext{
HandlerRole: role,
}