# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: appconfigdata
using AWS.Compat
using AWS.UUIDs

"""
    get_latest_configuration(configuration_token)
    get_latest_configuration(configuration_token, params::Dict{String,<:Any})

Retrieves the latest deployed configuration. This API may return empty Configuration data
if the client already has the latest version. See StartConfigurationSession to obtain an
InitialConfigurationToken to call this API.  Each call to GetLatestConfiguration returns a
new ConfigurationToken (NextPollConfigurationToken in the response). This new token MUST be
provided to the next call to GetLatestConfiguration when polling for configuration updates.
To avoid excess charges, we recommend that you include the ClientConfigurationVersion value
with every call to GetConfiguration. This value must be saved on your client. Subsequent
calls to GetConfiguration must pass this value by using the ClientConfigurationVersion
parameter.

# Arguments
- `configuration_token`: 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.

"""
function get_latest_configuration(
    configuration_token; aws_config::AbstractAWSConfig=global_aws_config()
)
    return appconfigdata(
        "GET",
        "/configuration",
        Dict{String,Any}("configuration_token" => configuration_token);
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function get_latest_configuration(
    configuration_token,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return appconfigdata(
        "GET",
        "/configuration",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}("configuration_token" => configuration_token),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end

"""
    start_configuration_session(application_identifier, configuration_profile_identifier, environment_identifier)
    start_configuration_session(application_identifier, configuration_profile_identifier, environment_identifier, params::Dict{String,<:Any})

Starts a configuration session used to retrieve a deployed configuration. See the
GetLatestConfiguration API for more details.

# Arguments
- `application_identifier`: The application ID or the application name.
- `configuration_profile_identifier`: The configuration profile ID or the configuration
  profile name.
- `environment_identifier`: The environment ID or the environment name.

# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"RequiredMinimumPollIntervalInSeconds"`: The interval at which your client will poll for
  configuration. If provided, the service will throw a BadRequestException if the client
  polls before the specified poll interval. By default, client poll intervals are not
  enforced.
"""
function start_configuration_session(
    ApplicationIdentifier,
    ConfigurationProfileIdentifier,
    EnvironmentIdentifier;
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return appconfigdata(
        "POST",
        "/configurationsessions",
        Dict{String,Any}(
            "ApplicationIdentifier" => ApplicationIdentifier,
            "ConfigurationProfileIdentifier" => ConfigurationProfileIdentifier,
            "EnvironmentIdentifier" => EnvironmentIdentifier,
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
function start_configuration_session(
    ApplicationIdentifier,
    ConfigurationProfileIdentifier,
    EnvironmentIdentifier,
    params::AbstractDict{String};
    aws_config::AbstractAWSConfig=global_aws_config(),
)
    return appconfigdata(
        "POST",
        "/configurationsessions",
        Dict{String,Any}(
            mergewith(
                _merge,
                Dict{String,Any}(
                    "ApplicationIdentifier" => ApplicationIdentifier,
                    "ConfigurationProfileIdentifier" => ConfigurationProfileIdentifier,
                    "EnvironmentIdentifier" => EnvironmentIdentifier,
                ),
                params,
            ),
        );
        aws_config=aws_config,
        feature_set=SERVICE_FEATURE_SET,
    )
end
