# EnvironmentFileConfig

Configuration for the environment file.

- Source: [`aws-ecs/lib/environment-file.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-ecs/lib/environment-file.ts#L109)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const environmentFileConfig: ecs.EnvironmentFileConfig = {
  fileType: ecs.EnvironmentFileType.S3,
  s3Location: {
    bucketName: 'bucketName',
    objectKey: 'objectKey',

    // the properties below are optional
    objectVersion: 'objectVersion',
  },
};
```

Python:

```python
from aws_cdk.aws_s3 import Location
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

environment_file_config = ecs.EnvironmentFileConfig(
    file_type=ecs.EnvironmentFileType.S3,
    s3_location=Location(
        bucket_name="bucketName",
        object_key="objectKey",

        # the properties below are optional
        object_version="objectVersion"
    )
)
```

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

EnvironmentFileConfig environmentFileConfig = EnvironmentFileConfig.builder()
        .fileType(EnvironmentFileType.S3)
        .s3Location(Location.builder()
                .bucketName("bucketName")
                .objectKey("objectKey")

                // the properties below are optional
                .objectVersion("objectVersion")
                .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.ECS;

var environmentFileConfig = new EnvironmentFileConfig {
    FileType = EnvironmentFileType.S3,
    S3Location = new Location {
        BucketName = "bucketName",
        ObjectKey = "objectKey",

        // the properties below are optional
        ObjectVersion = "objectVersion"
    }
};
```

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"

environmentFileConfig := &EnvironmentFileConfig{
	FileType: awscdk.Aws_ecs.EnvironmentFileType_S3,
	S3Location: &Location{
		BucketName: jsii.String("bucketName"),
		ObjectKey: jsii.String("objectKey"),

		// the properties below are optional
		ObjectVersion: jsii.String("objectVersion"),
	},
}
```

## Properties

- `fileType`: [EnvironmentFileType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.EnvironmentFileType.html) (required) — The type of environment file.

- `s3Location`: [Location](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Location.html) (required) — The location of the environment file in S3.
