Gets a key group configuration.
To get a key group configuration, you must provide the key group's identifier. If the key group is referenced in a distribution's cache behavior, you can get the key group's identifier using ListDistributions or GetDistribution. If the key group is not referenced in a cache behavior, you can get the identifier using ListKeyGroups.
Parameters:
-
id
(string)
–
The identifier of the key group whose configuration you are getting. To get the identifier, use ListKeyGroups.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def get_key_group_config(
self,
id: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> "capo_cloudfront.types.get_key_group_config_result.GetKeyGroupConfigResult":
"""<p>Gets a key group configuration.</p> <p>To get a key group configuration, you must provide the key group's identifier. If the key group is referenced in a distribution's cache behavior, you can get the key group's identifier using <code>ListDistributions</code> or <code>GetDistribution</code>. If the key group is not referenced in a cache behavior, you can get the identifier using <code>ListKeyGroups</code>.</p>
Args:
id: <p>The identifier of the key group whose configuration you are getting. To get the identifier, use <code>ListKeyGroups</code>.</p>
Raises:
capo_cloudfront.errors.no_such_resource.NoSuchResource: <p>A resource that was specified is not valid.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.get_key_group_config_request.GetKeyGroupConfigRequest]",
) -> AsyncOperationResponse[
"capo_cloudfront.types.get_key_group_config_result.GetKeyGroupConfigResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.get_key_group_config
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.get_key_group_config.async_get_key_group_config(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetKeyGroupConfig")
)
input_: capo_cloudfront.types.get_key_group_config_request.GetKeyGroupConfigRequest = {
"id": id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|