Class: AWSCDK::APIGateway::SagemakerIntegration

Inherits:
AWSIntegration
  • Object
show all
Defined in:
api_gateway/sagemaker_integration.rb

Overview

Integrates an AWS Sagemaker Endpoint to an API Gateway method.

Examples:

resource = nil # AWSCDK::APIGateway::Resource
endpoint = nil # AWSCDK::Sagemaker::IEndpoint

resource.add_method("POST", AWSCDK::APIGateway::SagemakerIntegration.new(endpoint))

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint, options = nil) ⇒ SagemakerIntegration

Returns a new instance of SagemakerIntegration.

Parameters:



16
17
18
19
20
21
# File 'api_gateway/sagemaker_integration.rb', line 16

def initialize(endpoint, options = nil)
  options = options.is_a?(Hash) ? ::AWSCDK::APIGateway::SagemakerIntegrationOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2FnZW1ha2VyLklFbmRwb2ludCJ9")), "endpoint")
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5TYWdlbWFrZXJJbnRlZ3JhdGlvbk9wdGlvbnMifQ==")), "options") unless options.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(endpoint, options)
end

Class Method Details

.jsii_overridable_methodsObject



23
24
25
26
27
# File 'api_gateway/sagemaker_integration.rb', line 23

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(method) ⇒ AWSCDK::APIGateway::IntegrationConfig

Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.



33
34
35
36
# File 'api_gateway/sagemaker_integration.rb', line 33

def bind(method)
  Jsii::Type.check_type(method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2QifQ==")), "method")
  jsii_call_method("bind", [method])
end