CfnRepositoryProps

class aws_cdk.aws_codecommit.CfnRepositoryProps(*, repository_name, code=None, repository_description=None, tags=None, triggers=None)

Bases: object

Properties for defining a CfnRepository.

Parameters
  • repository_name (str) – The name of the new repository to be created. .. epigraph:: 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.

  • code (Union[CodeProperty, IResolvable, None]) – 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. .. epigraph:: 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.

  • repository_description (Optional[str]) – A comment or description about the new repository. .. epigraph:: 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.

  • tags (Optional[Sequence[CfnTag]]) – One or more tag key-value pairs to use when tagging this repository.

  • triggers (Union[IResolvable, Sequence[Union[IResolvable, RepositoryTriggerProperty]], None]) – The JSON block of configuration information for each trigger.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_codecommit as codecommit

cfn_repository_props = codecommit.CfnRepositoryProps(
    repository_name="repositoryName",

    # the properties below are optional
    code=codecommit.CfnRepository.CodeProperty(
        s3=codecommit.CfnRepository.S3Property(
            bucket="bucket",
            key="key",

            # the properties below are optional
            object_version="objectVersion"
        ),

        # the properties below are optional
        branch_name="branchName"
    ),
    repository_description="repositoryDescription",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    triggers=[codecommit.CfnRepository.RepositoryTriggerProperty(
        destination_arn="destinationArn",
        events=["events"],
        name="name",

        # the properties below are optional
        branches=["branches"],
        custom_data="customData"
    )]
)

Attributes

code

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. .. epigraph:

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.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-code

Return type

Union[CodeProperty, IResolvable, None]

repository_description

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-repositorydescription

Return type

Optional[str]

repository_name

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-repositoryname

Return type

str

tags

One or more tag key-value pairs to use when tagging this repository.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-tags

Return type

Optional[List[CfnTag]]

triggers

The JSON block of configuration information for each trigger.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codecommit-repository.html#cfn-codecommit-repository-triggers

Return type

Union[IResolvable, List[Union[IResolvable, RepositoryTriggerProperty]], None]