Describes all packages available to Amazon ES. Includes options for filtering, limiting the number of results, and pagination.
Parameters:
-
filters
(Optional[DescribePackagesFilterList], default:
None
)
–
Only returns packages that match the DescribePackagesFilterList values.
-
max_results
(Optional[MaxResults], default:
None
)
–
Limits results to a maximum number of packages.
-
next_token
(Optional[NextToken], default:
None
)
–
Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.
Raises:
-
AccessDeniedException
–
An error occurred because user does not have permissions to access the resource. Returns HTTP status code 403.
-
BaseException
–
An error occurred while processing the request.
-
InternalException
–
The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.
-
ResourceNotFoundException
–
An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.
-
ValidationException
–
An exception for missing / invalid input fields. Gives http status code of 400.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elasticsearch_service/_services/elasticsearch_service.py
| def describe_packages(
self,
*,
config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
filters: Optional[
"capo_elasticsearch_service.types.describe_packages_filter_list.DescribePackagesFilterList"
] = None,
max_results: Optional[
"capo_elasticsearch_service.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_elasticsearch_service.types.next_token.NextToken"
] = None,
) -> "capo_elasticsearch_service.types.describe_packages_response.DescribePackagesResponse":
"""<p>Describes all packages available to Amazon ES. Includes options for filtering, limiting the number of results, and pagination.</p>
Args:
filters: <p>Only returns packages that match the <code>DescribePackagesFilterList</code> values.</p>
max_results: <p>Limits results to a maximum number of packages.</p>
next_token: <p>Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided, returns results for the next page.</p>
Raises:
capo_elasticsearch_service.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because user does not have permissions to access the resource. Returns HTTP status code 403.</p>
capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elasticsearch_service.types.describe_packages_request.DescribePackagesRequest]",
) -> OperationResponse[
"capo_elasticsearch_service.types.describe_packages_response.DescribePackagesResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.describe_packages
output, http_response = (
capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.describe_packages.describe_packages(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribePackages")
)
input_: capo_elasticsearch_service.types.describe_packages_request.DescribePackagesRequest = {}
if filters is not None:
input_["filters"] = filters
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|