# EnvironmentAttributes

Attributes of an existing AWS AppConfig environment to import it.

Used as argument in: [Environment.fromEnvironmentAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.Environment.html#fromenvironmentattributes)

- Source: [`aws-appconfig/lib/environment.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appconfig/lib/environment.ts#L21)
- Type last changed: v2.130.0 · 23 Feb 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appconfig as appconfig } from 'aws-cdk-lib';

declare const application: appconfig.Application;
declare const monitor: appconfig.Monitor;
const environmentAttributes: appconfig.EnvironmentAttributes = {
  application: application,
  environmentId: 'environmentId',

  // the properties below are optional
  description: 'description',
  monitors: [monitor],
  name: 'name',
};
```

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_appconfig as appconfig

# application: appconfig.Application
# monitor: appconfig.Monitor

environment_attributes = appconfig.EnvironmentAttributes(
    application=application,
    environment_id="environmentId",

    # the properties below are optional
    description="description",
    monitors=[monitor],
    name="name"
)
```

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

Application application;
Monitor monitor;

EnvironmentAttributes environmentAttributes = EnvironmentAttributes.builder()
        .application(application)
        .environmentId("environmentId")

        // the properties below are optional
        .description("description")
        .monitors(List.of(monitor))
        .name("name")
        .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.AppConfig;

Application application;
Monitor monitor;

var environmentAttributes = new EnvironmentAttributes {
    Application = application,
    EnvironmentId = "environmentId",

    // the properties below are optional
    Description = "description",
    Monitors = new [] { monitor },
    Name = "name"
};
```

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"

var application Application
var monitor Monitor

environmentAttributes := &EnvironmentAttributes{
	Application: application,
	EnvironmentId: jsii.String("environmentId"),

	// the properties below are optional
	Description: jsii.String("description"),
	Monitors: []Monitor{
		monitor,
	},
	Name: jsii.String("name"),
}
```

## Properties

- `application`: [IApplication](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.IApplication.html) (required) — The application associated with the environment.

- `description`: string = None. — The description of the environment.

- `environmentId`: string (required) — The ID of the environment.

- `monitors`: [Monitor](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.Monitor.html)[] = None. — The monitors for the environment.

- `name`: string = None. — The name of the environment.
