Each of the following samples includes comments about the actions performed by the code. The samples in this section call the following APIs:
public CreateHostedConfigurationVersionResponse createHostedConfigVersion() {
AppConfigClient appconfig = AppConfigClient.create();
// Create an application
CreateApplicationResponse app = appconfig.createApplication(req -> req.name("MyDemoApp"));
// Create a hosted, freeform configuration profile
CreateConfigurationProfileResponse configProfile = appconfig.createConfigurationProfile(req -> req
.applicationId(app.id())
.name("MyConfigProfile")
.locationUri("hosted")
.type("AWS.Freeform"));
// Create a hosted configuration version
CreateHostedConfigurationVersionResponse hcv = appconfig.createHostedConfigurationVersion(req -> req
.applicationId(app.id())
.configurationProfileId(configProfile.id())
.contentType("text/plain; charset=utf-8")
.content(SdkBytes.fromUtf8String("my config data")));
return hcv;
}