Class: AWSCDK::APIGatewayv2::CfnStage::AccessLogSettingsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/cfn_stage.rb

Overview

Settings for logging access in a stage.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination_arn: nil, format: nil) ⇒ AccessLogSettingsProperty

Returns a new instance of AccessLogSettingsProperty.

Parameters:

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

    The ARN of the CloudWatch Logs log group to receive access logs.

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

    A single line format of the access logs of data, as specified by selected $context variables.



649
650
651
652
653
654
# File 'api_gatewayv2/cfn_stage.rb', line 649

def initialize(destination_arn: nil, format: nil)
  @destination_arn = destination_arn
  Jsii::Type.check_type(@destination_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationArn") unless @destination_arn.nil?
  @format = format
  Jsii::Type.check_type(@format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "format") unless @format.nil?
end

Instance Attribute Details

#destination_arnString? (readonly)

The ARN of the CloudWatch Logs log group to receive access logs.

This parameter is required to enable access logging.



662
663
664
# File 'api_gatewayv2/cfn_stage.rb', line 662

def destination_arn
  @destination_arn
end

#formatString? (readonly)

A single line format of the access logs of data, as specified by selected $context variables.

The format must include at least $context.requestId. This parameter is required to enable access logging.



669
670
671
# File 'api_gatewayv2/cfn_stage.rb', line 669

def format
  @format
end

Class Method Details

.jsii_propertiesObject



671
672
673
674
675
676
# File 'api_gatewayv2/cfn_stage.rb', line 671

def self.jsii_properties
  {
    :destination_arn => "destinationArn",
    :format => "format",
  }
end

Instance Method Details

#to_jsiiObject



678
679
680
681
682
683
684
685
# File 'api_gatewayv2/cfn_stage.rb', line 678

def to_jsii
  result = {}
  result.merge!({
    "destinationArn" => @destination_arn,
    "format" => @format,
  })
  result.compact
end