Class: AWSCDK::APIGateway::JsonWithStandardFieldProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::JsonWithStandardFieldProps
- Defined in:
- api_gateway/json_with_standard_field_props.rb
Overview
Properties for controlling items output in JSON standard format.
Instance Attribute Summary collapse
-
#caller ⇒ Boolean
readonly
If this flag is enabled, the principal identifier of the caller will be output to the log.
-
#http_method ⇒ Boolean
readonly
If this flag is enabled, the http method will be output to the log.
-
#ip ⇒ Boolean
readonly
If this flag is enabled, the source IP of request will be output to the log.
-
#protocol ⇒ Boolean
readonly
If this flag is enabled, the request protocol will be output to the log.
-
#request_time ⇒ Boolean
readonly
If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log..
-
#resource_path ⇒ Boolean
readonly
If this flag is enabled, the path to your resource will be output to the log.
-
#response_length ⇒ Boolean
readonly
If this flag is enabled, the response payload length will be output to the log.
-
#status ⇒ Boolean
readonly
If this flag is enabled, the method response status will be output to the log.
-
#user ⇒ Boolean
readonly
If this flag is enabled, the principal identifier of the user will be output to the log.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(caller:, http_method:, ip:, protocol:, request_time:, resource_path:, response_length:, status:, user:) ⇒ JsonWithStandardFieldProps
constructor
A new instance of JsonWithStandardFieldProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(caller:, http_method:, ip:, protocol:, request_time:, resource_path:, response_length:, status:, user:) ⇒ JsonWithStandardFieldProps
Returns a new instance of JsonWithStandardFieldProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'api_gateway/json_with_standard_field_props.rb', line 16 def initialize(caller:, http_method:, ip:, protocol:, request_time:, resource_path:, response_length:, status:, user:) @caller = caller Jsii::Type.check_type(@caller, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "caller") @http_method = http_method Jsii::Type.check_type(@http_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "httpMethod") @ip = ip Jsii::Type.check_type(@ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ip") @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "protocol") @request_time = request_time Jsii::Type.check_type(@request_time, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "requestTime") @resource_path = resource_path Jsii::Type.check_type(@resource_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "resourcePath") @response_length = response_length Jsii::Type.check_type(@response_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "responseLength") @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "status") @user = user Jsii::Type.check_type(@user, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "user") end |
Instance Attribute Details
#caller ⇒ Boolean (readonly)
If this flag is enabled, the principal identifier of the caller will be output to the log.
40 41 42 |
# File 'api_gateway/json_with_standard_field_props.rb', line 40 def caller @caller end |
#http_method ⇒ Boolean (readonly)
If this flag is enabled, the http method will be output to the log.
44 45 46 |
# File 'api_gateway/json_with_standard_field_props.rb', line 44 def http_method @http_method end |
#ip ⇒ Boolean (readonly)
If this flag is enabled, the source IP of request will be output to the log.
48 49 50 |
# File 'api_gateway/json_with_standard_field_props.rb', line 48 def ip @ip end |
#protocol ⇒ Boolean (readonly)
If this flag is enabled, the request protocol will be output to the log.
52 53 54 |
# File 'api_gateway/json_with_standard_field_props.rb', line 52 def protocol @protocol end |
#request_time ⇒ Boolean (readonly)
If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.
56 57 58 |
# File 'api_gateway/json_with_standard_field_props.rb', line 56 def request_time @request_time end |
#resource_path ⇒ Boolean (readonly)
If this flag is enabled, the path to your resource will be output to the log.
60 61 62 |
# File 'api_gateway/json_with_standard_field_props.rb', line 60 def resource_path @resource_path end |
#response_length ⇒ Boolean (readonly)
If this flag is enabled, the response payload length will be output to the log.
64 65 66 |
# File 'api_gateway/json_with_standard_field_props.rb', line 64 def response_length @response_length end |
#status ⇒ Boolean (readonly)
If this flag is enabled, the method response status will be output to the log.
68 69 70 |
# File 'api_gateway/json_with_standard_field_props.rb', line 68 def status @status end |
#user ⇒ Boolean (readonly)
If this flag is enabled, the principal identifier of the user will be output to the log.
72 73 74 |
# File 'api_gateway/json_with_standard_field_props.rb', line 72 def user @user end |
Class Method Details
.jsii_properties ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'api_gateway/json_with_standard_field_props.rb', line 74 def self.jsii_properties { :caller => "caller", :http_method => "httpMethod", :ip => "ip", :protocol => "protocol", :request_time => "requestTime", :resource_path => "resourcePath", :response_length => "responseLength", :status => "status", :user => "user", } end |
Instance Method Details
#to_jsii ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'api_gateway/json_with_standard_field_props.rb', line 88 def to_jsii result = {} result.merge!({ "caller" => @caller, "httpMethod" => @http_method, "ip" => @ip, "protocol" => @protocol, "requestTime" => @request_time, "resourcePath" => @resource_path, "responseLength" => @response_length, "status" => @status, "user" => @user, }) result.compact end |