Skip to content

list_fleets

list_fleets(
    farm_id: FarmId,
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    principal_id: Optional[IdentityCenterPrincipalId] = None,
    display_name: Optional[ResourceName] = None,
    status: Optional[FleetStatus] = None,
) -> ListFleetsResponse

Lists fleets.

Parameters:

  • farm_id (FarmId) –

    The farm ID of the fleets.

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

    The token for the next set of results, or null to start from the beginning.

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

    The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

  • principal_id (Optional[IdentityCenterPrincipalId], default: None ) –

    The principal ID of the members to include in the fleet.

  • display_name (Optional[ResourceName], default: None ) –

    The display names of a list of fleets.

    This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.

  • status (Optional[FleetStatus], default: None ) –

    The status of the fleet.

Raises:

Source code in docs_src/capo_deadline/_services/deadline.py
def list_fleets(
    self,
    farm_id: "capo_deadline.types.farm_id.FarmId",
    *,
    config_overrides: Optional[deadlineClientConfig] = None,
    next_token: Optional["capo_deadline.types.next_token.NextToken"] = None,
    max_results: Optional["capo_deadline.types.max_results.MaxResults"] = None,
    principal_id: Optional[
        "capo_deadline.types.identity_center_principal_id.IdentityCenterPrincipalId"
    ] = None,
    display_name: Optional["capo_deadline.types.resource_name.ResourceName"] = None,
    status: Optional["capo_deadline.types.fleet_status.FleetStatus"] = None,
) -> "capo_deadline.types.list_fleets_response.ListFleetsResponse":
    """<p>Lists fleets.</p>

    Args:
        farm_id: <p>The farm ID of the fleets.</p>
        next_token: <p>The token for the next set of results, or <code>null</code> to start from the beginning.</p>
        max_results: <p>The maximum number of results to return. Use this parameter with <code>NextToken</code> to get results as a set of sequential pages.</p>
        principal_id: <p>The principal ID of the members to include in the fleet.</p>
        display_name: <p>The display names of a list of fleets.</p> <important> <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p> </important>
        status: <p>The status of the fleet.</p>

    Raises:
        capo_deadline.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
        capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: <p>Deadline Cloud can't process your request right now. Try again later.</p>
        capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_deadline.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota.</p>
        capo_deadline.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
        capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_deadline.types.list_fleets_request.ListFleetsRequest]",
    ) -> OperationResponse[
        "capo_deadline.types.list_fleets_response.ListFleetsResponse"
    ]:
        import capo_deadline._operations.deadline.list_fleets

        output, http_response = (
            capo_deadline._operations.deadline.list_fleets.list_fleets(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListFleets")
    )
    input_: capo_deadline.types.list_fleets_request.ListFleetsRequest = {
        "farm_id": farm_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if principal_id is not None:
        input_["principal_id"] = principal_id
    if display_name is not None:
        input_["display_name"] = display_name
    if status is not None:
        input_["status"] = status

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