AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the GetConfiguration operation. (Deprecated) Retrieves the latest deployed configuration.

Note the following important information.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.AppConfig.AmazonAppConfigRequest
      Amazon.AppConfig.Model.GetConfigurationRequest

Namespace: Amazon.AppConfig.Model
Assembly: AWSSDK.AppConfig.dll
Version: 3.x.y.z

Syntax

C#
public class GetConfigurationRequest : AmazonAppConfigRequest
         IAmazonWebServiceRequest

The GetConfigurationRequest type exposes the following members

Constructors

NameDescription
Public Method GetConfigurationRequest()

Properties

NameTypeDescription
Public Property Application System.String

Gets and sets the property Application.

The application to get. Specify either the application name or the application ID.

Public Property ClientConfigurationVersion System.String

Gets and sets the property ClientConfigurationVersion.

The configuration version returned in the most recent GetConfiguration response.

AppConfig uses the value of the ClientConfigurationVersion parameter to identify the configuration version on your clients. If you don’t send ClientConfigurationVersion with each call to GetConfiguration, your clients receive the current configuration. You are charged each time your clients receive a configuration.

To avoid excess charges, we recommend you use the StartConfigurationSession and GetLatestConfiguration APIs, which track the client configuration version on your behalf. If you choose to continue using GetConfiguration, we recommend that you include the ClientConfigurationVersion value with every call to GetConfiguration. The value to use for ClientConfigurationVersion comes from the ConfigurationVersion attribute returned by GetConfiguration when there is new or updated data, and should be saved for subsequent calls to GetConfiguration.

For more information about working with configurations, see Retrieving the Configuration in the AppConfig User Guide.

Public Property ClientId System.String

Gets and sets the property ClientId.

The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.

Public Property Configuration System.String

Gets and sets the property Configuration.

The configuration to get. Specify either the configuration name or the configuration ID.

Public Property Environment System.String

Gets and sets the property Environment.

The environment to get. Specify either the environment name or the environment ID.

Examples

The following get-configuration example returns the configuration details of the example application. On subsequent calls to get-configuration, use the client-configuration-version parameter to only update the configuration of your application if the version has changed. Only updating the configuration when the version has changed avoids excess charges incurred by calling get-configuration.

To retrieve configuration details


var client = new AmazonAppConfigClient();
var response = client.GetConfiguration(new GetConfigurationRequest 
{
    Application = "example-application",
    ClientId = "example-id",
    Configuration = "Example-Configuration-Profile",
    Environment = "Example-Environment"
});

string configurationVersion = response.ConfigurationVersion;
string contentType = response.ContentType;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5