# Environment
## Example Usage
```typescript
import { Environment } from "@launchdarkly/mcp-server/models/components";
let value: Environment = {
links: {
"self": {
href: "/api/v2/projects/my-project/environments/my-environment",
type: "application/json",
},
},
id: "57be1db38b75bf0772d11384",
key: "environment-key-123abc",
name: "My Environment",
apiKey: "sdk-xxx",
mobileKey: "mob-xxx",
color: "F5A623",
defaultTtl: 5,
secureMode: true,
defaultTrackEvents: false,
requireComments: true,
confirmChanges: true,
tags: [
"ops",
],
approvalSettings: {
required: true,
bypassApprovalsForPendingChanges: false,
minNumApprovals: 1,
canReviewOwnRequest: false,
canApplyDeclinedChanges: true,
autoApplyApprovedChanges: true,
serviceKind: "launchdarkly",
serviceConfig: {},
requiredApprovalTags: [
"require-approval",
],
serviceKindConfigurationId: "1ef45a85-218f-4428-a8b2-a97e5f56c258",
},
resourceApprovalSettings: {
"key": {
required: true,
bypassApprovalsForPendingChanges: false,
minNumApprovals: 1,
canReviewOwnRequest: false,
canApplyDeclinedChanges: true,
autoApplyApprovedChanges: true,
serviceKind: "launchdarkly",
serviceConfig: {},
requiredApprovalTags: [
"require-approval",
],
serviceKindConfigurationId: "1ef45a85-218f-4428-a8b2-a97e5f56c258",
},
},
critical: true,
};
```
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `links` | Record<string, [components.Link](../../models/components/link.md)> | :heavy_check_mark: | The location and content type of related resources | {<br/>"self": {<br/>"href": "/api/v2/projects/my-project/environments/my-environment",<br/>"type": "application/json"<br/>}<br/>} |
| `id` | *string* | :heavy_check_mark: | The ID for the environment. Use this as the client-side ID for authorization in some client-side SDKs, and to associate LaunchDarkly environments with CDN integrations in edge SDKs. | 57be1db38b75bf0772d11384 |
| `key` | *string* | :heavy_check_mark: | A project-unique key for the new environment | environment-key-123abc |
| `name` | *string* | :heavy_check_mark: | A human-friendly name for the new environment | My Environment |
| `apiKey` | *string* | :heavy_check_mark: | The SDK key for the environment. Use this for authorization in server-side SDKs. | sdk-xxx |
| `mobileKey` | *string* | :heavy_check_mark: | The mobile key for the environment. Use this for authorization in mobile SDKs. | mob-xxx |
| `color` | *string* | :heavy_check_mark: | The color used to indicate this environment in the UI | F5A623 |
| `defaultTtl` | *number* | :heavy_check_mark: | The default time (in minutes) that the PHP SDK can cache feature flag rules locally | 5 |
| `secureMode` | *boolean* | :heavy_check_mark: | Ensures that one end user of the client-side SDK cannot inspect the variations for another end user | true |
| `defaultTrackEvents` | *boolean* | :heavy_check_mark: | Enables tracking detailed information for new flags by default | false |
| `requireComments` | *boolean* | :heavy_check_mark: | Whether members who modify flags and segments through the LaunchDarkly user interface are required to add a comment | true |
| `confirmChanges` | *boolean* | :heavy_check_mark: | Whether members who modify flags and segments through the LaunchDarkly user interface are required to confirm those changes | true |
| `tags` | *string*[] | :heavy_check_mark: | A list of tags for this environment | [<br/>"ops"<br/>] |
| `approvalSettings` | [components.ApprovalSettings](../../models/components/approvalsettings.md) | :heavy_minus_sign: | N/A | |
| `resourceApprovalSettings` | Record<string, [components.ApprovalSettings](../../models/components/approvalsettings.md)> | :heavy_minus_sign: | Details on the approval settings for this environment for each resource kind | |
| `critical` | *boolean* | :heavy_check_mark: | Whether the environment is critical | true |