Class: AWSCDK::Sagemaker::CfnEndpointConfig::AsyncInferenceNotificationConfigProperty

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

Overview

Specifies the configuration for notifications of inference results for asynchronous inference.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_topic: nil, include_inference_response_in: nil, success_topic: nil) ⇒ AsyncInferenceNotificationConfigProperty

Returns a new instance of AsyncInferenceNotificationConfigProperty.

Parameters:

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

    Amazon SNS topic to post a notification to when an inference fails.

  • include_inference_response_in (Array<String>, nil) (defaults to: nil)

    The Amazon SNS topics where you want the inference response to be included.

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

    Amazon SNS topic to post a notification to when an inference completes successfully.



733
734
735
736
737
738
739
740
# File 'sagemaker/cfn_endpoint_config.rb', line 733

def initialize(error_topic: nil, include_inference_response_in: nil, success_topic: nil)
  @error_topic = error_topic
  Jsii::Type.check_type(@error_topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "errorTopic") unless @error_topic.nil?
  @include_inference_response_in = include_inference_response_in
  Jsii::Type.check_type(@include_inference_response_in, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includeInferenceResponseIn") unless @include_inference_response_in.nil?
  @success_topic = success_topic
  Jsii::Type.check_type(@success_topic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "successTopic") unless @success_topic.nil?
end

Instance Attribute Details

#error_topicString? (readonly)

Amazon SNS topic to post a notification to when an inference fails.

If no topic is provided, no notification is sent on failure.



748
749
750
# File 'sagemaker/cfn_endpoint_config.rb', line 748

def error_topic
  @error_topic
end

#include_inference_response_inArray<String>? (readonly)

The Amazon SNS topics where you want the inference response to be included.

The inference response is included only if the response size is less than or equal to 128 KB.



755
756
757
# File 'sagemaker/cfn_endpoint_config.rb', line 755

def include_inference_response_in
  @include_inference_response_in
end

#success_topicString? (readonly)

Amazon SNS topic to post a notification to when an inference completes successfully.

If no topic is provided, no notification is sent on success.



762
763
764
# File 'sagemaker/cfn_endpoint_config.rb', line 762

def success_topic
  @success_topic
end

Class Method Details

.jsii_propertiesObject



764
765
766
767
768
769
770
# File 'sagemaker/cfn_endpoint_config.rb', line 764

def self.jsii_properties
  {
    :error_topic => "errorTopic",
    :include_inference_response_in => "includeInferenceResponseIn",
    :success_topic => "successTopic",
  }
end

Instance Method Details

#to_jsiiObject



772
773
774
775
776
777
778
779
780
# File 'sagemaker/cfn_endpoint_config.rb', line 772

def to_jsii
  result = {}
  result.merge!({
    "errorTopic" => @error_topic,
    "includeInferenceResponseIn" => @include_inference_response_in,
    "successTopic" => @success_topic,
  })
  result.compact
end