Class: AWSCDK::APIGateway::RequestValidatorProps
- Inherits:
-
RequestValidatorOptions
- Object
- RequestValidatorOptions
- AWSCDK::APIGateway::RequestValidatorProps
- Defined in:
- api_gateway/request_validator_props.rb
Instance Attribute Summary collapse
-
#request_validator_name ⇒ String?
readonly
The name of this request validator.
-
#rest_api ⇒ AWSCDK::APIGateway::IRestAPI
readonly
The rest API that this model is part of.
-
#validate_request_body ⇒ Boolean?
readonly
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
-
#validate_request_parameters ⇒ Boolean?
readonly
Indicates whether to validate request parameters.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(request_validator_name: nil, validate_request_body: nil, validate_request_parameters: nil, rest_api:) ⇒ RequestValidatorProps
constructor
A new instance of RequestValidatorProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(request_validator_name: nil, validate_request_body: nil, validate_request_parameters: nil, rest_api:) ⇒ RequestValidatorProps
Returns a new instance of RequestValidatorProps.
10 11 12 13 14 15 16 17 18 19 |
# File 'api_gateway/request_validator_props.rb', line 10 def initialize(request_validator_name: nil, validate_request_body: nil, validate_request_parameters: nil, rest_api:) @request_validator_name = request_validator_name Jsii::Type.check_type(@request_validator_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "requestValidatorName") unless @request_validator_name.nil? @validate_request_body = validate_request_body Jsii::Type.check_type(@validate_request_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "validateRequestBody") unless @validate_request_body.nil? @validate_request_parameters = validate_request_parameters Jsii::Type.check_type(@validate_request_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "validateRequestParameters") unless @validate_request_parameters.nil? @rest_api = rest_api Jsii::Type.check_type(@rest_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "restApi") end |
Instance Attribute Details
#request_validator_name ⇒ String? (readonly)
Default: None
The name of this request validator.
25 26 27 |
# File 'api_gateway/request_validator_props.rb', line 25 def request_validator_name @request_validator_name end |
#rest_api ⇒ AWSCDK::APIGateway::IRestAPI (readonly)
The rest API that this model is part of.
The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating its hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.
44 45 46 |
# File 'api_gateway/request_validator_props.rb', line 44 def rest_api @rest_api end |
#validate_request_body ⇒ Boolean? (readonly)
Default: false
Indicates whether to validate the request body according to the configured schema for the targeted API and method.
30 31 32 |
# File 'api_gateway/request_validator_props.rb', line 30 def validate_request_body @validate_request_body end |
#validate_request_parameters ⇒ Boolean? (readonly)
Default: false
Indicates whether to validate request parameters.
35 36 37 |
# File 'api_gateway/request_validator_props.rb', line 35 def validate_request_parameters @validate_request_parameters end |
Class Method Details
.jsii_properties ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'api_gateway/request_validator_props.rb', line 46 def self.jsii_properties { :request_validator_name => "requestValidatorName", :validate_request_body => "validateRequestBody", :validate_request_parameters => "validateRequestParameters", :rest_api => "restApi", } end |
Instance Method Details
#to_jsii ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'api_gateway/request_validator_props.rb', line 55 def to_jsii result = {} result.merge!(super) result.merge!({ "requestValidatorName" => @request_validator_name, "validateRequestBody" => @validate_request_body, "validateRequestParameters" => @validate_request_parameters, "restApi" => @rest_api, }) result.compact end |