Class CfnRepository
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::CodeCommit::Repository.
Creates a new, empty repository.
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())
.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();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnRepository(Construct scope, String id, CfnRepositoryProps props) Create a newAWS::CodeCommit::Repository.protectedCfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRepository(software.amazon.jsii.JsiiObjectRef objRef) -
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.A comment or description about the new repository.The name of the new repository to be created.getTags()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.voidsetRepositoryDescription(String value) A comment or description about the new repository.voidsetRepositoryName(String value) The name of the new repository to be created.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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnRepositoryProps props) Create a newAWS::CodeCommit::Repository.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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. -
getAttrName
When you pass the logical ID of this resource, the function returns the repository's name. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
One or more tag key-value pairs to use when tagging this repository. -
getRepositoryName
The name of the new repository to be created.The repository name must be unique across the calling AWS account . Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see Quotas in the AWS CodeCommit User Guide . The suffix .git is prohibited.
-
setRepositoryName
The name of the new repository to be created.The repository name must be unique across the calling AWS account . Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see Quotas in the AWS CodeCommit User Guide . The suffix .git is prohibited.
-
getCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
You can only use this property to add code when creating a repository with a AWS CloudFormation template at creation time. This property cannot be used for updating code to an existing repository.
-
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
You can only use this property to add code when creating a repository with a AWS CloudFormation template at creation time. This property cannot be used for updating code to an existing repository.
-
setCode
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.Information about code is only used in resource creation. Updates to a stack will not reflect changes made to code properties after initial resource creation.
You can only use this property to add code when creating a repository with a AWS CloudFormation template at creation time. This property cannot be used for updating code to an existing repository.
-
getRepositoryDescription
A comment or description about the new repository.The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
-
setRepositoryDescription
A comment or description about the new repository.The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.
-
getTriggers
The JSON block of configuration information for each trigger. -
setTriggers
The JSON block of configuration information for each trigger. -
setTriggers
The JSON block of configuration information for each trigger.
-