SDK for PHP 3.x

Client: Aws\AppConfigData\AppConfigDataClient
Service ID: appconfigdata
Version: 2021-11-11

This page describes the parameters and results for the operations of the AWS AppConfig Data (2021-11-11), and shows how to use the Aws\AppConfigData\AppConfigDataClient object to call the described operations. This documentation is specific to the 2021-11-11 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

GetLatestConfiguration ( array $params = [] )
Retrieves the latest deployed configuration.
StartConfigurationSession ( array $params = [] )
Starts a configuration session used to retrieve a deployed configuration.

Operations

GetLatestConfiguration

$result = $client->getLatestConfiguration([/* ... */]);
$promise = $client->getLatestConfigurationAsync([/* ... */]);

Retrieves the latest deployed configuration. This API may return empty configuration data if the client already has the latest version. For more information about this API action and to view example CLI commands that show how to use it with the StartConfigurationSession API action, see Retrieving the configuration in the AppConfig User Guide.

Note the following important information.

  • Each configuration token is only valid for one call to GetLatestConfiguration. The GetLatestConfiguration response includes a NextPollConfigurationToken that should always replace the token used for the just-completed call in preparation for the next one.

  • GetLatestConfiguration is a priced call. For more information, see Pricing.

Parameter Syntax

$result = $client->getLatestConfiguration([
    'ConfigurationToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationToken
Required: Yes
Type: string

Token describing the current state of the configuration session. To obtain a token, first call the StartConfigurationSession API. Note that every call to GetLatestConfiguration will return a new ConfigurationToken (NextPollConfigurationToken in the response) and must be provided to subsequent GetLatestConfiguration API calls.

This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException.

Result Syntax

[
    'Configuration' => <string || resource || Psr\Http\Message\StreamInterface>,
    'ContentType' => '<string>',
    'NextPollConfigurationToken' => '<string>',
    'NextPollIntervalInSeconds' => <integer>,
    'VersionLabel' => '<string>',
]

Result Details

Members
Configuration
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The data of the configuration. This may be empty if the client already has the latest version of configuration.

ContentType
Type: string

A standard MIME type describing the format of the configuration content.

NextPollConfigurationToken
Type: string

The latest token describing the current state of the configuration session. This must be provided to the next call to GetLatestConfiguration.

This token should only be used once. To support long poll use cases, the token is valid for up to 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException.

NextPollIntervalInSeconds
Type: int

The amount of time the client should wait before polling for configuration updates again. Use RequiredMinimumPollIntervalInSeconds to set the desired poll interval.

VersionLabel
Type: string

The user-defined label for the AppConfig hosted configuration version. This attribute doesn't apply if the configuration is not from an AppConfig hosted configuration version. If the client already has the latest version of the configuration data, this value is empty.

Errors

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The requested resource could not be found.

BadRequestException:

The input fails to satisfy the constraints specified by the service.

InternalServerException:

There was an internal failure in the service.

StartConfigurationSession

$result = $client->startConfigurationSession([/* ... */]);
$promise = $client->startConfigurationSessionAsync([/* ... */]);

Starts a configuration session used to retrieve a deployed configuration. For more information about this API action and to view example CLI commands that show how to use it with the GetLatestConfiguration API action, see Retrieving the configuration in the AppConfig User Guide.

Parameter Syntax

$result = $client->startConfigurationSession([
    'ApplicationIdentifier' => '<string>', // REQUIRED
    'ConfigurationProfileIdentifier' => '<string>', // REQUIRED
    'EnvironmentIdentifier' => '<string>', // REQUIRED
    'RequiredMinimumPollIntervalInSeconds' => <integer>,
]);

Parameter Details

Members
ApplicationIdentifier
Required: Yes
Type: string

The application ID or the application name.

ConfigurationProfileIdentifier
Required: Yes
Type: string

The configuration profile ID or the configuration profile name.

EnvironmentIdentifier
Required: Yes
Type: string

The environment ID or the environment name.

RequiredMinimumPollIntervalInSeconds
Type: int

Sets a constraint on a session. If you specify a value of, for example, 60 seconds, then the client that established the session can't call GetLatestConfiguration more frequently than every 60 seconds.

Result Syntax

[
    'InitialConfigurationToken' => '<string>',
]

Result Details

Members
InitialConfigurationToken
Type: string

Token encapsulating state about the configuration session. Provide this token to the GetLatestConfiguration API to retrieve configuration data.

This token should only be used once in your first call to GetLatestConfiguration. You must use the new token in the GetLatestConfiguration response (NextPollConfigurationToken) in each subsequent call to GetLatestConfiguration.

The InitialConfigurationToken and NextPollConfigurationToken should only be used once. To support long poll use cases, the tokens are valid for up to 24 hours. If a GetLatestConfiguration call uses an expired token, the system returns BadRequestException.

Errors

ThrottlingException:

The request was denied due to request throttling.

ResourceNotFoundException:

The requested resource could not be found.

BadRequestException:

The input fails to satisfy the constraints specified by the service.

InternalServerException:

There was an internal failure in the service.

Shapes

BadRequestDetails

Description

Detailed information about the input that failed to satisfy the constraints specified by a call.

Members
InvalidParameters
Type: Associative array of custom strings keys (String) to InvalidParameterDetail structures

One or more specified parameters are not valid for the call.

BadRequestException

Description

The input fails to satisfy the constraints specified by the service.

Members
Details
Type: BadRequestDetails structure

Details describing why the request was invalid.

Message
Type: string
Reason
Type: string

Code indicating the reason the request was invalid.

InternalServerException

Description

There was an internal failure in the service.

Members
Message
Type: string

InvalidParameterDetail

Description

Information about an invalid parameter.

Members
Problem
Type: string

The reason the parameter is invalid.

ResourceNotFoundException

Description

The requested resource could not be found.

Members
Message
Type: string
ReferencedBy
Type: Associative array of custom strings keys (String) to strings

A map indicating which parameters in the request reference the resource that was not found.

ResourceType
Type: string

The type of resource that was not found.

ThrottlingException

Description

The request was denied due to request throttling.

Members
Message
Type: string