Returns a list of key value pairs.
Parameters:
-
kvs_arn
(KvsARN)
–
The Amazon Resource Name (ARN) of the Key Value Store.
-
next_token
(Optional[str], default:
None
)
–
If nextToken is returned in the response, there are more results available. Make the next call using the returned token to retrieve the next page.
-
max_results
(Optional[int], default:
None
)
–
Maximum number of results that are returned per call. The default is 10 and maximum allowed page is 50.
Raises:
Examples:
List keys in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.list_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', max_results=3)
List the next page in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.list_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', max_results=3, next_token='hVTTZndkpBZ0VRZ0R1RF')
Source code in docs_src/capo_cloudfront_keyvaluestore/_services/cloud_front_key_value_store.py
| def list_keys(
self,
kvs_arn: "capo_cloudfront_keyvaluestore.types.kvs_arn.KvsARN",
*,
config_overrides: Optional[CloudFrontKeyValueStoreClientConfig] = None,
next_token: Optional[str] = None,
max_results: Optional[int] = None,
) -> "capo_cloudfront_keyvaluestore.types.list_keys_response.ListKeysResponse":
"""<p>Returns a list of key value pairs.</p>
Args:
kvs_arn: <p>The Amazon Resource Name (ARN) of the Key Value Store.</p>
next_token: <p>If nextToken is returned in the response, there are more results available. Make the next call using the returned token to retrieve the next page.</p>
max_results: <p>Maximum number of results that are returned per call. The default is 10 and maximum allowed page is 50.</p>
Raises:
capo_cloudfront_keyvaluestore.errors.access_denied_exception.AccessDeniedException: <p>Access denied.</p>
capo_cloudfront_keyvaluestore.errors.conflict_exception.ConflictException: <p>Resource is not in expected state.</p>
capo_cloudfront_keyvaluestore.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
capo_cloudfront_keyvaluestore.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource was not found.</p>
capo_cloudfront_keyvaluestore.errors.validation_exception.ValidationException: <p>Validation failed.</p>
capo_cloudfront_keyvaluestore.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List keys in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.list_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', max_results=3)
List the next page in the key value store with ARN 'arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58'
>>> client.list_keys(kvs_arn='arn:aws:cloudfront::123456789012:key-value-store/327284aa-bcd5-499f-a3ff-26b9a9d31b58', max_results=3, next_token='hVTTZndkpBZ0VRZ0R1RF')
"""
def _handler(
req: "OperationRequest[capo_cloudfront_keyvaluestore.types.list_keys_request.ListKeysRequest]",
) -> OperationResponse[
"capo_cloudfront_keyvaluestore.types.list_keys_response.ListKeysResponse"
]:
import capo_cloudfront_keyvaluestore._operations.cloud_front_key_value_store.list_keys
output, http_response = (
capo_cloudfront_keyvaluestore._operations.cloud_front_key_value_store.list_keys.list_keys(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_cloudfront_keyvaluestore.types.list_keys_response.ListKeysResponse",
) -> dict[str, Any]:
import capo_cloudfront_keyvaluestore.types.list_keys_response
return (
capo_cloudfront_keyvaluestore.types.list_keys_response.redact_sensitive(
output
)
)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListKeys", redact_output=_redact_output)
)
input_: capo_cloudfront_keyvaluestore.types.list_keys_request.ListKeysRequest = {
"kvs_arn": kvs_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|