CfnRepositoryPropsMixin

class aws_cdk.mixins_preview.aws_codecommit.mixins.CfnRepositoryPropsMixin(props, *, strategy=None)

Bases: Mixin

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”

See:

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

CloudformationResource:

AWS::CodeCommit::Repository

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

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

cfn_repository_props_mixin = codecommit_mixins.CfnRepositoryPropsMixin(codecommit_mixins.CfnRepositoryMixinProps(
    code=codecommit_mixins.CfnRepositoryPropsMixin.CodeProperty(
        branch_name="branchName",
        s3=codecommit_mixins.CfnRepositoryPropsMixin.S3Property(
            bucket="bucket",
            key="key",
            object_version="objectVersion"
        )
    ),
    kms_key_id="kmsKeyId",
    repository_description="repositoryDescription",
    repository_name="repositoryName",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    triggers=[codecommit_mixins.CfnRepositoryPropsMixin.RepositoryTriggerProperty(
        branches=["branches"],
        custom_data="customData",
        destination_arn="destinationArn",
        events=["events"],
        name="name"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::CodeCommit::Repository.

Parameters:
  • props (Union[CfnRepositoryMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['code', 'kmsKeyId', 'repositoryDescription', 'repositoryName', 'tags', 'triggers']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CodeProperty

class CfnRepositoryPropsMixin.CodeProperty(*, branch_name=None, s3=None)

Bases: object

Information about code to be committed.

Parameters:
  • branch_name (Optional[str]) – Optional. Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.

  • s3 (Union[IResolvable, S3Property, Dict[str, Any], None]) – Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository. Changes to this property are ignored after initial resource creation.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

code_property = codecommit_mixins.CfnRepositoryPropsMixin.CodeProperty(
    branch_name="branchName",
    s3=codecommit_mixins.CfnRepositoryPropsMixin.S3Property(
        bucket="bucket",
        key="key",
        object_version="objectVersion"
    )
)

Attributes

branch_name

Optional.

Specifies a branch name to be used as the default branch when importing code into a repository on initial creation. If this property is not set, the name main will be used for the default branch for the repository. Changes to this property are ignored after initial resource creation. We recommend using this parameter to set the name to main to align with the default behavior of CodeCommit unless another name is needed.

See:

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

s3

Information about the Amazon S3 bucket that contains a ZIP file of code to be committed to the repository.

Changes to this property are ignored after initial resource creation.

See:

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

RepositoryTriggerProperty

class CfnRepositoryPropsMixin.RepositoryTriggerProperty(*, branches=None, custom_data=None, destination_arn=None, events=None, name=None)

Bases: object

Information about a trigger for a repository.

If you want to receive notifications about repository events, consider using notifications instead of triggers. For more information, see Configuring notifications for repository events .

Parameters:
  • branches (Optional[Sequence[str]]) – The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to all branches. .. epigraph:: Although no content is required in the array, you must include the array itself.

  • custom_data (Optional[str]) – Any custom data associated with the trigger to be included in the information sent to the target of the trigger.

  • destination_arn (Optional[str]) – The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).

  • events (Optional[Sequence[str]]) – The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS. .. epigraph:: The valid value “all” cannot be used with any other values.

  • name (Optional[str]) – The name of the trigger.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

repository_trigger_property = codecommit_mixins.CfnRepositoryPropsMixin.RepositoryTriggerProperty(
    branches=["branches"],
    custom_data="customData",
    destination_arn="destinationArn",
    events=["events"],
    name="name"
)

Attributes

branches

The branches to be included in the trigger configuration.

If you specify an empty array, the trigger applies to all branches. .. epigraph:

Although no content is required in the array, you must include the array itself.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-branches

custom_data

Any custom data associated with the trigger to be included in the information sent to the target of the trigger.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-customdata

destination_arn

The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-destinationarn

events

The repository events that cause the trigger to run actions in another service, such as sending a notification through Amazon SNS.

The valid value “all” cannot be used with any other values.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-events

name

The name of the trigger.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-repositorytrigger.html#cfn-codecommit-repository-repositorytrigger-name

S3Property

class CfnRepositoryPropsMixin.S3Property(*, bucket=None, key=None, object_version=None)

Bases: object

Information about the Amazon S3 bucket that contains the code that will be committed to the new repository.

Changes to this property are ignored after initial resource creation.

Parameters:
  • bucket (Optional[str]) – The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository. This can be specified using the name of the bucket in the AWS account . Changes to this property are ignored after initial resource creation.

  • key (Optional[str]) – The key to use for accessing the Amazon S3 bucket. Changes to this property are ignored after initial resource creation. For more information, see Creating object key names and Uploading objects in the Amazon S3 User Guide.

  • object_version (Optional[str]) – The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket. Changes to this property are ignored after initial resource creation.

See:

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

ExampleMetadata:

fixture=_generated

Example:

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

s3_property = codecommit_mixins.CfnRepositoryPropsMixin.S3Property(
    bucket="bucket",
    key="key",
    object_version="objectVersion"
)

Attributes

bucket

The name of the Amazon S3 bucket that contains the ZIP file with the content that will be committed to the new repository.

This can be specified using the name of the bucket in the AWS account . Changes to this property are ignored after initial resource creation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-bucket

key

The key to use for accessing the Amazon S3 bucket.

Changes to this property are ignored after initial resource creation. For more information, see Creating object key names and Uploading objects in the Amazon S3 User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-key

object_version

The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.

Changes to this property are ignored after initial resource creation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-s3.html#cfn-codecommit-repository-s3-objectversion