@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:28.457Z") @Stability(value=Stable) public abstract class BuildSpec extends software.amazon.jsii.JsiiObject
Example:
// later: PipelineProject project; Artifact sourceOutput = new Artifact(); CodeBuildAction buildAction = CodeBuildAction.Builder.create() .actionName("Build1") .input(sourceOutput) .project(PipelineProject.Builder.create(this, "Project") .buildSpec(BuildSpec.fromObject(Map.of( "version", "0.2", "env", Map.of( "exported-variables", List.of("MY_VAR")), "phases", Map.of( "build", Map.of( "commands", "export MY_VAR=\"some value\""))))) .build()) .variablesNamespace("MyNamespace") .build(); CodeBuildAction.Builder.create() .actionName("CodeBuild") .project(project) .input(sourceOutput) .environmentVariables(Map.of( "MyVar", BuildEnvironmentVariable.builder() .value(buildAction.variable("MY_VAR")) .build())) .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)
Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
|
static BuildSpec |
fromSourceFilename(String filename)
Use a file from the source as buildspec.
|
abstract Boolean |
getIsImmediate()
Whether the buildspec is directly available or deferred until build-time.
|
abstract String |
toBuildSpec()
Render the represented BuildSpec.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
protected BuildSpec(software.amazon.jsii.JsiiObjectRef objRef)
protected BuildSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected BuildSpec()
@Stability(value=Stable) @NotNull public static BuildSpec fromObject(@NotNull Map<String,? extends Object> value)
value
- This parameter is required.@Stability(value=Stable) @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=Stable) @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=Stable) @NotNull public abstract String toBuildSpec()
@Stability(value=Stable) @NotNull public abstract Boolean getIsImmediate()
Copyright © 2023. All rights reserved.