- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
Hello,
One should be looking at the appconfigdata package rather than the appconfig package. This contains the two data plane APIs (StartConfigurationSession and GetLatestConfiguration) that can be used to fetch deployed configuration.
More information here using CLI (which can be converted into your desired SDK code) - https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration.html
Here's an example in Java on how you can go about integrating with our data plane.
- Example of how to start a session -
String sessionToken = client.startConfigurationSession(
StartConfigurationSessionRequest.builder()
.applicationIdentifier("some application name")
.environmentIdentifier("some environment name")
.configurationProfileIdentifier("some config profile name")
.build()).initialConfigurationToken();
- and call to get latest configuration using that initial token -
while(true) {
GetLatestConfigurationResponse getLatestConfigurationResponse = client.getLatestConfiguration(
GetLatestConfigurationRequest.builder()
.configurationToken(sessionToken)
.build());
if(getLatestConfigurationResponse.content().asByteArray().size > 0) {
// Content returned, do something with it
}
// Need to re-assign the next token returned
sessionToken = getLatestConfigurationResponse.nextPollConfigurationToken();
// Sleep for 15 seconds
Thread.sleep(15_000);
}
I hope the above shared information is insightful to your query. In case if you have any questions regarding the AWS Java SDK, you can directly reach the Dev team by pulling an issue on the Github [2]. Also, in case if you have any question regarding the AWS AppConfig service itself, which is a capability of AWS Systems Manager, please feel free to create a support ticket with our premium support team.
References:
[1] https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration.html
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 5 Monaten
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren