/
appconfigdata.jl
122 lines (114 loc) · 4.62 KB
/
appconfigdata.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# 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. 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 Receiving 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.
# 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. 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 Receiving the configuration in the
AppConfig User Guide.
# 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"`: 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 then every 60 seconds.
"""
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