CfnContextProps
Struct External
Properties for defining a CfnContext.
| Source | |
|---|---|
| Type last changed |
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',
}],
};
python
# 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_context_props = sagemaker.CfnContextProps(
context_name="contextName",
context_type="contextType",
source=sagemaker.CfnContext.SourceProperty(
source_uri="sourceUri",
# the properties below are optional
source_id="sourceId",
source_type="sourceType"
),
# the properties below are optional
description="description",
properties={
"properties_key": "properties"
},
tags=[sagemaker.CfnContext.TagsItemsProperty(
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.*;
CfnContextProps cfnContextProps = CfnContextProps.builder()
.contextName("contextName")
.contextType("contextType")
.source(SourceProperty.builder()
.sourceUri("sourceUri")
// the properties below are optional
.sourceId("sourceId")
.sourceType("sourceType")
.build())
// the properties below are optional
.description("description")
.properties(Map.of(
"propertiesKey", "properties"))
.tags(List.of(TagsItemsProperty.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 cfnContextProps = new CfnContextProps {
ContextName = "contextName",
ContextType = "contextType",
Source = new SourceProperty {
SourceUri = "sourceUri",
// the properties below are optional
SourceId = "sourceId",
SourceType = "sourceType"
},
// the properties below are optional
Description = "description",
Properties = new Dictionary<string, string> {
{ "propertiesKey", "properties" }
},
Tags = new [] { new TagsItemsProperty {
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"
cfnContextProps := &CfnContextProps{
ContextName: jsii.String("contextName"),
ContextType: jsii.String("contextType"),
Source: &SourceProperty{
SourceUri: jsii.String("sourceUri"),
// the properties below are optional
SourceId: jsii.String("sourceId"),
SourceType: jsii.String("sourceType"),
},
// the properties below are optional
Description: jsii.String("description"),
Properties: map[string]*string{
"propertiesKey": jsii.String("properties"),
},
Tags: []TagsItemsProperty{
&TagsItemsProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
The name of the context.
Must be unique to your account in an AWS Region.
The context type.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the context.
propertiesoptionalIResolvable | { [key: string]: string }propertiesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]propertiesoptionalIResolvablePropertiesoptionalIResolvablePropertiesoptionalinterface{} #A list of properties to add to the context.
sourceIResolvable | CfnContext.SourcePropertysourcetyping.Union[IResolvable, SourceProperty]sourceIResolvableSourceIResolvableSourceinterface{} required #The source type, ID, and URI.
tagsoptionalCfnContext.TagsItemsProperty[]tagsoptionaltyping.List[TagsItemsProperty]tagsoptionalList<TagsItemsProperty>TagsoptionalTagsItemsProperty[]Tagsoptional*[]TagsItemsProperty #A list of tags to apply to the context.