startConfigurationSession method
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.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter applicationIdentifier :
The application ID or the application name.
Parameter configurationProfileIdentifier :
The configuration profile ID or the configuration profile name.
Parameter environmentIdentifier :
The environment ID or the environment name.
Parameter requiredMinimumPollIntervalInSeconds :
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.
Implementation
Future<StartConfigurationSessionResponse> startConfigurationSession({
required String applicationIdentifier,
required String configurationProfileIdentifier,
required String environmentIdentifier,
int? requiredMinimumPollIntervalInSeconds,
}) async {
_s.validateNumRange(
'requiredMinimumPollIntervalInSeconds',
requiredMinimumPollIntervalInSeconds,
15,
86400,
);
final $payload = <String, dynamic>{
'ApplicationIdentifier': applicationIdentifier,
'ConfigurationProfileIdentifier': configurationProfileIdentifier,
'EnvironmentIdentifier': environmentIdentifier,
if (requiredMinimumPollIntervalInSeconds != null)
'RequiredMinimumPollIntervalInSeconds':
requiredMinimumPollIntervalInSeconds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/configurationsessions',
exceptionFnMap: _exceptionFns,
);
return StartConfigurationSessionResponse.fromJson(response);
}