Skip to content
v2.278.0

S3Property Struct ​

Information about the Amazon S3 bucket that contains the code that will be committed to the new repository.

Changes to this property are ignored after initial resource creation.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codecommit as codecommit } from 'aws-cdk-lib';
const s3Property: codecommit.CfnRepository.S3Property = {
  bucket: 'bucket',
  key: 'key',

  // the properties below are optional
  objectVersion: 'objectVersion',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codecommit as codecommit

s3_property = codecommit.CfnRepository.S3Property(
    bucket="bucket",
    key="key",

    # the properties below are optional
    object_version="objectVersion"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codecommit.*;

S3Property s3Property = S3Property.builder()
        .bucket("bucket")
        .key("key")

        // the properties below are optional
        .objectVersion("objectVersion")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeCommit;

var s3Property = new S3Property {
    Bucket = "bucket",
    Key = "key",

    // the properties below are optional
    ObjectVersion = "objectVersion"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

s3Property := &S3Property{
	Bucket: jsii.String("bucket"),
	Key: jsii.String("key"),

	// the properties below are optional
	ObjectVersion: jsii.String("objectVersion"),
}

Properties ​

bucketstringbucketstrbucketStringBucketstringBucket*string required #
The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository.

This can be specified using the name of the bucket in the AWS account . Changes to this property are ignored after initial resource creation.

keystringkeystrkeyStringKeystringKey*string required #
The key to use for accessing the Amazon S3 bucket.
notes

Changes to this property are ignored after initial resource creation. For more information, see Creating object key names and Uploading objects in the Amazon S3 User Guide.

objectVersionoptionalstringobject_versionoptionalstrobjectVersionoptionalStringObjectVersionoptionalstringObjectVersionoptional*string #
The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.

Changes to this property are ignored after initial resource creation.