CfnCodeRepositoryPropsMixin
- class aws_cdk.mixins_preview.aws_sagemaker.mixins.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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cfn_code_repository_props_mixin = sagemaker_mixins.CfnCodeRepositoryPropsMixin(sagemaker_mixins.CfnCodeRepositoryMixinProps( code_repository_name="codeRepositoryName", git_config=sagemaker_mixins.CfnCodeRepositoryPropsMixin.GitConfigProperty( branch="branch", repository_url="repositoryUrl", secret_arn="secretArn" ), tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SageMaker::CodeRepository.- Parameters:
props (
Union[CfnCodeRepositoryMixinProps,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 = ['codeRepositoryName', 'gitConfig', 'tags']
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
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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins git_config_property = sagemaker_mixins.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* }