Class: AWSCDK::Sagemaker::CfnInferenceComponentProps

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

Overview

Properties for defining a CfnInferenceComponent.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_name:, specification:, deployment_config: nil, endpoint_arn: nil, inference_component_name: nil, runtime_config: nil, tags: nil, variant_name: nil) ⇒ CfnInferenceComponentProps

Returns a new instance of CfnInferenceComponentProps.

Parameters:



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

def initialize(endpoint_name:, specification:, deployment_config: nil, endpoint_arn: nil, inference_component_name: nil, runtime_config: nil, tags: nil, variant_name: nil)
  @endpoint_name = endpoint_name
  Jsii::Type.check_type(@endpoint_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointName")
  @specification = specification.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentSpecificationProperty.new(**specification.transform_keys(&:to_sym)) : specification
  Jsii::Type.check_type(@specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudFNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19")), "specification")
  @deployment_config = deployment_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentDeploymentConfigProperty.new(**deployment_config.transform_keys(&:to_sym)) : deployment_config
  Jsii::Type.check_type(@deployment_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudERlcGxveW1lbnRDb25maWdQcm9wZXJ0eSJ9XX19")), "deploymentConfig") unless @deployment_config.nil?
  @endpoint_arn = endpoint_arn
  Jsii::Type.check_type(@endpoint_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpointArn") unless @endpoint_arn.nil?
  @inference_component_name = inference_component_name
  Jsii::Type.check_type(@inference_component_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inferenceComponentName") unless @inference_component_name.nil?
  @runtime_config = runtime_config.is_a?(Hash) ? ::AWSCDK::Sagemaker::CfnInferenceComponent::InferenceComponentRuntimeConfigProperty.new(**runtime_config.transform_keys(&:to_sym)) : runtime_config
  Jsii::Type.check_type(@runtime_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYWdlbWFrZXIuQ2ZuSW5mZXJlbmNlQ29tcG9uZW50LkluZmVyZW5jZUNvbXBvbmVudFJ1bnRpbWVDb25maWdQcm9wZXJ0eSJ9XX19")), "runtimeConfig") unless @runtime_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?
  @variant_name = variant_name
  Jsii::Type.check_type(@variant_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "variantName") unless @variant_name.nil?
end

Instance Attribute Details

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

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.



50
51
52
# File 'sagemaker/cfn_inference_component_props.rb', line 50

def deployment_config
  @deployment_config
end

#endpoint_arnString? (readonly)

The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.



55
56
57
# File 'sagemaker/cfn_inference_component_props.rb', line 55

def endpoint_arn
  @endpoint_arn
end

#endpoint_nameString (readonly)

The name of the endpoint that hosts the inference component.



40
41
42
# File 'sagemaker/cfn_inference_component_props.rb', line 40

def endpoint_name
  @endpoint_name
end

#inference_component_nameString? (readonly)

The name of the inference component.



60
61
62
# File 'sagemaker/cfn_inference_component_props.rb', line 60

def inference_component_name
  @inference_component_name
end

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

The runtime config for the inference component.



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

def runtime_config
  @runtime_config
end

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

An array of tags to apply to the resource.



70
71
72
# File 'sagemaker/cfn_inference_component_props.rb', line 70

def tags
  @tags
end

#variant_nameString? (readonly)

The name of the production variant that hosts the inference component.



75
76
77
# File 'sagemaker/cfn_inference_component_props.rb', line 75

def variant_name
  @variant_name
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :endpoint_name => "endpointName",
    :specification => "specification",
    :deployment_config => "deploymentConfig",
    :endpoint_arn => "endpointArn",
    :inference_component_name => "inferenceComponentName",
    :runtime_config => "runtimeConfig",
    :tags => "tags",
    :variant_name => "variantName",
  }
end

Instance Method Details

#to_jsiiObject



90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'sagemaker/cfn_inference_component_props.rb', line 90

def to_jsii
  result = {}
  result.merge!({
    "endpointName" => @endpoint_name,
    "specification" => @specification,
    "deploymentConfig" => @deployment_config,
    "endpointArn" => @endpoint_arn,
    "inferenceComponentName" => @inference_component_name,
    "runtimeConfig" => @runtime_config,
    "tags" => @tags,
    "variantName" => @variant_name,
  })
  result.compact
end