Class: AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentContainerSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentContainerSpecificationProperty
- Defined in:
- sagemaker/cfn_inference_component.rb
Overview
Defines a container that provides the runtime environment for a model that you deploy with an inference component.
Instance Attribute Summary collapse
-
#artifact_url ⇒ String?
readonly
The Amazon S3 path where the model artifacts, which result from model training, are stored.
- #deployed_image ⇒ AWSCDK::IResolvable, ... readonly
-
#environment ⇒ AWSCDK::IResolvable, ...
readonly
The environment variables to set in the Docker container.
-
#image ⇒ String?
readonly
The Amazon Elastic Container Registry (Amazon ECR) path where the Docker image for the model is stored.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(artifact_url: nil, deployed_image: nil, environment: nil, image: nil) ⇒ InferenceComponentContainerSpecificationProperty
constructor
A new instance of InferenceComponentContainerSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(artifact_url: nil, deployed_image: nil, environment: nil, image: nil) ⇒ InferenceComponentContainerSpecificationProperty
Returns a new instance of InferenceComponentContainerSpecificationProperty.
907 908 909 910 911 912 913 914 915 916 |
# File 'sagemaker/cfn_inference_component.rb', line 907 def initialize(artifact_url: nil, deployed_image: nil, environment: nil, image: nil) @artifact_url = artifact_url Jsii::Type.check_type(@artifact_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "artifactUrl") unless @artifact_url.nil? @deployed_image = deployed_image.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::DeployedImageProperty.new(**deployed_image.transform_keys(&:to_sym)) : deployed_image Jsii::Type.check_type(@deployed_image, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkRlcGxveWVkSW1hZ2VQcm9wZXJ0eSJ9XX19")), "deployedImage") unless @deployed_image.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "environment") unless @environment.nil? @image = image Jsii::Type.check_type(@image, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "image") unless @image.nil? end |
Instance Attribute Details
#artifact_url ⇒ String? (readonly)
The Amazon S3 path where the model artifacts, which result from model training, are stored.
This path must point to a single gzip compressed tar archive (.tar.gz suffix).
924 925 926 |
# File 'sagemaker/cfn_inference_component.rb', line 924 def artifact_url @artifact_url end |
#deployed_image ⇒ AWSCDK::IResolvable, ... (readonly)
927 928 929 |
# File 'sagemaker/cfn_inference_component.rb', line 927 def deployed_image @deployed_image end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
The environment variables to set in the Docker container.
Each key and value in the Environment string-to-string map can have length of up to 1024. We support up to 16 entries in the map.
934 935 936 |
# File 'sagemaker/cfn_inference_component.rb', line 934 def environment @environment end |
#image ⇒ String? (readonly)
The Amazon Elastic Container Registry (Amazon ECR) path where the Docker image for the model is stored.
939 940 941 |
# File 'sagemaker/cfn_inference_component.rb', line 939 def image @image end |
Class Method Details
.jsii_properties ⇒ Object
941 942 943 944 945 946 947 948 |
# File 'sagemaker/cfn_inference_component.rb', line 941 def self.jsii_properties { :artifact_url => "artifactUrl", :deployed_image => "deployedImage", :environment => "environment", :image => "image", } end |
Instance Method Details
#to_jsii ⇒ Object
950 951 952 953 954 955 956 957 958 959 |
# File 'sagemaker/cfn_inference_component.rb', line 950 def to_jsii result = {} result.merge!({ "artifactUrl" => @artifact_url, "deployedImage" => @deployed_image, "environment" => @environment, "image" => @image, }) result.compact end |