Class: AWSCDK::Sagemaker::CfnModelCardProps

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

Overview

Properties for defining a CfnModelCard.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, model_card_name:, model_card_status:, created_by: nil, last_modified_by: nil, security_config: nil, tags: nil) ⇒ CfnModelCardProps

Returns a new instance of CfnModelCardProps.

Parameters:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'sagemaker/cfn_model_card_props.rb', line 16

def initialize(content:, model_card_name:, model_card_status:, created_by: nil, last_modified_by: nil, security_config: nil, tags: nil)
  @content = content.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnModelCard::ContentProperty.new(**content.transform_keys(&:to_sym)) : content
  Jsii::Type.check_type(@content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuTW9kZWxDYXJkLkNvbnRlbnRQcm9wZXJ0eSJ9XX19")), "content")
  @model_card_name = model_card_name
  Jsii::Type.check_type(@model_card_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelCardName")
  @model_card_status = model_card_status
  Jsii::Type.check_type(@model_card_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelCardStatus")
  @created_by = created_by.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnModelCard::UserContextProperty.new(**created_by.transform_keys(&:to_sym)) : created_by
  Jsii::Type.check_type(@created_by, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuTW9kZWxDYXJkLlVzZXJDb250ZXh0UHJvcGVydHkifV19fQ==")), "createdBy") unless @created_by.nil?
  @last_modified_by = last_modified_by.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnModelCard::UserContextProperty.new(**last_modified_by.transform_keys(&:to_sym)) : last_modified_by
  Jsii::Type.check_type(@last_modified_by, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuTW9kZWxDYXJkLlVzZXJDb250ZXh0UHJvcGVydHkifV19fQ==")), "lastModifiedBy") unless @last_modified_by.nil?
  @security_config = security_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnModelCard::SecurityConfigProperty.new(**security_config.transform_keys(&:to_sym)) : security_config
  Jsii::Type.check_type(@security_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuTW9kZWxDYXJkLlNlY3VyaXR5Q29uZmlnUHJvcGVydHkifV19fQ==")), "securityConfig") unless @security_config.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

#created_byAWSCDK::IResolvable, ... (readonly)

Information about the user who created or modified one or more of the following:.

  • Experiment
  • Trial
  • Trial component
  • Lineage group
  • Project
  • Model Card


68
69
70
# File 'sagemaker/cfn_model_card_props.rb', line 68

def created_by
  @created_by
end

#last_modified_byAWSCDK::IResolvable, ... (readonly)

Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.



73
74
75
# File 'sagemaker/cfn_model_card_props.rb', line 73

def last_modified_by
  @last_modified_by
end

#model_card_nameString (readonly)

The unique name of the model card.



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

def model_card_name
  @model_card_name
end

#model_card_statusString (readonly)

The approval status of the model card within your organization.

Different organizations might have different criteria for model card review and approval.

  • Draft : The model card is a work in progress.
  • PendingReview : The model card is pending review.
  • Approved : The model card is approved.
  • Archived : The model card is archived. No more updates should be made to the model card, but it can still be exported.


56
57
58
# File 'sagemaker/cfn_model_card_props.rb', line 56

def model_card_status
  @model_card_status
end

#security_configAWSCDK::IResolvable, ... (readonly)

The security configuration used to protect model card data.



78
79
80
# File 'sagemaker/cfn_model_card_props.rb', line 78

def security_config
  @security_config
end

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

Key-value pairs used to manage metadata for the model card.



83
84
85
# File 'sagemaker/cfn_model_card_props.rb', line 83

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
# File 'sagemaker/cfn_model_card_props.rb', line 85

def self.jsii_properties
  {
    :content => "content",
    :model_card_name => "modelCardName",
    :model_card_status => "modelCardStatus",
    :created_by => "createdBy",
    :last_modified_by => "lastModifiedBy",
    :security_config => "securityConfig",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'sagemaker/cfn_model_card_props.rb', line 97

def to_jsii
  result = {}
  result.merge!({
    "content" => @content,
    "modelCardName" => @model_card_name,
    "modelCardStatus" => @model_card_status,
    "createdBy" => @created_by,
    "lastModifiedBy" => @last_modified_by,
    "securityConfig" => @security_config,
    "tags" => @tags,
  })
  result.compact
end