CfnGitHubRepositoryPropsMixin
- class aws_cdk.mixins_preview.aws_codestar.mixins.CfnGitHubRepositoryPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CodeStar::GitHubRepositoryresource 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:
- 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:
props (
Union[CfnGitHubRepositoryMixinProps,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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CodeProperty
- class CfnGitHubRepositoryPropsMixin.CodeProperty(*, s3=None)
Bases:
objectThe
Codeproperty type specifies information about code to be committed.Codeis a property of theAWS::CodeStar::GitHubRepositoryresource.- 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:
- 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.
S3Property
- class CfnGitHubRepositoryPropsMixin.S3Property(*, bucket=None, key=None, object_version=None)
Bases:
objectThe
S3property type specifies information about the Amazon S3 bucket that contains the code to be committed to the new repository.S3is a property of theAWS::CodeStar::GitHubRepositoryresource.- 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:
- 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.
- key
The S3 object key or file name for the ZIP file.
- object_version
The object version of the ZIP file, if versioning is enabled for the Amazon S3 bucket.