Class CfnRepository

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-24T10:56:29.040Z") @Stability(Stable) public class CfnRepository extends CfnResource implements IInspectable, 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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      When you pass the logical ID of this resource, the function returns the Amazon Resource Name (ARN) of the repository.
    • getAttrCloneUrlHttp

      @Stability(Stable) @NotNull public String getAttrCloneUrlHttp()
      When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over HTTPS.
    • getAttrCloneUrlSsh

      @Stability(Stable) @NotNull public String getAttrCloneUrlSsh()
      When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over SSH.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      When you pass the logical ID of this resource, the function returns the repository's name.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getRepositoryName

      @Stability(Stable) @NotNull public String getRepositoryName()
      The name of the new repository to be created.
    • setRepositoryName

      @Stability(Stable) public void setRepositoryName(@NotNull String value)
      The name of the new repository to be created.
    • getCode

      @Stability(Stable) @Nullable public Object getCode()
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • setCode

      @Stability(Stable) public void setCode(@Nullable IResolvable value)
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • setCode

      @Stability(Stable) public void setCode(@Nullable CfnRepository.CodeProperty value)
      Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The ID of the AWS Key Management Service encryption key used to encrypt and decrypt the repository.
    • getRepositoryDescription

      @Stability(Stable) @Nullable public String getRepositoryDescription()
      A comment or description about the new repository.
    • setRepositoryDescription

      @Stability(Stable) public void setRepositoryDescription(@Nullable String value)
      A comment or description about the new repository.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      One or more tag key-value pairs to use when tagging this repository.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      One or more tag key-value pairs to use when tagging this repository.
    • getTriggers

      @Stability(Stable) @Nullable public Object getTriggers()
      The JSON block of configuration information for each trigger.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable IResolvable value)
      The JSON block of configuration information for each trigger.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable List<Object> value)
      The JSON block of configuration information for each trigger.