S3ArtifactsProps
- class aws_cdk.aws_codebuild.S3ArtifactsProps(*, identifier=None, bucket, encryption=None, include_build_id=None, name=None, package_zip=None, path=None)
Bases:
ArtifactsProps
Construction properties for
S3Artifacts
.- Parameters:
identifier (
Optional
[str
]) – The artifact identifier. This property is required on secondary artifacts.bucket (
IBucket
) – The name of the output bucket.encryption (
Optional
[bool
]) – 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 Default: true - output will be encryptedinclude_build_id (
Optional
[bool
]) – 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 “//”. Default: truename (
Optional
[str
]) – The name of the build output ZIP file or folder inside the bucket. The full S3 object key will be “//” or “/” depending on whetherincludeBuildId
is set to true. If not set,overrideArtifactName
will be set and the name from the buildspec will be used instead. Default: undefined, and use the name from the buildspecpackage_zip (
Optional
[bool
]) – If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to /. Default: true - files will be archivedpath (
Optional
[str
]) – 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 directory ifincludeBuildId
is set to true). Default: the root of the bucket
- ExampleMetadata:
infused
Example:
# bucket: s3.Bucket project = codebuild.Project(self, "MyProject", build_spec=codebuild.BuildSpec.from_object({ "version": "0.2" }), artifacts=codebuild.Artifacts.s3( bucket=bucket, include_build_id=False, package_zip=True, path="another/path", identifier="AddArtifact1" ) )
Attributes
- bucket
The name of the output bucket.
- encryption
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
- Default:
true - output will be encrypted
- identifier
The artifact identifier.
This property is required on secondary artifacts.
- include_build_id
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 “//”.
- Default:
true
- name
The name of the build output ZIP file or folder inside the bucket.
The full S3 object key will be “//” or “/” depending on whether
includeBuildId
is set to true.If not set,
overrideArtifactName
will be set and the name from the buildspec will be used instead.- Default:
undefined, and use the name from the buildspec
- package_zip
If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to /.
- Default:
true - files will be archived
- path
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 directory if
includeBuildId
is set to true).- Default:
the root of the bucket