Class: AWSCDK::SAM::CfnFunction::APIEventProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SAM::CfnFunction::APIEventProperty
- Defined in:
- sam/cfn_function.rb
Overview
Instance Attribute Summary collapse
- #auth ⇒ AWSCDK::IResolvable, ... readonly
- #method ⇒ String readonly
- #path ⇒ String readonly
- #request_model ⇒ AWSCDK::IResolvable, ... readonly
- #request_parameters ⇒ AWSCDK::IResolvable, ... readonly
- #rest_api_id ⇒ String? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(method:, path:, auth: nil, request_model: nil, request_parameters: nil, rest_api_id: nil) ⇒ APIEventProperty
constructor
A new instance of APIEventProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(method:, path:, auth: nil, request_model: nil, request_parameters: nil, rest_api_id: nil) ⇒ APIEventProperty
Returns a new instance of APIEventProperty.
923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'sam/cfn_function.rb', line 923 def initialize(method:, path:, auth: nil, request_model: nil, request_parameters: nil, rest_api_id: nil) @method = method Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") @auth = auth.is_a?(Hash) ? ::AWSCDK::SAM::CfnFunction::AuthProperty.new(**auth.transform_keys(&:to_sym)) : auth Jsii::Type.check_type(@auth, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuRnVuY3Rpb24uQXV0aFByb3BlcnR5In1dfX0=")), "auth") unless @auth.nil? @request_model = request_model.is_a?(Hash) ? ::AWSCDK::SAM::CfnFunction::RequestModelProperty.new(**request_model.transform_keys(&:to_sym)) : request_model Jsii::Type.check_type(@request_model, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuRnVuY3Rpb24uUmVxdWVzdE1vZGVsUHJvcGVydHkifV19fQ==")), "requestModel") unless @request_model.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7InByaW1pdGl2ZSI6InN0cmluZyJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuRnVuY3Rpb24uUmVxdWVzdFBhcmFtZXRlclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "requestParameters") unless @request_parameters.nil? @rest_api_id = rest_api_id Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "restApiId") unless @rest_api_id.nil? end |
Instance Attribute Details
#auth ⇒ AWSCDK::IResolvable, ... (readonly)
946 947 948 |
# File 'sam/cfn_function.rb', line 946 def auth @auth end |
#method ⇒ String (readonly)
940 941 942 |
# File 'sam/cfn_function.rb', line 940 def method @method end |
#path ⇒ String (readonly)
943 944 945 |
# File 'sam/cfn_function.rb', line 943 def path @path end |
#request_model ⇒ AWSCDK::IResolvable, ... (readonly)
949 950 951 |
# File 'sam/cfn_function.rb', line 949 def request_model @request_model end |
#request_parameters ⇒ AWSCDK::IResolvable, ... (readonly)
952 953 954 |
# File 'sam/cfn_function.rb', line 952 def request_parameters @request_parameters end |
#rest_api_id ⇒ String? (readonly)
955 956 957 |
# File 'sam/cfn_function.rb', line 955 def rest_api_id @rest_api_id end |
Class Method Details
.jsii_properties ⇒ Object
957 958 959 960 961 962 963 964 965 966 |
# File 'sam/cfn_function.rb', line 957 def self.jsii_properties { :method => "method", :path => "path", :auth => "auth", :request_model => "requestModel", :request_parameters => "requestParameters", :rest_api_id => "restApiId", } end |
Instance Method Details
#to_jsii ⇒ Object
968 969 970 971 972 973 974 975 976 977 978 979 |
# File 'sam/cfn_function.rb', line 968 def to_jsii result = {} result.merge!({ "method" => @method, "path" => @path, "auth" => @auth, "requestModel" => @request_model, "requestParameters" => @request_parameters, "restApiId" => @rest_api_id, }) result.compact end |