Class CfnRepository
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.codecommit.CfnRepository
- All Implemented Interfaces:
IInspectable,ITaggable,IRepositoryRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:33.557Z")
@Stability(Stable)
public class CfnRepository
extends CfnResource
implements IInspectable, IRepositoryRef, ITaggable
Creates a new, empty repository.
AWS CodeCommit is no longer available to new customers. Existing customers of AWS CodeCommit can continue to use the service as normal. Learn more"
Example:
// 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.*;
CfnRepository cfnRepository = CfnRepository.Builder.create(this, "MyCfnRepository")
.repositoryName("repositoryName")
// the properties below are optional
.code(CodeProperty.builder()
.s3(S3Property.builder()
.bucket("bucket")
.key("key")
// the properties below are optional
.objectVersion("objectVersion")
.build())
// the properties below are optional
.branchName("branchName")
.build())
.kmsKeyId("kmsKeyId")
.repositoryDescription("repositoryDescription")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.triggers(List.of(RepositoryTriggerProperty.builder()
.destinationArn("destinationArn")
.events(List.of("events"))
.name("name")
// the properties below are optional
.branches(List.of("branches"))
.customData("customData")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRepository.static interfaceInformation about code to be committed.static interfaceInformation about a trigger for a repository.static interfaceInformation about the Amazon S3 bucket that contains the code that will be committed to the new repository.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.codecommit.IRepositoryRef
IRepositoryRef.Jsii$Default, IRepositoryRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRepository(software.amazon.jsii.JsiiObjectRef objRef) CfnRepository(software.constructs.Construct scope, String id, CfnRepositoryProps props) -
Method Summary
Modifier and TypeMethodDescriptionWhen you pass the logical ID of this resource, the function returns the Amazon Resource Name (ARN) of the repository.When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over HTTPS.When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over SSH.When you pass the logical ID of this resource, the function returns the repository's name.getCode()Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.A comment or description about the new repository.The name of the new repository to be created.A reference to a Repository resource.getTags()Tag Manager which manages the tags for this resource.One or more tag key-value pairs to use when tagging this repository.The JSON block of configuration information for each trigger.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetCode(IResolvable value) Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.voidInformation about code to be committed to a repository after it is created in an AWS CloudFormation stack.voidsetKmsKeyId(String value) The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.voidsetRepositoryDescription(String value) A comment or description about the new repository.voidsetRepositoryName(String value) The name of the new repository to be created.voidsetTagsRaw(List<CfnTag> value) One or more tag key-value pairs to use when tagging this repository.voidsetTriggers(List<Object> value) The JSON block of configuration information for each trigger.voidsetTriggers(IResolvable value) The JSON block of configuration information for each trigger.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnRepository
protected CfnRepository(software.amazon.jsii.JsiiObjectRef objRef) -
CfnRepository
protected CfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnRepository
@Stability(Stable) public CfnRepository(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnRepositoryProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
When you pass the logical ID of this resource, the function returns the Amazon Resource Name (ARN) of the repository. -
getAttrCloneUrlHttp
When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over HTTPS. -
getAttrCloneUrlSsh
When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over SSH. -
getAttrId
-
getAttrName
When you pass the logical ID of this resource, the function returns the repository's name. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getRepositoryRef
A reference to a Repository resource.- Specified by:
getRepositoryRefin interfaceIRepositoryRef
-
getTags
Tag Manager which manages the tags for this resource. -
getRepositoryName
The name of the new repository to be created. -
setRepositoryName
The name of the new repository to be created. -
getCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Returns union: either
IResolvableorCfnRepository.CodeProperty -
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. -
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack. -
getKmsKeyId
The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository. -
setKmsKeyId
The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository. -
getRepositoryDescription
A comment or description about the new repository. -
setRepositoryDescription
A comment or description about the new repository. -
getTagsRaw
One or more tag key-value pairs to use when tagging this repository. -
setTagsRaw
One or more tag key-value pairs to use when tagging this repository. -
getTriggers
The JSON block of configuration information for each trigger.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnRepository.RepositoryTriggerProperty> -
setTriggers
The JSON block of configuration information for each trigger. -
setTriggers
The JSON block of configuration information for each trigger.
-