By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS AppConfig

Sort by most recent
  • 1
  • 12 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

AppConfig usage with AWS Java SDK v2

Hello, The Java SDK for AppConfig changed between versions v1 and v2. Dependencies below: * v1: `com.amazonaws:aws-java-sdk-appconfig:1.12.257` * v2: `` (needs `platform(" .awssdk:bom:2.17.228")` The question is: how to fetch an AppConfig configuration profile value from Java using the v2 API? Is there a code example available? I was able to find a code example about how to use the v1 API: However, I am unable to find a code example for the same purpose for the v2 API. I have some partial progress: * This will provide the AWS AppConfig client: ``` public AppConfigClient buildV2() { return AppConfigClient.create(); } ``` * This will call AppConfig to get a configuration profile response: ``` private GetConfigurationProfileResponse fetchConfigurationResult(ConfigurationProfiles.Key configurationProfileKey) { GetConfigurationProfileRequest request = GetConfigurationProfileRequest.builder() .applicationId(application) // environment? .configurationProfileId(profileName) .build(); GetConfigurationProfileResponse response = appConfigClient.getConfigurationProfile(request); return response; } ``` What I don't know are: * How to pass the AppConfig environment to the `GetConfigurationProfileRequest` instance * I understand I have to get an AppConfig token between the calls tp `create` and `fetchConfigurationResult`. How to use the v2 API to get that token? * After getting the `GetConfigurationProfileResponse` instance, how to use it for getting the actual configuration profile value? The v1 API has some methods in the `GetConfigurationResult` class like `getContentType` and `getContent` Thanks
asked a month ago
  • 1
  • 12 / page