@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.133Z") public class CfnRepository extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnRepository.Builder
A fluent builder for
CfnRepository . |
static interface |
CfnRepository.CodeProperty
Information about code to be committed.
|
static interface |
CfnRepository.RepositoryTriggerProperty
Information about a trigger for a repository.
|
static interface |
CfnRepository.S3Property
Information about the Amazon S3 bucket that contains the code that will be committed to the new repository.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnRepository(Construct scope,
java.lang.String id,
CfnRepositoryProps props)
Create a new `AWS::CodeCommit::Repository`.
|
protected |
CfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRepository(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
When you pass the logical ID of this resource, the function returns the Amazon Resource Name (ARN) of the repository.
|
java.lang.String |
getAttrCloneUrlHttp()
When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over HTTPS.
|
java.lang.String |
getAttrCloneUrlSsh()
When you pass the logical ID of this resource, the function returns the URL to use for cloning the repository over SSH.
|
java.lang.String |
getAttrName()
When you pass the logical ID of this resource, the function returns the repository's name.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getCode()
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
java.lang.String |
getRepositoryDescription()
A comment or description about the new repository.
|
java.lang.String |
getRepositoryName()
The name of the new repository to be created.
|
TagManager |
getTags()
One or more tag key-value pairs to use when tagging this repository.
|
java.lang.Object |
getTriggers()
The JSON block of configuration information for each trigger.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCode(CfnRepository.CodeProperty value)
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
void |
setCode(IResolvable value)
Information about code to be committed to a repository after it is created in an AWS CloudFormation stack.
|
void |
setRepositoryDescription(java.lang.String value)
A comment or description about the new repository.
|
void |
setRepositoryName(java.lang.String value)
The name of the new repository to be created.
|
void |
setTriggers(IResolvable value)
The JSON block of configuration information for each trigger.
|
void |
setTriggers(java.util.List<java.lang.Object> value)
The JSON block of configuration information for each trigger.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnRepository(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRepository(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnRepository(Construct scope, java.lang.String id, CfnRepositoryProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrCloneUrlHttp()
public java.lang.String getAttrCloneUrlSsh()
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getRepositoryName()
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.
public void setRepositoryName(java.lang.String value)
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.
public java.lang.Object getCode()
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.
public void setCode(CfnRepository.CodeProperty value)
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.
public void setCode(IResolvable value)
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.
public java.lang.String getRepositoryDescription()
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.
public void setRepositoryDescription(java.lang.String value)
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.
public java.lang.Object getTriggers()
public void setTriggers(IResolvable value)
public void setTriggers(java.util.List<java.lang.Object> value)