Lists the available workload names. You can use the ListWorkloadDeploymentPatterns operation to discover the available deployment patterns for a given workload.
Parameters:
-
max_results
(Optional[MaxWorkloadResults], default:
None
)
–
The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output.
-
next_token
(Optional[NextToken], default:
None
)
–
The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.
Raises:
-
InternalServerException
–
An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on re:Post.
-
ValidationException
–
The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
List all available workloads supported by AWS Launch Wizard.
>>> client.list_workloads()
Source code in docs_src/capo_launch_wizard/_services/launch_wizard.py
| def list_workloads(
self,
*,
config_overrides: Optional[LaunchWizardClientConfig] = None,
max_results: Optional[
"capo_launch_wizard.types.max_workload_results.MaxWorkloadResults"
] = None,
next_token: Optional["capo_launch_wizard.types.next_token.NextToken"] = None,
) -> "capo_launch_wizard.types.list_workloads_output.ListWorkloadsOutput":
"""<p>Lists the available workload names. You can use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_ListWorkloadDeploymentPatterns.html">ListWorkloadDeploymentPatterns</a> operation to discover the available deployment patterns for a given workload.</p>
Args:
max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output.</p>
next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
Raises:
capo_launch_wizard.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Retry your request, but if the problem persists, contact us with details by posting a question on <a href="https://repost.aws/">re:Post</a>.</p>
capo_launch_wizard.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_launch_wizard.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
List all available workloads supported by AWS Launch Wizard.
>>> client.list_workloads()
"""
def _handler(
req: "OperationRequest[capo_launch_wizard.types.list_workloads_input.ListWorkloadsInput]",
) -> OperationResponse[
"capo_launch_wizard.types.list_workloads_output.ListWorkloadsOutput"
]:
import capo_launch_wizard._operations.launch_wizard.list_workloads
output, http_response = (
capo_launch_wizard._operations.launch_wizard.list_workloads.list_workloads(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListWorkloads")
)
input_: capo_launch_wizard.types.list_workloads_input.ListWorkloadsInput = {}
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
|