Class: AWSCDK::Events::ConnectionProps

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

Overview

An API Destination Connection.

A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization:, body_parameters: nil, connection_name: nil, description: nil, header_parameters: nil, query_string_parameters: nil) ⇒ ConnectionProps

Returns a new instance of ConnectionProps.

Parameters:

  • authorization (AWSCDK::Events::Authorization)

    The authorization type for the connection.

  • body_parameters (Hash{String => AWSCDK::Events::HttpParameter}, nil) (defaults to: nil)

    Additional string parameters to add to the invocation bodies.

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

    The name of the connection.

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

    The name of the connection.

  • header_parameters (Hash{String => AWSCDK::Events::HttpParameter}, nil) (defaults to: nil)

    Additional string parameters to add to the invocation headers.

  • query_string_parameters (Hash{String => AWSCDK::Events::HttpParameter}, nil) (defaults to: nil)

    Additional string parameters to add to the invocation query strings.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'events/connection_props.rb', line 15

def initialize(authorization:, body_parameters: nil, connection_name: nil, description: nil, header_parameters: nil, query_string_parameters: nil)
  @authorization = authorization
  Jsii::Type.check_type(@authorization, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkF1dGhvcml6YXRpb24ifQ==")), "authorization")
  @body_parameters = body_parameters
  Jsii::Type.check_type(@body_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuSHR0cFBhcmFtZXRlciJ9LCJraW5kIjoibWFwIn19")), "bodyParameters") unless @body_parameters.nil?
  @connection_name = connection_name
  Jsii::Type.check_type(@connection_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionName") unless @connection_name.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @header_parameters = header_parameters
  Jsii::Type.check_type(@header_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuSHR0cFBhcmFtZXRlciJ9LCJraW5kIjoibWFwIn19")), "headerParameters") unless @header_parameters.nil?
  @query_string_parameters = query_string_parameters
  Jsii::Type.check_type(@query_string_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuSHR0cFBhcmFtZXRlciJ9LCJraW5kIjoibWFwIn19")), "queryStringParameters") unless @query_string_parameters.nil?
end

Instance Attribute Details

#authorizationAWSCDK::Events::Authorization (readonly)

The authorization type for the connection.



33
34
35
# File 'events/connection_props.rb', line 33

def authorization
  @authorization
end

#body_parametersHash{String => AWSCDK::Events::HttpParameter}? (readonly)

Note:

Default: - No additional parameters

Additional string parameters to add to the invocation bodies.

Returns:



38
39
40
# File 'events/connection_props.rb', line 38

def body_parameters
  @body_parameters
end

#connection_nameString? (readonly)

Note:

Default: - A name is automatically generated

The name of the connection.

Returns:

  • (String, nil)


43
44
45
# File 'events/connection_props.rb', line 43

def connection_name
  @connection_name
end

#descriptionString? (readonly)

Note:

Default: - none

The name of the connection.

Returns:

  • (String, nil)


48
49
50
# File 'events/connection_props.rb', line 48

def description
  @description
end

#header_parametersHash{String => AWSCDK::Events::HttpParameter}? (readonly)

Note:

Default: - No additional parameters

Additional string parameters to add to the invocation headers.

Returns:



53
54
55
# File 'events/connection_props.rb', line 53

def header_parameters
  @header_parameters
end

#query_string_parametersHash{String => AWSCDK::Events::HttpParameter}? (readonly)

Note:

Default: - No additional parameters

Additional string parameters to add to the invocation query strings.

Returns:



58
59
60
# File 'events/connection_props.rb', line 58

def query_string_parameters
  @query_string_parameters
end

Class Method Details

.jsii_propertiesObject



60
61
62
63
64
65
66
67
68
69
# File 'events/connection_props.rb', line 60

def self.jsii_properties
  {
    :authorization => "authorization",
    :body_parameters => "bodyParameters",
    :connection_name => "connectionName",
    :description => "description",
    :header_parameters => "headerParameters",
    :query_string_parameters => "queryStringParameters",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
82
# File 'events/connection_props.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "authorization" => @authorization,
    "bodyParameters" => @body_parameters,
    "connectionName" => @connection_name,
    "description" => @description,
    "headerParameters" => @header_parameters,
    "queryStringParameters" => @query_string_parameters,
  })
  result.compact
end