Class CfnProject.ArtifactsProperty
Artifacts
is a property of the AWS::CodeBuild::Project resource that specifies output settings for artifacts generated by an AWS CodeBuild build.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public class ArtifactsProperty : Object, CfnProject.IArtifactsProperty
Syntax (vb)
Public Class ArtifactsProperty
Inherits Object
Implements CfnProject.IArtifactsProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
var artifactsProperty = new ArtifactsProperty {
Type = "type",
// the properties below are optional
ArtifactIdentifier = "artifactIdentifier",
EncryptionDisabled = false,
Location = "location",
Name = "name",
NamespaceType = "namespaceType",
OverrideArtifactName = false,
Packaging = "packaging",
Path = "path"
};
Synopsis
Constructors
ArtifactsProperty() |
Properties
ArtifactIdentifier | An identifier for this artifact definition. |
EncryptionDisabled | Set to true if you do not want your output artifacts encrypted. |
Location | Information about the build output artifact location:. |
Name | Along with |
NamespaceType | Along with |
OverrideArtifactName | If set to true a name specified in the buildspec file overrides the artifact name. |
Packaging | The type of build output artifact to create:. |
Path | Along with |
Type | The type of build output artifact. Valid values include:. |
Constructors
ArtifactsProperty()
public ArtifactsProperty()
Properties
ArtifactIdentifier
An identifier for this artifact definition.
public string ArtifactIdentifier { get; set; }
Property Value
System.String
Remarks
EncryptionDisabled
Set to true if you do not want your output artifacts encrypted.
public object EncryptionDisabled { get; set; }
Property Value
System.Object
Remarks
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 invalidInputException
is thrown.
Location
Information about the build output artifact location:.
public string Location { get; set; }
Property Value
System.String
Remarks
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.
Name
Along with path
and namespaceType
, the pattern that AWS CodeBuild uses to name and store the output artifact:.
public string Name { get; set; }
Property Value
System.String
Remarks
For example:
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.
NamespaceType
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.
public string NamespaceType { get; set; }
Property Value
System.String
Remarks
This is because CodePipeline manages its build output names instead of AWS CodeBuild .
For example, if path
is set to MyArtifacts
, namespaceType
is set to BUILD_ID
, and name
is set to MyArtifact.zip
, the output artifact is stored in MyArtifacts/<build-ID>/MyArtifact.zip
.
OverrideArtifactName
If set to true a name specified in the buildspec file overrides the artifact name.
public object OverrideArtifactName { get; set; }
Property Value
System.Object
Remarks
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.
Packaging
The type of build output artifact to create:.
public string Packaging { get; set; }
Property Value
System.String
Remarks
Path
Along with namespaceType
and name
, the pattern that AWS CodeBuild uses to name and store the output artifact:.
public string Path { get; set; }
Property Value
System.String
Remarks
For example, if path
is set to MyArtifacts
, namespaceType
is set to NONE
, and name
is set to MyArtifact.zip
, the output artifact is stored in the output bucket at MyArtifacts/MyArtifact.zip
.
Type
The type of build output artifact. Valid values include:.
public string Type { get; set; }
Property Value
System.String
Remarks
The <code>CODEPIPELINE</code> type is not supported for <code>secondaryArtifacts</code> .