Skip to content

list_ground_station_reservations async

list_ground_station_reservations(
    ground_station_id: GroundStationName,
    start_time: datetime,
    end_time: datetime,
    *,
    config_overrides: Optional[AsyncGroundStationClientConfig] = None,
    reservation_types: Optional[ReservationTypeFilterList] = None,
    max_results: Optional[PaginationMaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListGroundStationReservationsResponse

Returns a list of reservations for a specified ground station.

Parameters:

  • ground_station_id (GroundStationName) –

    ID of a ground station.

  • start_time (datetime) –

    Start time of the reservation window in UTC.

  • end_time (datetime) –

    End time of the reservation window in UTC.

  • reservation_types (Optional[ReservationTypeFilterList], default: None ) –

    Types of reservations to filter by.

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

    Maximum number of ground station reservations returned.

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

    Next token returned in the request of a previous ListGroundStationReservations call. Used to get the next page of results.

Raises:

Source code in docs_src/capo_groundstation/_services/async_ground_station.py
async def list_ground_station_reservations(
    self,
    ground_station_id: "capo_groundstation.types.ground_station_name.GroundStationName",
    start_time: datetime.datetime,
    end_time: datetime.datetime,
    *,
    config_overrides: Optional[AsyncGroundStationClientConfig] = None,
    reservation_types: Optional[
        "capo_groundstation.types.reservation_type_filter_list.ReservationTypeFilterList"
    ] = None,
    max_results: Optional[
        "capo_groundstation.types.pagination_max_results.PaginationMaxResults"
    ] = None,
    next_token: Optional[
        "capo_groundstation.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_groundstation.types.list_ground_station_reservations_response.ListGroundStationReservationsResponse":
    """<p>Returns a list of reservations for a specified ground station.</p>

    Args:
        ground_station_id: <p>ID of a ground station.</p>
        start_time: <p>Start time of the reservation window in UTC.</p>
        end_time: <p>End time of the reservation window in UTC.</p>
        reservation_types: <p>Types of reservations to filter by.</p>
        max_results: <p>Maximum number of ground station reservations returned.</p>
        next_token: <p>Next token returned in the request of a previous <code>ListGroundStationReservations</code> call. Used to get the next page of results.</p>

    Raises:
        capo_groundstation.errors.dependency_exception.DependencyException: <p>Dependency encountered an error.</p>
        capo_groundstation.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
        capo_groundstation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_groundstation.types.list_ground_station_reservations_request.ListGroundStationReservationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_groundstation.types.list_ground_station_reservations_response.ListGroundStationReservationsResponse"
    ]:
        import capo_groundstation._operations.ground_station.list_ground_station_reservations

        (
            output,
            http_response,
        ) = await capo_groundstation._operations.ground_station.list_ground_station_reservations.async_list_ground_station_reservations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListGroundStationReservations")
    )
    input_: capo_groundstation.types.list_ground_station_reservations_request.ListGroundStationReservationsRequest = {
        "ground_station_id": ground_station_id,
        "start_time": start_time,
        "end_time": end_time,
    }
    if reservation_types is not None:
        input_["reservation_types"] = reservation_types
    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