public interface AdminClient extends ApiBackgroundResource
| Modifier and Type | Method and Description |
|---|---|
static AdminClient |
create(AdminClientSettings settings) |
com.google.api.core.ApiFuture<Reservation> |
createReservation(Reservation reservation)
Create the provided reservation if it does not yet exist.
|
default com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription)
Create the provided subscription if it does not yet exist.
|
com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription,
BacklogLocation startingOffset)
Create the provided subscription at the given starting offset if it does not yet exist.
|
com.google.api.core.ApiFuture<Topic> |
createTopic(Topic topic)
Create the provided topic if it does not yet exist.
|
com.google.api.core.ApiFuture<Void> |
deleteReservation(ReservationPath path)
Delete the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<Void> |
deleteSubscription(SubscriptionPath path)
Delete the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Void> |
deleteTopic(TopicPath path)
Delete the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Reservation> |
getReservation(ReservationPath path)
Get the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<Subscription> |
getSubscription(SubscriptionPath path)
Get the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Topic> |
getTopic(TopicPath path)
Get the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Long> |
getTopicPartitionCount(TopicPath path)
Get the partitioning info for the topic with id
id if it exists. |
com.google.api.core.ApiFuture<List<Reservation>> |
listReservations(LocationPath path)
List all reservations for the specified project.
|
com.google.api.core.ApiFuture<List<TopicPath>> |
listReservationTopics(ReservationPath path)
Get the list of topics for the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<List<Subscription>> |
listSubscriptions(LocationPath path)
List all subscriptions for the specified project.
|
com.google.api.core.ApiFuture<List<Topic>> |
listTopics(LocationPath path)
List all topics for the specified project.
|
com.google.api.core.ApiFuture<List<SubscriptionPath>> |
listTopicSubscriptions(TopicPath path)
Get the list of subscriptions for the topic with id
id if it exists. |
CloudRegion |
region()
The Google Cloud region this client operates on.
|
com.google.api.gax.longrunning.OperationFuture<SeekSubscriptionResponse,OperationMetadata> |
seekSubscription(SubscriptionPath path,
SeekTarget target)
Initiate an out-of-band seek for a subscription to a specified target, which may be timestamps
or named positions within the message backlog.
|
com.google.api.core.ApiFuture<Reservation> |
updateReservation(Reservation reservation,
com.google.protobuf.FieldMask mask)
Update the reservation with path
reservation.getPath() if it exists. |
com.google.api.core.ApiFuture<Subscription> |
updateSubscription(Subscription subscription,
com.google.protobuf.FieldMask mask)
Update the subscription with path
subscription.getPath() if it exists. |
com.google.api.core.ApiFuture<Topic> |
updateTopic(Topic topic,
com.google.protobuf.FieldMask mask)
Update the topic with path
topic.getPath() if it exists. |
closestatic AdminClient create(AdminClientSettings settings) throws com.google.api.gax.rpc.ApiException
com.google.api.gax.rpc.ApiExceptionCloudRegion region()
com.google.api.core.ApiFuture<Topic> createTopic(Topic topic)
topic - The topic to create.ApiException or
the topic on success.com.google.api.core.ApiFuture<Topic> getTopic(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the topic on success.com.google.api.core.ApiFuture<Long> getTopicPartitionCount(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the number of topic partitions on success.com.google.api.core.ApiFuture<List<Topic>> listTopics(LocationPath path)
path - The path of the project to list topics for.ApiException or
the list of topic paths on success.com.google.api.core.ApiFuture<Topic> updateTopic(Topic topic, com.google.protobuf.FieldMask mask)
topic.getPath() if it exists.topic - The topic to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting topic on success. Updating nonexistent topics will cause the future to have
an exception with status StatusCode.Code.NOT_FOUNDcom.google.api.core.ApiFuture<Void> deleteTopic(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
void on success. Deleting nonexistent topics will cause the future to have an exception
with status StatusCode.Code.NOT_FOUNDcom.google.api.core.ApiFuture<List<SubscriptionPath>> listTopicSubscriptions(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the list of subscriptions on success.default com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription)
By default, a new subscription will only receive messages published after the subscription was created.
subscription - The subscription to create.ApiException or
the subscription on success.com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription, BacklogLocation startingOffset)
subscription - The subscription to create.startingOffset - The offset at which the new subscription will start receiving messages.ApiException or
the subscription on success.com.google.api.core.ApiFuture<Subscription> getSubscription(SubscriptionPath path)
id if it exists.path - The path of the subscription to retrieve.ApiException or
the subscription on success.com.google.api.core.ApiFuture<List<Subscription>> listSubscriptions(LocationPath path)
path - The path of the project to list subscriptions for.ApiException or
the list of subscription paths on success.com.google.api.core.ApiFuture<Subscription> updateSubscription(Subscription subscription, com.google.protobuf.FieldMask mask)
subscription.getPath() if it exists.subscription - The subscription to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting subscription on success. Updating nonexistent subscriptions will cause the
future to have an exception with status StatusCode.Code.NOT_FOUND@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.gax.longrunning.OperationFuture<SeekSubscriptionResponse,OperationMetadata> seekSubscription(SubscriptionPath path, SeekTarget target)
See https://cloud.google.com/pubsub/lite/docs/seek for more information.
path - The path of the subscription to seek.target - The location to seek to.OperationFuture that returns an operation name
if the seek was successfully initiated, or otherwise throw an ApiException. com.google.api.gax.longrunning.OperationFuture.get() will return a response if the seek
operation completes successfully, or otherwise throw an ApiException.com.google.api.core.ApiFuture<Void> deleteSubscription(SubscriptionPath path)
id if it exists.path - The path of the subscription to retrieve.ApiException or
void on success. Deleting nonexistent subscriptions will cause the future to have an
exception with status StatusCode.Code.NOT_FOUND@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<Reservation> createReservation(Reservation reservation)
reservation - The reservation to create.ApiException or
the reservation on success.@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<Reservation> getReservation(ReservationPath path)
id if it exists.path - The path of the reservation to retrieve.ApiException or
the reservation on success.@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<List<Reservation>> listReservations(LocationPath path)
path - The path of the project to list reservations for.ApiException or
the list of reservation paths on success.@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<Reservation> updateReservation(Reservation reservation, com.google.protobuf.FieldMask mask)
reservation.getPath() if it exists.reservation - The reservation to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting reservation on success. Updating nonexistent reservations will cause the
future to have an exception with status StatusCode.Code.NOT_FOUND@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<Void> deleteReservation(ReservationPath path)
id if it exists.path - The path of the reservation to retrieve.ApiException or
void on success. Deleting nonexistent reservations will cause the future to have an
exception with status StatusCode.Code.NOT_FOUND@BetaApi(value="This may not be implemented in the backend, it is a pre-release feature.") com.google.api.core.ApiFuture<List<TopicPath>> listReservationTopics(ReservationPath path)
id if it exists.path - The path of the reservation to retrieve.ApiException or
the list of topics on success.Copyright © 2021 Google LLC. All rights reserved.