Class: AWSCDK::Sagemaker::CfnAppProps

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

Overview

Properties for defining a CfnApp.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_name:, app_type:, domain_id:, user_profile_name:, recovery_mode: nil, resource_spec: nil, tags: nil) ⇒ CfnAppProps

Returns a new instance of CfnAppProps.

Parameters:

  • app_name (String)

    The name of the app.

  • app_type (String)

    The type of app.

  • domain_id (String)

    The domain ID.

  • user_profile_name (String)

    The user profile name.

  • recovery_mode (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether the application is launched in recovery mode.

  • resource_spec (AWSCDK::IResolvable, AWSCDK::Sagemaker::CfnApp::ResourceSpecProperty, nil) (defaults to: nil)

    Specifies the ARNs of a SageMaker image and SageMaker image version, and the instance type that the version runs on.

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

    An array of key-value pairs to apply to this resource.



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

def initialize(app_name:, app_type:, domain_id:, user_profile_name:, recovery_mode: nil, resource_spec: nil, tags: nil)
  @app_name = app_name
  Jsii::Type.check_type(@app_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appName")
  @app_type = app_type
  Jsii::Type.check_type(@app_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appType")
  @domain_id = domain_id
  Jsii::Type.check_type(@domain_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainId")
  @user_profile_name = 
  Jsii::Type.check_type(@user_profile_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userProfileName")
  @recovery_mode = recovery_mode
  Jsii::Type.check_type(@recovery_mode, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "recoveryMode") unless @recovery_mode.nil?
  @resource_spec = resource_spec.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnApp::ResourceSpecProperty.new(**resource_spec.transform_keys(&:to_sym)) : resource_spec
  Jsii::Type.check_type(@resource_spec, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuQXBwLlJlc291cmNlU3BlY1Byb3BlcnR5In1dfX0=")), "resourceSpec") unless @resource_spec.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

#app_nameString (readonly)

The name of the app.



37
38
39
# File 'sagemaker/cfn_app_props.rb', line 37

def app_name
  @app_name
end

#app_typeString (readonly)

The type of app.



42
43
44
# File 'sagemaker/cfn_app_props.rb', line 42

def app_type
  @app_type
end

#domain_idString (readonly)

The domain ID.



47
48
49
# File 'sagemaker/cfn_app_props.rb', line 47

def domain_id
  @domain_id
end

#recovery_modeBoolean, ... (readonly)

Indicates whether the application is launched in recovery mode.



57
58
59
# File 'sagemaker/cfn_app_props.rb', line 57

def recovery_mode
  @recovery_mode
end

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

Specifies the ARNs of a SageMaker image and SageMaker image version, and the instance type that the version runs on.



62
63
64
# File 'sagemaker/cfn_app_props.rb', line 62

def resource_spec
  @resource_spec
end

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

An array of key-value pairs to apply to this resource.

For more information, see Tag .



69
70
71
# File 'sagemaker/cfn_app_props.rb', line 69

def tags
  @tags
end

#user_profile_nameString (readonly)

The user profile name.



52
53
54
# File 'sagemaker/cfn_app_props.rb', line 52

def 
  @user_profile_name
end

Class Method Details

.jsii_propertiesObject



71
72
73
74
75
76
77
78
79
80
81
# File 'sagemaker/cfn_app_props.rb', line 71

def self.jsii_properties
  {
    :app_name => "appName",
    :app_type => "appType",
    :domain_id => "domainId",
    :user_profile_name => "userProfileName",
    :recovery_mode => "recoveryMode",
    :resource_spec => "resourceSpec",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "appName" => @app_name,
    "appType" => @app_type,
    "domainId" => @domain_id,
    "userProfileName" => @user_profile_name,
    "recoveryMode" => @recovery_mode,
    "resourceSpec" => @resource_spec,
    "tags" => @tags,
  })
  result.compact
end