Skip to content

list_contact_versions

list_contact_versions(
    contact_id: Uuid,
    *,
    config_overrides: Optional[GroundStationClientConfig] = None,
    max_results: Optional[PaginationMaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListContactVersionsResponse

Returns a list of versions for a specified contact.

Parameters:

  • contact_id (Uuid) –

    UUID of a contact.

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

    Maximum number of contact versions returned.

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

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

Raises:

Source code in docs_src/capo_groundstation/_services/ground_station.py
def list_contact_versions(
    self,
    contact_id: "capo_groundstation.types.uuid.Uuid",
    *,
    config_overrides: Optional[GroundStationClientConfig] = 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_contact_versions_response.ListContactVersionsResponse":
    """<p>Returns a list of versions for a specified contact.</p>

    Args:
        contact_id: <p>UUID of a contact.</p>
        max_results: <p>Maximum number of contact versions returned.</p>
        next_token: <p>Next token returned in the request of a previous <code>ListContactVersions</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.resource_not_found_exception.ResourceNotFoundException: <p>Resource was not found.</p>
        capo_groundstation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_groundstation.types.list_contact_versions_request.ListContactVersionsRequest]",
    ) -> OperationResponse[
        "capo_groundstation.types.list_contact_versions_response.ListContactVersionsResponse"
    ]:
        import capo_groundstation._operations.ground_station.list_contact_versions

        output, http_response = (
            capo_groundstation._operations.ground_station.list_contact_versions.list_contact_versions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListContactVersions")
    )
    input_: capo_groundstation.types.list_contact_versions_request.ListContactVersionsRequest = {
        "contact_id": contact_id
    }
    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