Returns a list of Amazon OpenSearch Service package versions, along with their creation time, commit message, and plugin properties (if the package is a zip plugin package). For more information, see Custom packages for Amazon OpenSearch Service.
Parameters:
-
package_id
(PackageID)
–
The unique identifier of the package.
-
max_results
(Optional[MaxResults], default:
None
)
–
An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.
-
next_token
(Optional[NextToken], default:
None
)
–
If your initial GetPackageVersionHistory operation returns a nextToken, you can include the returned nextToken in subsequent GetPackageVersionHistory operations, which returns results in the next page.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def get_package_version_history(
self,
package_id: "capo_opensearch.types.package_id.PackageID",
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
max_results: Optional["capo_opensearch.types.max_results.MaxResults"] = None,
next_token: Optional["capo_opensearch.types.next_token.NextToken"] = None,
) -> "capo_opensearch.types.get_package_version_history_response.GetPackageVersionHistoryResponse":
"""<p>Returns a list of Amazon OpenSearch Service package versions, along with their creation time, commit message, and plugin properties (if the package is a zip plugin package). For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/custom-packages.html">Custom packages for Amazon OpenSearch Service</a>.</p>
Args:
package_id: <p>The unique identifier of the package.</p>
max_results: <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
next_token: <p>If your initial <code>GetPackageVersionHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetPackageVersionHistory</code> operations, which returns results in the next page. </p>
Raises:
capo_opensearch.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because you don't have permissions to access the resource.</p>
capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_opensearch.types.get_package_version_history_request.GetPackageVersionHistoryRequest]",
) -> OperationResponse[
"capo_opensearch.types.get_package_version_history_response.GetPackageVersionHistoryResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.get_package_version_history
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.get_package_version_history.get_package_version_history(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetPackageVersionHistory")
)
input_: capo_opensearch.types.get_package_version_history_request.GetPackageVersionHistoryRequest = {
"package_id": package_id
}
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
|