Reputation: 1
I am using AWS APP Config. I have 2 environments (DEV, PROD). I couldn`t find how can I retrieve all hosted configuration by environment? I am using C# and AWSSDK.AppConfig 3.7.102.32
I tried
var listConfiguration = await _amazonAppConfig.ListHostedConfigurationVersionsAsync(new ListHostedConfigurationVersionsRequest
{
ApplicationId = _applicationId,
ConfigurationProfileId = configurationProfileId
});
But it returns all hosted configuration but cannot differ which one is for PROD or for DEV
Upvotes: 0
Views: 116
Reputation: 188
Use ListDeployments
to get all the deployments for an Application using ApplicationId
and EnvironmentId
.
Lists the deployments for an environment in descending deployment number order.
Example:-
var client = new AmazonAppConfigClient();
var response = client.ListDeployments(new ListDeploymentsRequest
{
ApplicationId = "339ohji",
EnvironmentId = "54j1r29"
});
List<DeploymentSummary> items = response.Items;
Upvotes: 0