Skip to content
v2.277.0

CfnCodeRepositoryProps Struct ​

Properties for defining a CfnCodeRepository.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnCodeRepositoryProps: sagemaker.CfnCodeRepositoryProps = {
  gitConfig: {
    repositoryUrl: 'repositoryUrl',

    // the properties below are optional
    branch: 'branch',
    secretArn: 'secretArn',
  },

  // the properties below are optional
  codeRepositoryName: 'codeRepositoryName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

cfn_code_repository_props = sagemaker.CfnCodeRepositoryProps(
    git_config=sagemaker.CfnCodeRepository.GitConfigProperty(
        repository_url="repositoryUrl",

        # the properties below are optional
        branch="branch",
        secret_arn="secretArn"
    ),

    # the properties below are optional
    code_repository_name="codeRepositoryName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

CfnCodeRepositoryProps cfnCodeRepositoryProps = CfnCodeRepositoryProps.builder()
        .gitConfig(GitConfigProperty.builder()
                .repositoryUrl("repositoryUrl")

                // the properties below are optional
                .branch("branch")
                .secretArn("secretArn")
                .build())

        // the properties below are optional
        .codeRepositoryName("codeRepositoryName")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var cfnCodeRepositoryProps = new CfnCodeRepositoryProps {
    GitConfig = new GitConfigProperty {
        RepositoryUrl = "repositoryUrl",

        // the properties below are optional
        Branch = "branch",
        SecretArn = "secretArn"
    },

    // the properties below are optional
    CodeRepositoryName = "codeRepositoryName",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnCodeRepositoryProps := &CfnCodeRepositoryProps{
	GitConfig: &GitConfigProperty{
		RepositoryUrl: jsii.String("repositoryUrl"),

		// the properties below are optional
		Branch: jsii.String("branch"),
		SecretArn: jsii.String("secretArn"),
	},

	// the properties below are optional
	CodeRepositoryName: jsii.String("codeRepositoryName"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

codeRepositoryNameoptionalstringcode_repository_nameoptionalstrcodeRepositoryNameoptionalStringCodeRepositoryNameoptionalstringCodeRepositoryNameoptional*string#
The name of the Git repository.
gitConfigIResolvable | CfnCodeRepository.GitConfigPropertygit_configtyping.Union[IResolvable, GitConfigProperty]gitConfigIResolvableGitConfigIResolvableGitConfiginterface{}required#
Configuration details for the Git repository, including the URL where it is located and the ARN of the AWS Secrets Manager secret that contains the credentials used to access the repository.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
List of tags for Code Repository.