Class: AWSCDK::CodeBuild::CfnProject::ArtifactsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeBuild::CfnProject::ArtifactsProperty
- Defined in:
- code_build/cfn_project.rb
Overview
Artifacts is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
Instance Attribute Summary collapse
-
#artifact_identifier ⇒ String?
readonly
An identifier for this artifact definition.
-
#encryption_disabled ⇒ Boolean, ...
readonly
Set to true if you do not want your output artifacts encrypted.
-
#location ⇒ String?
readonly
Information about the build output artifact location:.
-
#name ⇒ String?
readonly
Along with
pathandnamespaceType, the pattern that AWS CodeBuild uses to name and store the output artifact:. -
#namespace_type ⇒ String?
readonly
Along with
pathandname, the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact: - Iftypeis set toCODEPIPELINE, CodePipeline ignores this value if specified. -
#override_artifact_name ⇒ Boolean, ...
readonly
If set to true a name specified in the buildspec file overrides the artifact name.
-
#packaging ⇒ String?
readonly
The type of build output artifact to create:.
-
#path ⇒ String?
readonly
Along with
namespaceTypeandname, the pattern that AWS CodeBuild uses to name and store the output artifact:. -
#type ⇒ String
readonly
The type of build output artifact.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, artifact_identifier: nil, encryption_disabled: nil, location: nil, name: nil, namespace_type: nil, override_artifact_name: nil, packaging: nil, path: nil) ⇒ ArtifactsProperty
constructor
A new instance of ArtifactsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, artifact_identifier: nil, encryption_disabled: nil, location: nil, name: nil, namespace_type: nil, override_artifact_name: nil, packaging: nil, path: nil) ⇒ ArtifactsProperty
Returns a new instance of ArtifactsProperty.
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'code_build/cfn_project.rb', line 881 def initialize(type:, artifact_identifier: nil, encryption_disabled: nil, location: nil, name: nil, namespace_type: nil, override_artifact_name: nil, packaging: nil, path: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @artifact_identifier = artifact_identifier Jsii::Type.check_type(@artifact_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "artifactIdentifier") unless @artifact_identifier.nil? @encryption_disabled = encryption_disabled Jsii::Type.check_type(@encryption_disabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "encryptionDisabled") unless @encryption_disabled.nil? @location = location Jsii::Type.check_type(@location, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "location") unless @location.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @namespace_type = namespace_type Jsii::Type.check_type(@namespace_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespaceType") unless @namespace_type.nil? @override_artifact_name = override_artifact_name Jsii::Type.check_type(@override_artifact_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "overrideArtifactName") unless @override_artifact_name.nil? @packaging = packaging Jsii::Type.check_type(@packaging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "packaging") unless @packaging.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil? end |
Instance Attribute Details
#artifact_identifier ⇒ String? (readonly)
An identifier for this artifact definition.
918 919 920 |
# File 'code_build/cfn_project.rb', line 918 def artifact_identifier @artifact_identifier end |
#encryption_disabled ⇒ Boolean, ... (readonly)
Set to true if you do not want your output artifacts encrypted.
This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an invalid_input_exception is thrown.
925 926 927 |
# File 'code_build/cfn_project.rb', line 925 def encryption_disabled @encryption_disabled end |
#location ⇒ String? (readonly)
Information about the build output artifact location:.
- If
typeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild . - If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - If
typeis set toS3, this is the name of the output bucket.
If you specify CODEPIPELINE or NO_ARTIFACTS for the Type property, don't specify this property. For all of the other types, you must specify this property.
936 937 938 |
# File 'code_build/cfn_project.rb', line 936 def location @location end |
#name ⇒ String? (readonly)
Along with path and namespaceType , the pattern that AWS CodeBuild uses to name and store the output artifact:.
- If
typeis set toCODEPIPELINE, AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . - If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - If
typeis set toS3, this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket.
For example:
- If
pathis set toMyArtifacts,namespace_typeis set toBUILD_ID, andnameis set toMyArtifact.zip, then the output artifact is stored inMyArtifacts/ *build-ID* /MyArtifact.zip. - If
pathis empty,namespace_typeis set toNONE, andnameis set to "/", the output artifact is stored in the root of the output bucket. - If
pathis set toMyArtifacts,namespace_typeis set toBUILD_ID, andnameis set to "/", the output artifact is stored inMyArtifacts/ *build-ID*.
If you specify CODEPIPELINE or NO_ARTIFACTS for the Type property, don't specify this property. For all of the other types, you must specify this property.
953 954 955 |
# File 'code_build/cfn_project.rb', line 953 def name @name end |
#namespace_type ⇒ String? (readonly)
Along with path and name , the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact: - If type is set to CODEPIPELINE , CodePipeline ignores this value if specified.
This is because CodePipeline manages its build output names instead of AWS CodeBuild .
- If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - If
typeis set toS3, valid values include: BUILD_ID: Include the build ID in the location of the build output artifact.NONE: Do not include the build ID. This is the default ifnamespace_typeis not specified.
For example, if path is set to MyArtifacts , namespace_type is set to BUILD_ID , and name is set to MyArtifact.zip , the output artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip .
967 968 969 |
# File 'code_build/cfn_project.rb', line 967 def namespace_type @namespace_type end |
#override_artifact_name ⇒ Boolean, ... (readonly)
If set to true a name specified in the buildspec file overrides the artifact name.
The name specified in a buildspec file is calculated at build time and uses the Shell command language. For example, you can append a date and time to your artifact name so that it is always unique.
974 975 976 |
# File 'code_build/cfn_project.rb', line 974 def override_artifact_name @override_artifact_name end |
#packaging ⇒ String? (readonly)
The type of build output artifact to create:.
- If
typeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of AWS CodeBuild . - If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - If
typeis set toS3, valid values include: NONE: AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default ifpackagingis not specified.ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains the build output.
985 986 987 |
# File 'code_build/cfn_project.rb', line 985 def packaging @packaging end |
#path ⇒ String? (readonly)
Along with namespaceType and name , the pattern that AWS CodeBuild uses to name and store the output artifact:.
- If
typeis set toCODEPIPELINE, CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . - If
typeis set toNO_ARTIFACTS, this value is ignored if specified, because no build output is produced. - If
typeis set toS3, this is the path to the output artifact. Ifpathis not specified,pathis not used.
For example, if path is set to MyArtifacts , namespace_type is set to NONE , and name is set to MyArtifact.zip , the output artifact is stored in the output bucket at MyArtifacts/MyArtifact.zip .
996 997 998 |
# File 'code_build/cfn_project.rb', line 996 def path @path end |
#type ⇒ String (readonly)
The type of build output artifact. Valid values include:.
CODEPIPELINE: The build project has build output generated through CodePipeline.
The
CODEPIPELINEtype is not supported forsecondary_artifacts.
NO_ARTIFACTS: The build project does not produce any build output.S3: The build project stores build output in Amazon S3.
913 914 915 |
# File 'code_build/cfn_project.rb', line 913 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 |
# File 'code_build/cfn_project.rb', line 998 def self.jsii_properties { :type => "type", :artifact_identifier => "artifactIdentifier", :encryption_disabled => "encryptionDisabled", :location => "location", :name => "name", :namespace_type => "namespaceType", :override_artifact_name => "overrideArtifactName", :packaging => "packaging", :path => "path", } end |
Instance Method Details
#to_jsii ⇒ Object
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'code_build/cfn_project.rb', line 1012 def to_jsii result = {} result.merge!({ "type" => @type, "artifactIdentifier" => @artifact_identifier, "encryptionDisabled" => @encryption_disabled, "location" => @location, "name" => @name, "namespaceType" => @namespace_type, "overrideArtifactName" => @override_artifact_name, "packaging" => @packaging, "path" => @path, }) result.compact end |