Class: AWSCDK::CodeBuild::S3ArtifactsProps
- Inherits:
-
ArtifactsProps
- Object
- ArtifactsProps
- AWSCDK::CodeBuild::S3ArtifactsProps
- Defined in:
- code_build/s3_artifacts_props.rb
Overview
Construction properties for S3Artifacts.
Instance Attribute Summary collapse
-
#bucket ⇒ AWSCDK::S3::IBucket
readonly
The name of the output bucket.
-
#encryption ⇒ Boolean?
readonly
If this is false, build output will not be encrypted.
-
#identifier ⇒ String?
readonly
The artifact identifier.
-
#include_build_id ⇒ Boolean?
readonly
Indicates if the build ID should be included in the path.
-
#name ⇒ String?
readonly
The name of the build output ZIP file or folder inside the bucket.
-
#package_zip ⇒ Boolean?
readonly
If this is true, all build output will be packaged into a single .zip file.
-
#path ⇒ String?
readonly
The path inside of the bucket for the build output .zip file or folder.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identifier: nil, bucket:, encryption: nil, include_build_id: nil, name: nil, package_zip: nil, path: nil) ⇒ S3ArtifactsProps
constructor
A new instance of S3ArtifactsProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(identifier: nil, bucket:, encryption: nil, include_build_id: nil, name: nil, package_zip: nil, path: nil) ⇒ S3ArtifactsProps
Returns a new instance of S3ArtifactsProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'code_build/s3_artifacts_props.rb', line 14 def initialize(identifier: nil, bucket:, encryption: nil, include_build_id: nil, name: nil, package_zip: nil, path: nil) @identifier = identifier Jsii::Type.check_type(@identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identifier") unless @identifier.nil? @bucket = bucket Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket") @encryption = encryption Jsii::Type.check_type(@encryption, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "encryption") unless @encryption.nil? @include_build_id = include_build_id Jsii::Type.check_type(@include_build_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "includeBuildId") unless @include_build_id.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @package_zip = package_zip Jsii::Type.check_type(@package_zip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "packageZip") unless @package_zip.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil? end |
Instance Attribute Details
#bucket ⇒ AWSCDK::S3::IBucket (readonly)
The name of the output bucket.
40 41 42 |
# File 'code_build/s3_artifacts_props.rb', line 40 def bucket @bucket end |
#encryption ⇒ Boolean? (readonly)
Default: true - output will be encrypted
If this is false, build output will not be encrypted.
This is useful if the artifact to publish a static website or sharing content with others
47 48 49 |
# File 'code_build/s3_artifacts_props.rb', line 47 def encryption @encryption end |
#identifier ⇒ String? (readonly)
The artifact identifier.
This property is required on secondary artifacts.
36 37 38 |
# File 'code_build/s3_artifacts_props.rb', line 36 def identifier @identifier end |
#include_build_id ⇒ Boolean? (readonly)
Default: true
Indicates if the build ID should be included in the path.
If this is set to true,
then the build artifact will be stored in "
55 56 57 |
# File 'code_build/s3_artifacts_props.rb', line 55 def include_build_id @include_build_id end |
#name ⇒ String? (readonly)
Default: undefined, and use the name from the buildspec
The name of the build output ZIP file or folder inside the bucket.
The full S3 object key will be "include_build_id is set to true.
If not set, override_artifact_name will be set and the name from the
buildspec will be used instead.
66 67 68 |
# File 'code_build/s3_artifacts_props.rb', line 66 def name @name end |
#package_zip ⇒ Boolean? (readonly)
Default: true - files will be archived
If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to
71 72 73 |
# File 'code_build/s3_artifacts_props.rb', line 71 def package_zip @package_zip end |
#path ⇒ String? (readonly)
Default: the root of the bucket
The path inside of the bucket for the build output .zip file or folder. If a value is not specified, then build output will be stored at the root of the bucket (or under the includeBuildId is set to true).
76 77 78 |
# File 'code_build/s3_artifacts_props.rb', line 76 def path @path end |
Class Method Details
.jsii_properties ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 |
# File 'code_build/s3_artifacts_props.rb', line 78 def self.jsii_properties { :identifier => "identifier", :bucket => "bucket", :encryption => "encryption", :include_build_id => "includeBuildId", :name => "name", :package_zip => "packageZip", :path => "path", } end |
Instance Method Details
#to_jsii ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'code_build/s3_artifacts_props.rb', line 90 def to_jsii result = {} result.merge!(super) result.merge!({ "identifier" => @identifier, "bucket" => @bucket, "encryption" => @encryption, "includeBuildId" => @include_build_id, "name" => @name, "packageZip" => @package_zip, "path" => @path, }) result.compact end |