Class BuildSpec
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.BuildSpec
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.697Z")
@Stability(Stable)
public abstract class BuildSpec
extends software.amazon.jsii.JsiiObject
BuildSpec for CodeBuild projects.
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Whether the buildspec is directly available or deferred until build-time.abstract String
Render the represented BuildSpec.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
BuildSpec
protected BuildSpec(software.amazon.jsii.JsiiObjectRef objRef) -
BuildSpec
protected BuildSpec(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BuildSpec
@Stability(Stable) protected BuildSpec()
-
-
Method Details
-
fromObject
@Stability(Stable) @NotNull public static BuildSpec fromObject(@NotNull Map<String, ? extends Object> value) - Parameters:
value
- This parameter is required.
-
fromObjectToYaml
@Stability(Stable) @NotNull public static BuildSpec fromObjectToYaml(@NotNull Map<String, ? extends Object> value) Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.- Parameters:
value
- the object containing the buildspec that will be rendered as YAML. This parameter is required.
-
fromSourceFilename
Use a file from the source as buildspec.Use this if you want to use a file different from 'buildspec.yml'`
- Parameters:
filename
- This parameter is required.
-
toBuildSpec
Render the represented BuildSpec. -
getIsImmediate
Whether the buildspec is directly available or deferred until build-time.
-