CfnCodeRepositoryPropsMixin
- class aws_cdk.cfn_property_mixins.aws_sagemaker.CfnCodeRepositoryPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a Git repository as a resource in your SageMaker AI account.
You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your SageMaker AI account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with.
The repository can be hosted either in AWS CodeCommit or in any other Git repository.
- See:
- CloudformationResource:
AWS::SageMaker::CodeRepository
- 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.cfn_property_mixins import aws_sagemaker as sagemaker import aws_cdk as cdk # merge_strategy: cdk.IMergeStrategy cfn_code_repository_props_mixin = sagemaker.CfnCodeRepositoryPropsMixin(sagemaker.CfnCodeRepositoryMixinProps( code_repository_name="codeRepositoryName", git_config=sagemaker.CfnCodeRepositoryPropsMixin.GitConfigProperty( branch="branch", repository_url="repositoryUrl", secret_arn="secretArn" ), tags=[cdk.CfnTag( key="key", value="value" )] ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::SageMaker::CodeRepository.- Parameters:
props (
Union[CfnCodeRepositoryMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['codeRepositoryName', 'gitConfig', 'tags']
Static Methods
- classmethod is_mixin(x)
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.
GitConfigProperty
- class CfnCodeRepositoryPropsMixin.GitConfigProperty(*, branch=None, repository_url=None, secret_arn=None)
Bases:
objectSpecifies configuration details for a Git repository in your AWS account.
- Parameters:
branch (
Optional[str]) – The default branch for the Git repository.repository_url (
Optional[str]) – The URL where the Git repository is located.secret_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label ofAWSCURRENTand must be in the following format:{"username": *UserName* , "password": *Password* }
- 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.cfn_property_mixins import aws_sagemaker as sagemaker git_config_property = sagemaker.CfnCodeRepositoryPropsMixin.GitConfigProperty( branch="branch", repository_url="repositoryUrl", secret_arn="secretArn" )
Attributes
- branch
The default branch for the Git repository.
- repository_url
The URL where the Git repository is located.
- secret_arn
The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials used to access the git repository.
The secret must have a staging label of
AWSCURRENTand must be in the following format:{"username": *UserName* , "password": *Password* }