AppConfigCloudExtension / Client / get_flag
get_flag¶
- AppConfigCloudExtension.Client.get_flag(**kwargs)¶
Returns one flag of a feature flag configuration profile from the Extension’s local cache. For a profile with variants, the flag’s rules are evaluated locally against the request context.
See also: AWS API Documentation
Request Syntax
response = client.get_flag( application='string', environment='string', configuration='string', flag='string', context={ 'string': 'string' } )
- Parameters:
application (string) –
[REQUIRED]
The name or ID of the AWS AppConfig application.
environment (string) –
[REQUIRED]
The name or ID of the AWS AppConfig environment the configuration is deployed to.
configuration (string) –
[REQUIRED]
The name or ID of the feature flag configuration profile.
flag (string) –
[REQUIRED]
The key of the flag to return.
context (dict) –
The request context that the flag’s variant rules are evaluated against.
(string) –
A request context key that variant rules can read.
(string) –
A request context value, used as sent. A value that a rule reads as a timestamp is invalid when it contains :: or null.
- Return type:
dict
- Returns:
Response Syntax
{ 'enabled': True|False, 'variant': 'string', 'attributes': { 'string': { 'string': 'string', 'number': 123.0, 'boolean': True|False, 'stringList': [ 'string', ], 'numberList': [ 123.0, ] } } }
Response Structure
(dict) –
The output of GetFlag.
enabled (boolean) –
Whether the flag is enabled.
variant (string) –
The name of the variant the request context matched, absent when the flag has no variants.
attributes (dict) –
The flag’s attribute values, by attribute key, absent when the flag has none.
(string) –
The key of a flag attribute.
(dict) –
A flag attribute value. Exactly one member is set, according to the attribute’s type.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
string,number,boolean,stringList,numberList. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
string (string) –
A string attribute value.
number (float) –
A number attribute value.
boolean (boolean) –
A boolean attribute value.
stringList (list) –
A list of strings attribute value.
(string) –
numberList (list) –
A list of numbers attribute value.
(float) –
Exceptions
AppConfigCloudExtension.Client.exceptions.ValidationExceptionAppConfigCloudExtension.Client.exceptions.AccessDeniedExceptionAppConfigCloudExtension.Client.exceptions.ServiceUnavailableExceptionAppConfigCloudExtension.Client.exceptions.RequestEntityTooLargeExceptionAppConfigCloudExtension.Client.exceptions.BadGatewayExceptionAppConfigCloudExtension.Client.exceptions.ThrottlingExceptionAppConfigCloudExtension.Client.exceptions.UpgradeRequiredExceptionAppConfigCloudExtension.Client.exceptions.InternalServerExceptionAppConfigCloudExtension.Client.exceptions.LoopDetectedException