Skip to content

list_device_fleets

list_device_fleets(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[ListMaxResults] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    last_modified_time_after: Optional[Timestamp] = None,
    last_modified_time_before: Optional[Timestamp] = None,
    name_contains: Optional[NameContains] = None,
    sort_by: Optional[ListDeviceFleetsSortBy] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListDeviceFleetsResponse

Returns a list of devices in the fleet.

Parameters:

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

    The response from the last list when returning a list large enough to need tokening.

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

    The maximum number of results to select.

  • creation_time_after (Optional[Timestamp], default: None ) –

    Filter fleets where packaging job was created after specified time.

  • creation_time_before (Optional[Timestamp], default: None ) –

    Filter fleets where the edge packaging job was created before specified time.

  • last_modified_time_after (Optional[Timestamp], default: None ) –

    Select fleets where the job was updated after X

  • last_modified_time_before (Optional[Timestamp], default: None ) –

    Select fleets where the job was updated before X

  • name_contains (Optional[NameContains], default: None ) –

    Filter for fleets containing this name in their fleet device name.

  • sort_by (Optional[ListDeviceFleetsSortBy], default: None ) –

    The column to sort by.

  • sort_order (Optional[SortOrder], default: None ) –

    What direction to sort in.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_device_fleets(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_sagemaker.types.list_max_results.ListMaxResults"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    last_modified_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.list_device_fleets_sort_by.ListDeviceFleetsSortBy"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
) -> "capo_sagemaker.types.list_device_fleets_response.ListDeviceFleetsResponse":
    """<p>Returns a list of devices in the fleet.</p>

    Args:
        next_token: <p>The response from the last list when returning a list large enough to need tokening.</p>
        max_results: <p>The maximum number of results to select.</p>
        creation_time_after: <p>Filter fleets where packaging job was created after specified time.</p>
        creation_time_before: <p>Filter fleets where the edge packaging job was created before specified time.</p>
        last_modified_time_after: <p>Select fleets where the job was updated after X</p>
        last_modified_time_before: <p>Select fleets where the job was updated before X</p>
        name_contains: <p>Filter for fleets containing this name in their fleet device name.</p>
        sort_by: <p>The column to sort by.</p>
        sort_order: <p>What direction to sort in.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_device_fleets_request.ListDeviceFleetsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_device_fleets_response.ListDeviceFleetsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_device_fleets

        output, http_response = (
            capo_sagemaker._operations.sage_maker.list_device_fleets.list_device_fleets(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDeviceFleets")
    )
    input_: capo_sagemaker.types.list_device_fleets_request.ListDeviceFleetsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if last_modified_time_after is not None:
        input_["last_modified_time_after"] = last_modified_time_after
    if last_modified_time_before is not None:
        input_["last_modified_time_before"] = last_modified_time_before
    if name_contains is not None:
        input_["name_contains"] = name_contains
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output