| 545 | } |
| 546 | |
| 547 | export async function updateEnvironment( |
| 548 | client: AppConfigClient, |
| 549 | applicationId: string, |
| 550 | environmentId: string, |
| 551 | name?: string | null, |
| 552 | description?: string | null |
| 553 | ) { |
| 554 | const response = await client.send( |
| 555 | new UpdateEnvironmentCommand({ |
| 556 | ApplicationId: applicationId, |
| 557 | EnvironmentId: environmentId, |
| 558 | ...(name ? { Name: name } : {}), |
| 559 | ...(description != null ? { Description: description } : {}), |
| 560 | }) |
| 561 | ) |
| 562 | |
| 563 | return { |
| 564 | message: `Environment "${response.Name ?? environmentId}" updated`, |
| 565 | applicationId: response.ApplicationId ?? applicationId, |
| 566 | id: response.Id ?? '', |
| 567 | name: response.Name ?? '', |
| 568 | state: response.State ?? null, |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | export async function deleteEnvironment( |
| 573 | client: AppConfigClient, |