Class: AWSCDK::Sagemaker::CfnImageProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sagemaker/cfn_image_props.rb

Overview

Properties for defining a CfnImage.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image_name:, image_role_arn:, image_description: nil, image_display_name: nil, tags: nil) ⇒ CfnImageProps

Returns a new instance of CfnImageProps.

Parameters:

  • image_name (String)

    The name of the Image. Must be unique by region in your account.

  • image_role_arn (String)

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

  • image_description (String, nil) (defaults to: nil)

    The description of the image.

  • image_display_name (String, nil) (defaults to: nil)

    The display name of the image.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    A list of key-value pairs to apply to this resource.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'sagemaker/cfn_image_props.rb', line 14

def initialize(image_name:, image_role_arn:, image_description: nil, image_display_name: nil, tags: nil)
  @image_name = image_name
  Jsii::Type.check_type(@image_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageName")
  @image_role_arn = image_role_arn
  Jsii::Type.check_type(@image_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageRoleArn")
  @image_description = image_description
  Jsii::Type.check_type(@image_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageDescription") unless @image_description.nil?
  @image_display_name = image_display_name
  Jsii::Type.check_type(@image_display_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageDisplayName") unless @image_display_name.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#image_descriptionString? (readonly)

The description of the image.



49
50
51
# File 'sagemaker/cfn_image_props.rb', line 49

def image_description
  @image_description
end

#image_display_nameString? (readonly)

The display name of the image.

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

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



58
59
60
# File 'sagemaker/cfn_image_props.rb', line 58

def image_display_name
  @image_display_name
end

#image_nameString (readonly)

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}$



35
36
37
# File 'sagemaker/cfn_image_props.rb', line 35

def image_name
  @image_name
end

#image_role_arnString (readonly)

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+=,.@\-_/]+$



44
45
46
# File 'sagemaker/cfn_image_props.rb', line 44

def image_role_arn
  @image_role_arn
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of key-value pairs to apply to this resource.

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



65
66
67
# File 'sagemaker/cfn_image_props.rb', line 65

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
# File 'sagemaker/cfn_image_props.rb', line 67

def self.jsii_properties
  {
    :image_name => "imageName",
    :image_role_arn => "imageRoleArn",
    :image_description => "imageDescription",
    :image_display_name => "imageDisplayName",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



77
78
79
80
81
82
83
84
85
86
87
# File 'sagemaker/cfn_image_props.rb', line 77

def to_jsii
  result = {}
  result.merge!({
    "imageName" => @image_name,
    "imageRoleArn" => @image_role_arn,
    "imageDescription" => @image_description,
    "imageDisplayName" => @image_display_name,
    "tags" => @tags,
  })
  result.compact
end