Class: AWSCDK::Events::APIDestinationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events/api_destination_props.rb

Overview

The event API Destination properties.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection:, endpoint:, api_destination_name: nil, description: nil, http_method: nil, rate_limit_per_second: nil) ⇒ APIDestinationProps

Returns a new instance of APIDestinationProps.

Parameters:

  • connection (AWSCDK::Interfaces::AWSEvents::IConnectionRef)

    The ARN of the connection to use for the API destination.

  • endpoint (String)

    The URL to the HTTP invocation endpoint for the API destination..

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

    The name for the API destination.

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

    A description for the API destination.

  • http_method (AWSCDK::Events::HttpMethod, nil) (defaults to: nil)

    The method to use for the request to the HTTP invocation endpoint.

  • rate_limit_per_second (Numeric, nil) (defaults to: nil)

    The maximum number of requests per second to send to the HTTP invocation endpoint.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'events/api_destination_props.rb', line 13

def initialize(connection:, endpoint:, api_destination_name: nil, description: nil, http_method: nil, rate_limit_per_second: nil)
  @connection = connection
  Jsii::Type.check_type(@connection, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSUNvbm5lY3Rpb25SZWYifQ==")), "connection")
  @endpoint = endpoint
  Jsii::Type.check_type(@endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endpoint")
  @api_destination_name = api_destination_name
  Jsii::Type.check_type(@api_destination_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiDestinationName") unless @api_destination_name.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @http_method = http_method
  Jsii::Type.check_type(@http_method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkh0dHBNZXRob2QifQ==")), "httpMethod") unless @http_method.nil?
  @rate_limit_per_second = rate_limit_per_second
  Jsii::Type.check_type(@rate_limit_per_second, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "rateLimitPerSecond") unless @rate_limit_per_second.nil?
end

Instance Attribute Details

#api_destination_nameString? (readonly)

Note:

Default: - A unique name will be generated

The name for the API destination.

Returns:

  • (String, nil)


40
41
42
# File 'events/api_destination_props.rb', line 40

def api_destination_name
  @api_destination_name
end

#connectionAWSCDK::Interfaces::AWSEvents::IConnectionRef (readonly)

The ARN of the connection to use for the API destination.



31
32
33
# File 'events/api_destination_props.rb', line 31

def connection
  @connection
end

#descriptionString? (readonly)

Note:

Default: - none

A description for the API destination.

Returns:

  • (String, nil)


45
46
47
# File 'events/api_destination_props.rb', line 45

def description
  @description
end

#endpointString (readonly)

The URL to the HTTP invocation endpoint for the API destination..

Returns:

  • (String)


35
36
37
# File 'events/api_destination_props.rb', line 35

def endpoint
  @endpoint
end

#http_methodAWSCDK::Events::HttpMethod? (readonly)

Note:

Default: HttpMethod.POST

The method to use for the request to the HTTP invocation endpoint.

Returns:



50
51
52
# File 'events/api_destination_props.rb', line 50

def http_method
  @http_method
end

#rate_limit_per_secondNumeric? (readonly)

Note:

Default: - Not rate limited

The maximum number of requests per second to send to the HTTP invocation endpoint.

Returns:

  • (Numeric, nil)


55
56
57
# File 'events/api_destination_props.rb', line 55

def rate_limit_per_second
  @rate_limit_per_second
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
66
# File 'events/api_destination_props.rb', line 57

def self.jsii_properties
  {
    :connection => "connection",
    :endpoint => "endpoint",
    :api_destination_name => "apiDestinationName",
    :description => "description",
    :http_method => "httpMethod",
    :rate_limit_per_second => "rateLimitPerSecond",
  }
end

Instance Method Details

#to_jsiiObject



68
69
70
71
72
73
74
75
76
77
78
79
# File 'events/api_destination_props.rb', line 68

def to_jsii
  result = {}
  result.merge!({
    "connection" => @connection,
    "endpoint" => @endpoint,
    "apiDestinationName" => @api_destination_name,
    "description" => @description,
    "httpMethod" => @http_method,
    "rateLimitPerSecond" => @rate_limit_per_second,
  })
  result.compact
end