# CfnCodeRepositoryPropsMixin

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](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository.

Extends: [Mixin](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Mixin.html) › CfnCodeRepositoryPropsMixin
Implements: [IMixin](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IMixin.html)

- CloudFormation: [`AWS::SageMaker::CodeRepository`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-sagemaker-coderepository.html)
- Source: Generated at build time
- Type last changed: v2.269.0 · 16 Sep 2026

## Initializer

TypeScript:

```ts
new CfnCodeRepositoryPropsMixin(props: CfnCodeRepositoryMixinProps, options?: CfnPropertyMixinOptions)
```

Python:

```python
CfnCodeRepositoryPropsMixin(props: CfnCodeRepositoryMixinProps, options: typing.Optional[CfnPropertyMixinOptions] = None)
```

Java:

```java
new CfnCodeRepositoryPropsMixin(CfnCodeRepositoryMixinProps props, CfnPropertyMixinOptions options)
```

C# / .NET:

```csharp
new CfnCodeRepositoryPropsMixin(CfnCodeRepositoryMixinProps props, CfnPropertyMixinOptions? options = null)
```

Golang:

```go
NewCfnCodeRepositoryPropsMixin(Props CfnCodeRepositoryMixinProps, Options CfnPropertyMixinOptions)
```

## Methods

- `applyTo(construct: IConstruct): void` — Apply the mixin properties to the construct.

- `isMixin(x: any): boolean` (static) — Checks if `x` is a Mixin.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Mixin`.

- `supports(construct: IConstruct): boolean` — Check if this mixin supports the given construct.
