# AccessLoggingPolicyProperty

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `emitInterval`: number — The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.

  Default: 60 minutes

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Specifies whether access logs are enabled for the load balancer.

- `s3BucketName`: string (required) — The name of the Amazon S3 bucket where the access logs are stored.

- `s3BucketPrefix`: 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.
