# FileAccessLogProperty

An object that represents an access log file.

- 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_appmesh as appmesh } from 'aws-cdk-lib';
const fileAccessLogProperty: appmesh.CfnVirtualNode.FileAccessLogProperty = {
  path: 'path',

  // the properties below are optional
  format: {
    json: [{
      key: 'key',
      value: 'value',
    }],
    text: 'text',
  },
};
```

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_appmesh as appmesh

file_access_log_property = appmesh.CfnVirtualNode.FileAccessLogProperty(
    path="path",

    # the properties below are optional
    format=appmesh.CfnVirtualNode.LoggingFormatProperty(
        json=[appmesh.CfnVirtualNode.JsonFormatRefProperty(
            key="key",
            value="value"
        )],
        text="text"
    )
)
```

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.appmesh.*;

FileAccessLogProperty fileAccessLogProperty = FileAccessLogProperty.builder()
        .path("path")

        // the properties below are optional
        .format(LoggingFormatProperty.builder()
                .json(List.of(JsonFormatRefProperty.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .text("text")
                .build())
        .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.AppMesh;

var fileAccessLogProperty = new FileAccessLogProperty {
    Path = "path",

    // the properties below are optional
    Format = new LoggingFormatProperty {
        Json = new [] { new JsonFormatRefProperty {
            Key = "key",
            Value = "value"
        } },
        Text = "text"
    }
};
```

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"

fileAccessLogProperty := &FileAccessLogProperty{
	Path: jsii.String("path"),

	// the properties below are optional
	Format: &LoggingFormatProperty{
		Json: []interface{}{
			&JsonFormatRefProperty{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
		Text: jsii.String("text"),
	},
}
```

## Properties

- `format`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVirtualNode.LoggingFormatProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.CfnVirtualNode.LoggingFormatProperty.html) — The specified format for the logs.

  The format is either `json_format` or `text_format` .

- `path`: string (required) — The file path to write access logs to.

  You can use `/dev/stdout` to send access logs to standard out and configure your Envoy container to use a log driver, such as `awslogs` , to export the access logs to a log storage service such as Amazon CloudWatch Logs. You can also specify a path in the Envoy container's file system to write the files to disk.

  > The Envoy process must have write permissions to the path that you specify here. Otherwise, Envoy fails to bootstrap properly.
