Skip to content

list_service_versions

list_service_versions(
    service_name: ServiceName,
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    dependent_services: Optional[DependentServiceList] = None,
    max_results: Optional[ListLimit] = None,
    next_token: Optional[String] = None,
) -> ListServiceVersionsResult

Lists all supported versions for Snow on-device services. Returns an array of ServiceVersion object containing the supported versions for a particular service.

Parameters:

  • service_name (ServiceName) –

    The name of the service for which you're requesting supported versions.

  • dependent_services (Optional[DependentServiceList], default: None ) –

    A list of names and versions of dependant services of the requested service.

  • max_results (Optional[ListLimit], default: None ) –

    The maximum number of ListServiceVersions objects to return.

  • next_token (Optional[String], default: None ) –

    Because HTTP requests are stateless, this is the starting point for the next list of returned ListServiceVersionsRequest versions.

Raises:

  • InvalidNextTokenException –

    The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

  • InvalidResourceException –

    The specified resource can't be found. Check the information you provided in your last request, and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_snowball/_services/snowball.py
def list_service_versions(
    self,
    service_name: "capo_snowball.types.service_name.ServiceName",
    *,
    config_overrides: Optional[SnowballClientConfig] = None,
    dependent_services: Optional[
        "capo_snowball.types.dependent_service_list.DependentServiceList"
    ] = None,
    max_results: Optional["capo_snowball.types.list_limit.ListLimit"] = None,
    next_token: Optional["capo_snowball.types.string.String"] = None,
) -> "capo_snowball.types.list_service_versions_result.ListServiceVersionsResult":
    """<p>Lists all supported versions for Snow on-device services. Returns an array of <code>ServiceVersion</code> object containing the supported versions for a particular service.</p>

    Args:
        service_name: <p>The name of the service for which you're requesting supported versions.</p>
        dependent_services: <p>A list of names and versions of dependant services of the requested service.</p>
        max_results: <p>The maximum number of <code>ListServiceVersions</code> objects to return.</p>
        next_token: <p>Because HTTP requests are stateless, this is the starting point for the next list of returned <code>ListServiceVersionsRequest</code> versions.</p>

    Raises:
        capo_snowball.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
        capo_snowball.errors.invalid_resource_exception.InvalidResourceException: <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
        capo_snowball.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_snowball.types.list_service_versions_request.ListServiceVersionsRequest]",
    ) -> OperationResponse[
        "capo_snowball.types.list_service_versions_result.ListServiceVersionsResult"
    ]:
        import capo_snowball._operations.awsie_snowball_job_management_service.list_service_versions

        output, http_response = (
            capo_snowball._operations.awsie_snowball_job_management_service.list_service_versions.list_service_versions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServiceVersions")
    )
    input_: capo_snowball.types.list_service_versions_request.ListServiceVersionsRequest = {
        "service_name": service_name
    }
    if dependent_services is not None:
        input_["dependent_services"] = dependent_services
    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