( client: AppConfigDataClient, applicationId: string, environmentId: string, configurationProfileId: string )
| 455 | } |
| 456 | |
| 457 | export async function getConfiguration( |
| 458 | client: AppConfigDataClient, |
| 459 | applicationId: string, |
| 460 | environmentId: string, |
| 461 | configurationProfileId: string |
| 462 | ) { |
| 463 | const session = await client.send( |
| 464 | new StartConfigurationSessionCommand({ |
| 465 | ApplicationIdentifier: applicationId, |
| 466 | EnvironmentIdentifier: environmentId, |
| 467 | ConfigurationProfileIdentifier: configurationProfileId, |
| 468 | }) |
| 469 | ) |
| 470 | |
| 471 | const response = await client.send( |
| 472 | new GetLatestConfigurationCommand({ |
| 473 | ConfigurationToken: session.InitialConfigurationToken, |
| 474 | }) |
| 475 | ) |
| 476 | |
| 477 | return { |
| 478 | configuration: decodeContent(response.Configuration), |
| 479 | contentType: response.ContentType ?? null, |
| 480 | versionLabel: response.VersionLabel ?? null, |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | export async function getApplication(client: AppConfigClient, applicationId: string) { |
| 485 | const response = await client.send(new GetApplicationCommand({ ApplicationId: applicationId })) |
no test coverage detected