Skip to content
v2.278.0

CfnImageProps Struct ​

Properties for defining a CfnImage.

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 cfnImageProps: sagemaker.CfnImageProps = {
  imageName: 'imageName',
  imageRoleArn: 'imageRoleArn',

  // the properties below are optional
  imageDescription: 'imageDescription',
  imageDisplayName: 'imageDisplayName',
  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_image_props = sagemaker.CfnImageProps(
    image_name="imageName",
    image_role_arn="imageRoleArn",

    # the properties below are optional
    image_description="imageDescription",
    image_display_name="imageDisplayName",
    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.*;

CfnImageProps cfnImageProps = CfnImageProps.builder()
        .imageName("imageName")
        .imageRoleArn("imageRoleArn")

        // the properties below are optional
        .imageDescription("imageDescription")
        .imageDisplayName("imageDisplayName")
        .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 cfnImageProps = new CfnImageProps {
    ImageName = "imageName",
    ImageRoleArn = "imageRoleArn",

    // the properties below are optional
    ImageDescription = "imageDescription",
    ImageDisplayName = "imageDisplayName",
    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"

cfnImageProps := &CfnImageProps{
	ImageName: jsii.String("imageName"),
	ImageRoleArn: jsii.String("imageRoleArn"),

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

Properties ​

imageDescriptionoptionalstringimage_descriptionoptionalstrimageDescriptionoptionalStringImageDescriptionoptionalstringImageDescriptionoptional*string #
The description of the image.
imageDisplayNameoptionalstringimage_display_nameoptionalstrimageDisplayNameoptionalStringImageDisplayNameoptionalstringImageDisplayNameoptional*string #
The display name of the image.

Length Constraints : Minimum length of 1. Maximum length of 128.

Pattern : ^\S(.*\S)?$

imageNamestringimage_namestrimageNameStringImageNamestringImageName*string required #
The name of the Image. Must be unique by region in your account.

Length Constraints : Minimum length of 1. Maximum length of 63.

Pattern : ^[a-zA-Z0-9]([-.]?[a-zA-Z0-9]){0,62}$

imageRoleArnstringimage_role_arnstrimageRoleArnStringImageRoleArnstringImageRoleArn*string required #
The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

Length Constraints : Minimum length of 20. Maximum length of 2048.

Pattern : ^arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A list of key-value pairs to apply to this resource.

Array Members : Minimum number of 0 items. Maximum number of 50 items.