Skip to content
v2.277.0

AccessLoggingPolicyProperty Struct ​

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

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancing as elb } from 'aws-cdk-lib';
const accessLoggingPolicyProperty: elb.CfnLoadBalancer.AccessLoggingPolicyProperty = {
  enabled: false,
  s3BucketName: 's3BucketName',

  // the properties below are optional
  emitInterval: 123,
  s3BucketPrefix: 's3BucketPrefix',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancing as elb

access_logging_policy_property = elb.CfnLoadBalancer.AccessLoggingPolicyProperty(
    enabled=False,
    s3_bucket_name="s3BucketName",

    # the properties below are optional
    emit_interval=123,
    s3_bucket_prefix="s3BucketPrefix"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancing.*;

AccessLoggingPolicyProperty accessLoggingPolicyProperty = AccessLoggingPolicyProperty.builder()
        .enabled(false)
        .s3BucketName("s3BucketName")

        // the properties below are optional
        .emitInterval(123)
        .s3BucketPrefix("s3BucketPrefix")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancing;

var accessLoggingPolicyProperty = new AccessLoggingPolicyProperty {
    Enabled = false,
    S3BucketName = "s3BucketName",

    // the properties below are optional
    EmitInterval = 123,
    S3BucketPrefix = "s3BucketPrefix"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

accessLoggingPolicyProperty := &AccessLoggingPolicyProperty{
	Enabled: jsii.Boolean(false),
	S3BucketName: jsii.String("s3BucketName"),

	// the properties below are optional
	EmitInterval: jsii.Number(123),
	S3BucketPrefix: jsii.String("s3BucketPrefix"),
}

Properties ​

emitIntervaloptionalnumberemit_intervaloptionalint | floatemitIntervaloptionalNumberEmitIntervaloptionaldoubleEmitIntervaloptional*float64#
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

Default: 60 minutes

enabledboolean | IResolvableenabledtyping.Union[bool, IResolvable]enabledBooleanEnabledboolEnabledinterface{}required#
Specifies whether access logs are enabled for the load balancer.
s3BucketNamestrings3_bucket_namestrs3BucketNameStringS3BucketNamestringS3BucketName*stringrequired#
The name of the Amazon S3 bucket where the access logs are stored.
s3BucketPrefixoptionalstrings3_bucket_prefixoptionalstrs3BucketPrefixoptionalStringS3BucketPrefixoptionalstringS3BucketPrefixoptional*string#
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.