Class: AWSCDK::Sagemaker::CfnDomain::ResourceSpecProperty

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

Overview

Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on.

When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn , pass None as the value.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_type: nil, lifecycle_config_arn: nil, sage_maker_image_arn: nil, sage_maker_image_version_arn: nil, training_plan_arn: nil) ⇒ ResourceSpecProperty

Returns a new instance of ResourceSpecProperty.

Parameters:

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

    The instance type that the image version runs on.

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

    The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.

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

    The ARN of the SageMaker AI image that the image version belongs to.

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

    The ARN of the image version created on the instance.

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

    The Amazon Resource Name (ARN) of the training plan to use for the ResourceSpec.



1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
# File 'sagemaker/cfn_domain.rb', line 1936

def initialize(instance_type: nil, lifecycle_config_arn: nil, sage_maker_image_arn: nil, sage_maker_image_version_arn: nil, training_plan_arn: nil)
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @lifecycle_config_arn = lifecycle_config_arn
  Jsii::Type.check_type(@lifecycle_config_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lifecycleConfigArn") unless @lifecycle_config_arn.nil?
  @sage_maker_image_arn = sage_maker_image_arn
  Jsii::Type.check_type(@sage_maker_image_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sageMakerImageArn") unless @sage_maker_image_arn.nil?
  @sage_maker_image_version_arn = sage_maker_image_version_arn
  Jsii::Type.check_type(@sage_maker_image_version_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sageMakerImageVersionArn") unless @sage_maker_image_version_arn.nil?
  @training_plan_arn = training_plan_arn
  Jsii::Type.check_type(@training_plan_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "trainingPlanArn") unless @training_plan_arn.nil?
end

Instance Attribute Details

#instance_typeString? (readonly)

The instance type that the image version runs on.

JupyterServer apps only support the system value.

For KernelGateway apps , the system value is translated to ml.t3.medium . KernelGateway apps also support all other values for available instance types.



1957
1958
1959
# File 'sagemaker/cfn_domain.rb', line 1957

def instance_type
  @instance_type
end

#lifecycle_config_arnString? (readonly)

The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.



1962
1963
1964
# File 'sagemaker/cfn_domain.rb', line 1962

def lifecycle_config_arn
  @lifecycle_config_arn
end

#sage_maker_image_arnString? (readonly)

The ARN of the SageMaker AI image that the image version belongs to.



1967
1968
1969
# File 'sagemaker/cfn_domain.rb', line 1967

def sage_maker_image_arn
  @sage_maker_image_arn
end

#sage_maker_image_version_arnString? (readonly)

The ARN of the image version created on the instance.

To clear the value set for SageMakerImageVersionArn , pass None as the value.



1974
1975
1976
# File 'sagemaker/cfn_domain.rb', line 1974

def sage_maker_image_version_arn
  @sage_maker_image_version_arn
end

#training_plan_arnString? (readonly)

The Amazon Resource Name (ARN) of the training plan to use for the ResourceSpec.



1979
1980
1981
# File 'sagemaker/cfn_domain.rb', line 1979

def training_plan_arn
  @training_plan_arn
end

Class Method Details

.jsii_propertiesObject



1981
1982
1983
1984
1985
1986
1987
1988
1989
# File 'sagemaker/cfn_domain.rb', line 1981

def self.jsii_properties
  {
    :instance_type => "instanceType",
    :lifecycle_config_arn => "lifecycleConfigArn",
    :sage_maker_image_arn => "sageMakerImageArn",
    :sage_maker_image_version_arn => "sageMakerImageVersionArn",
    :training_plan_arn => "trainingPlanArn",
  }
end

Instance Method Details

#to_jsiiObject



1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
# File 'sagemaker/cfn_domain.rb', line 1991

def to_jsii
  result = {}
  result.merge!({
    "instanceType" => @instance_type,
    "lifecycleConfigArn" => @lifecycle_config_arn,
    "sageMakerImageArn" => @sage_maker_image_arn,
    "sageMakerImageVersionArn" => @sage_maker_image_version_arn,
    "trainingPlanArn" => @training_plan_arn,
  })
  result.compact
end