# CfnContextProps

Properties for defining a `CfnContext`.

- Source: Generated code
- Type last changed: v2.264.0 · 10 Aug 2026

## 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 cfnContextProps: sagemaker.CfnContextProps = {
  contextName: 'contextName',
  contextType: 'contextType',
  source: {
    sourceUri: 'sourceUri',

    // the properties below are optional
    sourceId: 'sourceId',
    sourceType: 'sourceType',
  },

  // the properties below are optional
  description: 'description',
  properties: {
    propertiesKey: 'properties',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `contextName`: string (required) — The name of the context.

  Must be unique to your account in an AWS Region.

- `contextType`: string (required) — The context type.

- `description`: string — The description of the context.

- `properties`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — A list of properties to add to the context.

- `source`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnContext.SourceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnContext.SourceProperty.html) (required) — The source type, ID, and URI.

- `tags`: [CfnContext.TagsItemsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnContext.TagsItemsProperty.html)[] — A list of tags to apply to the context.

## Used as props by

- [`CfnContext`](/v2/docs/aws-cdk-lib.aws_sagemaker.CfnContext)
