SourceConfig Struct
Source information.
| Source | aws-s3-deployment/lib/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_s3 as s3 } from 'aws-cdk-lib';
import { aws_s3_deployment as s3_deployment } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
declare const markers: any;
const sourceConfig: s3_deployment.SourceConfig = {
bucket: bucket,
zipObjectKey: 'zipObjectKey',
// the properties below are optional
markers: {
markersKey: markers,
},
markersConfig: {
jsonEscape: false,
markerEncodings: {
markerEncodingsKey: s3_deployment.MarkerEncoding.LITERAL,
},
},
};
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_s3 as s3
from aws_cdk import aws_s3_deployment as s3_deployment
# bucket: s3.Bucket
# markers: Any
source_config = s3_deployment.SourceConfig(
bucket=bucket,
zip_object_key="zipObjectKey",
# the properties below are optional
markers={
"markers_key": markers
},
markers_config=s3_deployment.MarkersConfig(
json_escape=False,
marker_encodings={
"marker_encodings_key": s3_deployment.MarkerEncoding.LITERAL
}
)
)
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.s3.*;
import software.amazon.awscdk.services.s3.deployment.*;
Bucket bucket;
Object markers;
SourceConfig sourceConfig = SourceConfig.builder()
.bucket(bucket)
.zipObjectKey("zipObjectKey")
// the properties below are optional
.markers(Map.of(
"markersKey", markers))
.markersConfig(MarkersConfig.builder()
.jsonEscape(false)
.markerEncodings(Map.of(
"markerEncodingsKey", MarkerEncoding.LITERAL))
.build())
.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.S3;
using Amazon.CDK.AWS.S3.Deployment;
Bucket bucket;
var markers;
var sourceConfig = new SourceConfig {
Bucket = bucket,
ZipObjectKey = "zipObjectKey",
// the properties below are optional
Markers = new Dictionary<string, object> {
{ "markersKey", markers }
},
MarkersConfig = new MarkersConfig {
JsonEscape = false,
MarkerEncodings = new Dictionary<string, MarkerEncoding> {
{ "markerEncodingsKey", MarkerEncoding.LITERAL }
}
}
};
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 bucket Bucket
var markers interface{}
sourceConfig := &SourceConfig{
Bucket: bucket,
ZipObjectKey: jsii.String("zipObjectKey"),
// the properties below are optional
Markers: map[string]interface{}{
"markersKey": markers,
},
MarkersConfig: &MarkersConfig{
JsonEscape: jsii.Boolean(false),
MarkerEncodings: map[string]MarkerEncoding{
"markerEncodingsKey": awscdk.aws_s3_deployment.MarkerEncoding_LITERAL,
},
},
}
Properties
The source bucket to deploy from.
markersoptional{ [key: string]: any }markersoptionaltyping.Mapping[str, Any]markersoptionalMap<String, Object>MarkersoptionalIDictionary<string, object>Markersoptional*map[string]interface{} #A set of markers to substitute in the source content.
Default: no markers
Keys are the markers to replace, and values are the replacement CloudFormation expressions.
markersConfigoptionalMarkersConfigmarkers_configoptionalMarkersConfigmarkersConfigoptionalMarkersConfigMarkersConfigoptionalMarkersConfigMarkersConfigoptionalMarkersConfig #A configuration for markers substitution strategy.
Default: no configuration
zipObjectKeystringzip_object_keystrzipObjectKeyStringZipObjectKeystringZipObjectKey*string required #An S3 object key in the source bucket that points to a zip file.