CfnGitHubRepositoryPropsMixin

class aws_cdk.mixins_preview.aws_codestar.mixins.CfnGitHubRepositoryPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::CodeStar::GitHubRepository resource creates a GitHub repository where users can store source code for use with AWS workflows.

You must provide a location for the source code ZIP file in the CloudFormation template, so the code can be uploaded to the created repository. You must have created a personal access token in GitHub to provide in the CloudFormation template. AWS uses this token to connect to GitHub on your behalf.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codestar-githubrepository.html

CloudformationResource:

AWS::CodeStar::GitHubRepository

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_codestar import mixins as codestar_mixins

cfn_git_hub_repository_props_mixin = codestar_mixins.CfnGitHubRepositoryPropsMixin(codestar_mixins.CfnGitHubRepositoryMixinProps(
    code=codestar_mixins.CfnGitHubRepositoryPropsMixin.CodeProperty(
        s3=codestar_mixins.CfnGitHubRepositoryPropsMixin.S3Property(
            bucket="bucket",
            key="key",
            object_version="objectVersion"
        )
    ),
    connection_arn="connectionArn",
    enable_issues=False,
    is_private=False,
    repository_access_token="repositoryAccessToken",
    repository_description="repositoryDescription",
    repository_name="repositoryName",
    repository_owner="repositoryOwner"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::CodeStar::GitHubRepository.

Parameters:

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', 'connectionArn', 'enableIssues', 'isPrivate', 'repositoryAccessToken', 'repositoryDescription', 'repositoryName', 'repositoryOwner']

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 CfnGitHubRepositoryPropsMixin.CodeProperty(*, s3=None)

Bases: object

The Code property type specifies information about code to be committed.

Code is a property of the AWS::CodeStar::GitHubRepository resource.

Parameters:

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestar-githubrepository-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_codestar import mixins as codestar_mixins

code_property = codestar_mixins.CfnGitHubRepositoryPropsMixin.CodeProperty(
    s3=codestar_mixins.CfnGitHubRepositoryPropsMixin.S3Property(
        bucket="bucket",
        key="key",
        object_version="objectVersion"
    )
)

Attributes

s3

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

See:

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

S3Property

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

Bases: object

The S3 property type specifies information about the Amazon S3 bucket that contains the code to be committed to the new repository.

S3 is a property of the AWS::CodeStar::GitHubRepository resource.

Parameters:
  • bucket (Optional[str]) – The name of the Amazon S3 bucket that contains the ZIP file with the content to be committed to the new repository.

  • key (Optional[str]) – The S3 object key or file name for the ZIP file.

  • object_version (Optional[str]) – The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestar-githubrepository-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_codestar import mixins as codestar_mixins

s3_property = codestar_mixins.CfnGitHubRepositoryPropsMixin.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 to be committed to the new repository.

See:

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

key

The S3 object key or file name for the ZIP file.

See:

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

object_version

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

See:

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