@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:04.355Z") @Stability(value=Experimental) public abstract class BuildSpec extends software.amazon.jsii.JsiiObject
Example:
Bucket myCachingBucket;
Project.Builder.create(this, "Project")
.source(Source.bitBucket(BitBucketSourceProps.builder()
.owner("awslabs")
.repo("aws-cdk")
.build()))
.cache(Cache.bucket(myCachingBucket))
// BuildSpec with a 'cache' section necessary for S3 caching. This can
// also come from 'buildspec.yml' in your source.
.buildSpec(BuildSpec.fromObject(Map.of(
"version", "0.2",
"phases", Map.of(
"build", Map.of(
"commands", List.of("..."))),
"cache", Map.of(
"paths", List.of("/root/cachedir/**/*")))))
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
BuildSpec() |
protected |
BuildSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BuildSpec(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static BuildSpec |
fromObject(Map<String,? extends Object> value) |
static BuildSpec |
fromObjectToYaml(Map<String,? extends Object> value)
(experimental) Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
|
static BuildSpec |
fromSourceFilename(String filename)
(experimental) Use a file from the source as buildspec.
|
abstract Boolean |
getIsImmediate()
(experimental) Whether the buildspec is directly available or deferred until build-time.
|
abstract String |
toBuildSpec()
(experimental) Render the represented BuildSpec.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected BuildSpec(software.amazon.jsii.JsiiObjectRef objRef)
protected BuildSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) protected BuildSpec()
@Stability(value=Experimental) @NotNull public static BuildSpec fromObject(@NotNull Map<String,? extends Object> value)
value - This parameter is required.@Stability(value=Experimental) @NotNull public static BuildSpec fromObjectToYaml(@NotNull Map<String,? extends Object> value)
value - the object containing the buildspec that will be rendered as YAML. This parameter is required.@Stability(value=Experimental) @NotNull public static BuildSpec fromSourceFilename(@NotNull String filename)
Use this if you want to use a file different from 'buildspec.yml'`
filename - This parameter is required.@Stability(value=Experimental) @NotNull public abstract String toBuildSpec()
@Stability(value=Experimental) @NotNull public abstract Boolean getIsImmediate()
Copyright © 2022. All rights reserved.