Class: AWSCDK::ElasticLoadBalancing::CfnLoadBalancer::AccessLoggingPolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancing/cfn_load_balancer.rb

Overview

Specifies where and how access logs are stored for your Classic Load Balancer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled:, s3_bucket_name:, emit_interval: nil, s3_bucket_prefix: nil) ⇒ AccessLoggingPolicyProperty

Returns a new instance of AccessLoggingPolicyProperty.

Parameters:

  • enabled (Boolean, AWSCDK::IResolvable)

    Specifies whether access logs are enabled for the load balancer.

  • s3_bucket_name (String)

    The name of the Amazon S3 bucket where the access logs are stored.

  • emit_interval (Numeric, nil) (defaults to: nil)

    The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

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

    The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod .



780
781
782
783
784
785
786
787
788
789
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 780

def initialize(enabled:, s3_bucket_name:, emit_interval: nil, s3_bucket_prefix: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled")
  @s3_bucket_name = s3_bucket_name
  Jsii::Type.check_type(@s3_bucket_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3BucketName")
  @emit_interval = emit_interval
  Jsii::Type.check_type(@emit_interval, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "emitInterval") unless @emit_interval.nil?
  @s3_bucket_prefix = s3_bucket_prefix
  Jsii::Type.check_type(@s3_bucket_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s3BucketPrefix") unless @s3_bucket_prefix.nil?
end

Instance Attribute Details

#emit_intervalNumeric? (readonly)

The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes



807
808
809
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 807

def emit_interval
  @emit_interval
end

#enabledBoolean, AWSCDK::IResolvable (readonly)

Specifies whether access logs are enabled for the load balancer.



795
796
797
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 795

def enabled
  @enabled
end

#s3_bucket_nameString (readonly)

The name of the Amazon S3 bucket where the access logs are stored.



800
801
802
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 800

def s3_bucket_name
  @s3_bucket_name
end

#s3_bucket_prefixString? (readonly)

The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod .

If the prefix is not provided, the log is placed at the root level of the bucket.



814
815
816
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 814

def s3_bucket_prefix
  @s3_bucket_prefix
end

Class Method Details

.jsii_propertiesObject



816
817
818
819
820
821
822
823
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 816

def self.jsii_properties
  {
    :enabled => "enabled",
    :s3_bucket_name => "s3BucketName",
    :emit_interval => "emitInterval",
    :s3_bucket_prefix => "s3BucketPrefix",
  }
end

Instance Method Details

#to_jsiiObject



825
826
827
828
829
830
831
832
833
834
# File 'elastic_load_balancing/cfn_load_balancer.rb', line 825

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "s3BucketName" => @s3_bucket_name,
    "emitInterval" => @emit_interval,
    "s3BucketPrefix" => @s3_bucket_prefix,
  })
  result.compact
end