CfnCodeRepositoryPropsMixin

class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnCodeRepositoryPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html

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:

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 = ['codeRepositoryName', 'gitConfig', 'tags']

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

GitConfigProperty

class CfnCodeRepositoryPropsMixin.GitConfigProperty(*, branch=None, repository_url=None, secret_arn=None)

Bases: object

Specifies 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 of AWSCURRENT and must be in the following format: {"username": *UserName* , "password": *Password* }

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.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_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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-branch

repository_url

The URL where the Git repository is located.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-repositoryurl

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 AWSCURRENT and must be in the following format:

{"username": *UserName* , "password": *Password* }

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-secretarn