Lists the ACTIVE and DEPRECATED versions of a module that you can attach, highest version first (numerically by MAJOR, then MINOR, then PATCH). If you can't attach the module, the operation returns ResourceNotFoundException, the same as for a missing one. If the module has no ACTIVE or DEPRECATED versions, the operation returns an empty list. The operation lists DEPRECATED versions so that you can inspect one that you've attached, but you can't attach them. Results are paginated. Use nextToken to get the next page.
Parameters:
-
module_id
(ModuleId)
–
-
status
(Optional[ModuleVersionStatus], default:
None
)
–
Lists only versions in this status. Only ACTIVE and DEPRECATED versions are listed, so another value returns an empty list.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results for each page, from 1 to 10. The default is 10.
-
next_token
(Optional[str], default:
None
)
–
If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours; using an expired token fails with ValidationException.
Raises:
Examples:
List a module's versions
Lists the versions of a module that you can attach, highest version first.
>>> await client.list_available_module_versions(module_id='module-8kq2p9wx3fnv1c5htj7bd0ral', max_results=10)
Source code in docs_src/capo_rtbfabric/_services/async_rtb_fabric.py
| async def list_available_module_versions(
self,
module_id: "capo_rtbfabric.types.module_id.ModuleId",
*,
config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
status: Optional[
"capo_rtbfabric.types.module_version_status.ModuleVersionStatus"
] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_rtbfabric.types.list_available_module_versions_response.ListAvailableModuleVersionsResponse":
"""<p>Lists the ACTIVE and DEPRECATED versions of a module that you can attach, highest version first (numerically by MAJOR, then MINOR, then PATCH). If you can't attach the module, the operation returns ResourceNotFoundException, the same as for a missing one. If the module has no ACTIVE or DEPRECATED versions, the operation returns an empty list. The operation lists DEPRECATED versions so that you can inspect one that you've attached, but you can't attach them. Results are paginated. Use <code>nextToken</code> to get the next page.</p>
Args:
module_id: <p>The module's ID.</p>
status: <p>Lists only versions in this status. Only ACTIVE and DEPRECATED versions are listed, so another value returns an empty list.</p>
max_results: <p>The maximum number of results for each page, from 1 to 10. The default is 10.</p>
next_token: <p>If nextToken is returned, there are more results available. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours; using an expired token fails with ValidationException.</p>
Raises:
capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
capo_rtbfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request could not be completed because the resource does not exist.</p>
capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List a module's versions
Lists the versions of a module that you can attach, highest version first.
>>> await client.list_available_module_versions(module_id='module-8kq2p9wx3fnv1c5htj7bd0ral', max_results=10)
"""
async def _handler(
req: "AsyncOperationRequest[capo_rtbfabric.types.list_available_module_versions_request.ListAvailableModuleVersionsRequest]",
) -> AsyncOperationResponse[
"capo_rtbfabric.types.list_available_module_versions_response.ListAvailableModuleVersionsResponse"
]:
import capo_rtbfabric._operations.rtb_fabric.list_available_module_versions
(
output,
http_response,
) = await capo_rtbfabric._operations.rtb_fabric.list_available_module_versions.async_list_available_module_versions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAvailableModuleVersions")
)
input_: capo_rtbfabric.types.list_available_module_versions_request.ListAvailableModuleVersionsRequest = {
"module_id": module_id
}
if status is not None:
input_["status"] = status
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|