get_flag
async
¶
get_flag(
application: Identifier,
environment: Identifier,
configuration: ConfigurationIdentifier,
flag: FlagKey,
*,
config_overrides: Optional[AsyncAppConfigCloudExtensionClientConfig] = None,
context: Optional[RequestContext] = None,
) -> GetFlagResponse
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.
Parameters:
-
application(Identifier) –The name or ID of the AWS AppConfig application.
-
environment(Identifier) –The name or ID of the AWS AppConfig environment the configuration is deployed to.
-
configuration(ConfigurationIdentifier) –The name or ID of the feature flag configuration profile.
-
flag(FlagKey) –The key of the flag to return.
-
context(Optional[RequestContext], default:None) –The request context that the flag's variant rules are evaluated against.
Raises:
-
AccessDeniedException–Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
-
BadGatewayException–No usable answer came back: from the service AWS Cloud Extensions retrieves its profile from, from the Extension, or from a service the Extension calls. The reason says what to do, such as fixing the profile or role, checking the Extension's settings, or using an earlier version of the Extension.
-
InternalServerException–An unexpected internal error occurred. Retry the request.
-
LoopDetectedException–The request is part of a chain of calls that loops back through AWS Cloud Extensions.
-
RequestEntityTooLargeException–The request body is larger than AWS Cloud Extensions accepts.
-
ServiceUnavailableException–AWS Cloud Extensions can't serve the request now. Retry it.
-
ThrottlingException–The call was throttled. Retry after the time Retry-After gives, when it is set. The reason says what throttled it.
-
UpgradeRequiredException–The Extension needs a newer version of AWS Cloud Extensions. Upgrade it, or use an earlier version of the Extension.
-
ValidationException–The request does not fit the operation's model. The message describes every failure and may change; read reason and errors to act on them.
-
UnknownServiceError–The service returned an error code this client does not model.