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.

This is the response object from the GetConfiguration operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.AppConfig.Model.GetConfigurationResponse

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

Syntax

C#
public class GetConfigurationResponse : AmazonWebServiceResponse

The GetConfigurationResponse type exposes the following members

Constructors

NameDescription
Public Method GetConfigurationResponse()

Properties

NameTypeDescription
Public Property ConfigurationVersion System.String

Gets and sets the property ConfigurationVersion.

The configuration version.

Public Property Content System.IO.MemoryStream

Gets and sets the property Content.

The content of the configuration or the configuration data.

The Content attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and ClientConfigurationVersion matches the version of the current configuration, AppConfig returns a 204 No Content HTTP response code and the Content value will be empty.

Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ContentType System.String

Gets and sets the property ContentType.

A standard MIME type describing the format of the configuration content. For more information, see Content-Type.

Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

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:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5