- 1.76.0 (latest)
- 1.75.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.70.0
- 1.68.0
- 1.67.0
- 1.64.0
- 1.63.0
- 1.62.0
- 1.60.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.2.4
| GitHub Repository | Product Reference | REST Documentation | RPC Documentation |
Service Description: Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
Trigger response = eventarcClient.getTrigger(name);
}
Note: close() needs to be called on the EventarcClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
GetTrigger |
Get a single trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTriggers |
List triggers. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTrigger |
Create a new trigger in a particular project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTrigger |
Update a single trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTrigger |
Delete a single trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChannel |
Get a single Channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChannels |
List channels. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateChannel |
Create a new channel in a particular project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateChannel |
Update a single channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteChannel |
Delete a single channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetProvider |
Get a single Provider. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListProviders |
List providers. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChannelConnection |
Get a single ChannelConnection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChannelConnections |
List channel connections. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateChannelConnection |
Create a new ChannelConnection in a particular project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteChannelConnection |
Delete a single ChannelConnection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGoogleChannelConfig |
Get a GoogleChannelConfig |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGoogleChannelConfig |
Update a single GoogleChannelConfig |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of EventarcSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EventarcSettings eventarcSettings =
EventarcSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EventarcSettings eventarcSettings =
EventarcSettings.newBuilder().setEndpoint(myEndpoint).build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EventarcSettings eventarcSettings = EventarcSettings.newHttpJsonBuilder().build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final EventarcClient create()Constructs an instance of EventarcClient with default settings.
| Returns | |
|---|---|
| Type | Description |
EventarcClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(EventarcSettings settings)
public static final EventarcClient create(EventarcSettings settings)Constructs an instance of EventarcClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
EventarcSettings |
| Returns | |
|---|---|
| Type | Description |
EventarcClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(EventarcStub stub)
public static final EventarcClient create(EventarcStub stub)Constructs an instance of EventarcClient, using the given stub for making calls. This is for advanced usage - prefer using create(EventarcSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
EventarcStub |
| Returns | |
|---|---|
| Type | Description |
EventarcClient |
|
Constructors
EventarcClient(EventarcSettings settings)
protected EventarcClient(EventarcSettings settings)Constructs an instance of EventarcClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
EventarcSettings |
EventarcClient(EventarcStub stub)
protected EventarcClient(EventarcStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
EventarcStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()createChannelAsync(CreateChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(CreateChannelRequest request)Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
Channel response = eventarcClient.createChannelAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateChannelRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
createChannelAsync(LocationName parent, Channel channel, String channelId)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(LocationName parent, Channel channel, String channelId)Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response = eventarcClient.createChannelAsync(parent, channel, channelId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection in which to add this channel. |
channel |
ChannelRequired. The channel to create. |
channelId |
StringRequired. The user-provided ID to be assigned to the channel. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
createChannelAsync(String parent, Channel channel, String channelId)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(String parent, Channel channel, String channelId)Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response = eventarcClient.createChannelAsync(parent, channel, channelId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection in which to add this channel. |
channel |
ChannelRequired. The channel to create. |
channelId |
StringRequired. The user-provided ID to be assigned to the channel. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
createChannelCallable()
public final UnaryCallable<CreateChannelRequest,Operation> createChannelCallable()Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.createChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateChannelRequest,Operation> |
|
createChannelConnectionAsync(CreateChannelConnectionRequest request)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(CreateChannelConnectionRequest request)Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
ChannelConnection response = eventarcClient.createChannelConnectionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateChannelConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId)Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ChannelConnection channelConnection = ChannelConnection.newBuilder().build();
String channelConnectionId = "channelConnectionId-1246974660";
ChannelConnection response =
eventarcClient
.createChannelConnectionAsync(parent, channelConnection, channelConnectionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection in which to add this channel connection. |
channelConnection |
ChannelConnectionRequired. Channel connection to create. |
channelConnectionId |
StringRequired. The user-provided ID to be assigned to the channel connection. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId)Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ChannelConnection channelConnection = ChannelConnection.newBuilder().build();
String channelConnectionId = "channelConnectionId-1246974660";
ChannelConnection response =
eventarcClient
.createChannelConnectionAsync(parent, channelConnection, channelConnectionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection in which to add this channel connection. |
channelConnection |
ChannelConnectionRequired. Channel connection to create. |
channelConnectionId |
StringRequired. The user-provided ID to be assigned to the channel connection. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
createChannelConnectionCallable()
public final UnaryCallable<CreateChannelConnectionRequest,Operation> createChannelConnectionCallable()Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
ApiFuture<Operation> future =
eventarcClient.createChannelConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateChannelConnectionRequest,Operation> |
|
createChannelConnectionOperationCallable()
public final OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata> createChannelConnectionOperationCallable()Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
OperationFuture<ChannelConnection, OperationMetadata> future =
eventarcClient.createChannelConnectionOperationCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata> |
|
createChannelOperationCallable()
public final OperationCallable<CreateChannelRequest,Channel,OperationMetadata> createChannelOperationCallable()Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.createChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateChannelRequest,Channel,OperationMetadata> |
|
createTriggerAsync(CreateTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(CreateTriggerRequest request)Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.createTriggerAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
createTriggerAsync(LocationName parent, Trigger trigger, String triggerId)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(LocationName parent, Trigger trigger, String triggerId)Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Trigger trigger = Trigger.newBuilder().build();
String triggerId = "triggerId-648752909";
Trigger response = eventarcClient.createTriggerAsync(parent, trigger, triggerId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection in which to add this trigger. |
trigger |
TriggerRequired. The trigger to create. |
triggerId |
StringRequired. The user-provided ID to be assigned to the trigger. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
createTriggerAsync(String parent, Trigger trigger, String triggerId)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(String parent, Trigger trigger, String triggerId)Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Trigger trigger = Trigger.newBuilder().build();
String triggerId = "triggerId-648752909";
Trigger response = eventarcClient.createTriggerAsync(parent, trigger, triggerId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection in which to add this trigger. |
trigger |
TriggerRequired. The trigger to create. |
triggerId |
StringRequired. The user-provided ID to be assigned to the trigger. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
createTriggerCallable()
public final UnaryCallable<CreateTriggerRequest,Operation> createTriggerCallable()Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.createTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateTriggerRequest,Operation> |
|
createTriggerOperationCallable()
public final OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata> createTriggerOperationCallable()Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.createTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata> |
|
deleteChannelAsync(ChannelName name)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(ChannelName name)Delete a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
Channel response = eventarcClient.deleteChannelAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ChannelNameRequired. The name of the channel to be deleted. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
deleteChannelAsync(DeleteChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request)Delete a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
Channel response = eventarcClient.deleteChannelAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteChannelRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
deleteChannelAsync(String name)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(String name)Delete a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
Channel response = eventarcClient.deleteChannelAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the channel to be deleted. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
deleteChannelCallable()
public final UnaryCallable<DeleteChannelRequest,Operation> deleteChannelCallable()Delete a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.deleteChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteChannelRequest,Operation> |
|
deleteChannelConnectionAsync(ChannelConnectionName name)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(ChannelConnectionName name)Delete a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelConnectionName name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ChannelConnectionNameRequired. The name of the channel connection to delete. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)Delete a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteChannelConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
deleteChannelConnectionAsync(String name)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(String name)Delete a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the channel connection to delete. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
|
deleteChannelConnectionCallable()
public final UnaryCallable<DeleteChannelConnectionRequest,Operation> deleteChannelConnectionCallable()Delete a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ApiFuture<Operation> future =
eventarcClient.deleteChannelConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteChannelConnectionRequest,Operation> |
|
deleteChannelConnectionOperationCallable()
public final OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata> deleteChannelConnectionOperationCallable()Delete a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
OperationFuture<ChannelConnection, OperationMetadata> future =
eventarcClient.deleteChannelConnectionOperationCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata> |
|
deleteChannelOperationCallable()
public final OperationCallable<DeleteChannelRequest,Channel,OperationMetadata> deleteChannelOperationCallable()Delete a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.deleteChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteChannelRequest,Channel,OperationMetadata> |
|
deleteTriggerAsync(DeleteTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(DeleteTriggerRequest request)Delete a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.deleteTriggerAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
deleteTriggerAsync(TriggerName name, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(TriggerName name, boolean allowMissing)Delete a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
boolean allowMissing = true;
Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
}
| Parameters | |
|---|---|
| Name | Description |
name |
TriggerNameRequired. The name of the trigger to be deleted. |
allowMissing |
booleanIf set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
deleteTriggerAsync(String name, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(String name, boolean allowMissing)Delete a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
boolean allowMissing = true;
Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
}
| Parameters | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the trigger to be deleted. |
allowMissing |
booleanIf set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
deleteTriggerCallable()
public final UnaryCallable<DeleteTriggerRequest,Operation> deleteTriggerCallable()Delete a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.deleteTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteTriggerRequest,Operation> |
|
deleteTriggerOperationCallable()
public final OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata> deleteTriggerOperationCallable()Delete a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.deleteTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata> |
|
getChannel(ChannelName name)
public final Channel getChannel(ChannelName name)Get a single Channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
Channel response = eventarcClient.getChannel(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ChannelNameRequired. The name of the channel to get. |
| Returns | |
|---|---|
| Type | Description |
Channel |
|
getChannel(GetChannelRequest request)
public final Channel getChannel(GetChannelRequest request)Get a single Channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelRequest request =
GetChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.build();
Channel response = eventarcClient.getChannel(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetChannelRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Channel |
|
getChannel(String name)
public final Channel getChannel(String name)Get a single Channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
Channel response = eventarcClient.getChannel(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the channel to get. |
| Returns | |
|---|---|
| Type | Description |
Channel |
|
getChannelCallable()
public final UnaryCallable<GetChannelRequest,Channel> getChannelCallable()Get a single Channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelRequest request =
GetChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.build();
ApiFuture<Channel> future = eventarcClient.getChannelCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetChannelRequest,Channel> |
|
getChannelConnection(ChannelConnectionName name)
public final ChannelConnection getChannelConnection(ChannelConnectionName name)Get a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelConnectionName name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
ChannelConnection response = eventarcClient.getChannelConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ChannelConnectionNameRequired. The name of the channel connection to get. |
| Returns | |
|---|---|
| Type | Description |
ChannelConnection |
|
getChannelConnection(GetChannelConnectionRequest request)
public final ChannelConnection getChannelConnection(GetChannelConnectionRequest request)Get a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelConnectionRequest request =
GetChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ChannelConnection response = eventarcClient.getChannelConnection(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetChannelConnectionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ChannelConnection |
|
getChannelConnection(String name)
public final ChannelConnection getChannelConnection(String name)Get a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
ChannelConnection response = eventarcClient.getChannelConnection(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the channel connection to get. |
| Returns | |
|---|---|
| Type | Description |
ChannelConnection |
|
getChannelConnectionCallable()
public final UnaryCallable<GetChannelConnectionRequest,ChannelConnection> getChannelConnectionCallable()Get a single ChannelConnection.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelConnectionRequest request =
GetChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ApiFuture<ChannelConnection> future =
eventarcClient.getChannelConnectionCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetChannelConnectionRequest,ChannelConnection> |
|
getGoogleChannelConfig(GetGoogleChannelConfigRequest request)
public final GoogleChannelConfig getGoogleChannelConfig(GetGoogleChannelConfigRequest request)Get a GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetGoogleChannelConfigRequest request =
GetGoogleChannelConfigRequest.newBuilder()
.setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGoogleChannelConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GoogleChannelConfig |
|
getGoogleChannelConfig(GoogleChannelConfigName name)
public final GoogleChannelConfig getGoogleChannelConfig(GoogleChannelConfigName name)Get a GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GoogleChannelConfigName name = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]");
GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GoogleChannelConfigNameRequired. The name of the config to get. |
| Returns | |
|---|---|
| Type | Description |
GoogleChannelConfig |
|
getGoogleChannelConfig(String name)
public final GoogleChannelConfig getGoogleChannelConfig(String name)Get a GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString();
GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the config to get. |
| Returns | |
|---|---|
| Type | Description |
GoogleChannelConfig |
|
getGoogleChannelConfigCallable()
public final UnaryCallable<GetGoogleChannelConfigRequest,GoogleChannelConfig> getGoogleChannelConfigCallable()Get a GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetGoogleChannelConfigRequest request =
GetGoogleChannelConfigRequest.newBuilder()
.setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<GoogleChannelConfig> future =
eventarcClient.getGoogleChannelConfigCallable().futureCall(request);
// Do something.
GoogleChannelConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGoogleChannelConfigRequest,GoogleChannelConfig> |
|
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = eventarcClient.getIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = eventarcClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = eventarcClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = eventarcClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getProvider(GetProviderRequest request)
public final Provider getProvider(GetProviderRequest request)Get a single Provider.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetProviderRequest request =
GetProviderRequest.newBuilder()
.setName(ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString())
.build();
Provider response = eventarcClient.getProvider(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetProviderRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Provider |
|
getProvider(ProviderName name)
public final Provider getProvider(ProviderName name)Get a single Provider.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ProviderName name = ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]");
Provider response = eventarcClient.getProvider(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ProviderNameRequired. The name of the provider to get. |
| Returns | |
|---|---|
| Type | Description |
Provider |
|
getProvider(String name)
public final Provider getProvider(String name)Get a single Provider.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString();
Provider response = eventarcClient.getProvider(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the provider to get. |
| Returns | |
|---|---|
| Type | Description |
Provider |
|
getProviderCallable()
public final UnaryCallable<GetProviderRequest,Provider> getProviderCallable()Get a single Provider.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetProviderRequest request =
GetProviderRequest.newBuilder()
.setName(ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString())
.build();
ApiFuture<Provider> future = eventarcClient.getProviderCallable().futureCall(request);
// Do something.
Provider response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetProviderRequest,Provider> |
|
getSettings()
public final EventarcSettings getSettings()| Returns | |
|---|---|
| Type | Description |
EventarcSettings |
|
getStub()
public EventarcStub getStub()| Returns | |
|---|---|
| Type | Description |
EventarcStub |
|
getTrigger(GetTriggerRequest request)
public final Trigger getTrigger(GetTriggerRequest request)Get a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetTriggerRequest request =
GetTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.build();
Trigger response = eventarcClient.getTrigger(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Trigger |
|
getTrigger(TriggerName name)
public final Trigger getTrigger(TriggerName name)Get a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
Trigger response = eventarcClient.getTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
TriggerNameRequired. The name of the trigger to get. |
| Returns | |
|---|---|
| Type | Description |
Trigger |
|
getTrigger(String name)
public final Trigger getTrigger(String name)Get a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
Trigger response = eventarcClient.getTrigger(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the trigger to get. |
| Returns | |
|---|---|
| Type | Description |
Trigger |
|
getTriggerCallable()
public final UnaryCallable<GetTriggerRequest,Trigger> getTriggerCallable()Get a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GetTriggerRequest request =
GetTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.build();
ApiFuture<Trigger> future = eventarcClient.getTriggerCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetTriggerRequest,Trigger> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listChannelConnections(ListChannelConnectionsRequest request)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(ListChannelConnectionsRequest request)List channel connections.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ChannelConnection element :
eventarcClient.listChannelConnections(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListChannelConnectionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
|
listChannelConnections(LocationName parent)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(LocationName parent)List channel connections.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection from which to list channel connections. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
|
listChannelConnections(String parent)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(String parent)List channel connections.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection from which to list channel connections. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
|
listChannelConnectionsCallable()
public final UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse> listChannelConnectionsCallable()List channel connections.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListChannelConnectionsResponse response =
eventarcClient.listChannelConnectionsCallable().call(request);
for (ChannelConnection element : response.getChannelConnectionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse> |
|
listChannelConnectionsPagedCallable()
public final UnaryCallable<ListChannelConnectionsRequest,EventarcClient.ListChannelConnectionsPagedResponse> listChannelConnectionsPagedCallable()List channel connections.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ChannelConnection> future =
eventarcClient.listChannelConnectionsPagedCallable().futureCall(request);
// Do something.
for (ChannelConnection element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsPagedResponse> |
|
listChannels(ListChannelsRequest request)
public final EventarcClient.ListChannelsPagedResponse listChannels(ListChannelsRequest request)List channels.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
for (Channel element : eventarcClient.listChannels(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListChannelsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelsPagedResponse |
|
listChannels(LocationName parent)
public final EventarcClient.ListChannelsPagedResponse listChannels(LocationName parent)List channels.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection to list channels on. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelsPagedResponse |
|
listChannels(String parent)
public final EventarcClient.ListChannelsPagedResponse listChannels(String parent)List channels.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection to list channels on. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListChannelsPagedResponse |
|
listChannelsCallable()
public final UnaryCallable<ListChannelsRequest,ListChannelsResponse> listChannelsCallable()List channels.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListChannelsResponse response = eventarcClient.listChannelsCallable().call(request);
for (Channel element : response.getChannelsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChannelsRequest,ListChannelsResponse> |
|
listChannelsPagedCallable()
public final UnaryCallable<ListChannelsRequest,EventarcClient.ListChannelsPagedResponse> listChannelsPagedCallable()List channels.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Channel> future = eventarcClient.listChannelsPagedCallable().futureCall(request);
// Do something.
for (Channel element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChannelsRequest,ListChannelsPagedResponse> |
|
listLocations(ListLocationsRequest request)
public final EventarcClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : eventarcClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = eventarcClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,EventarcClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future = eventarcClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listProviders(ListProvidersRequest request)
public final EventarcClient.ListProvidersPagedResponse listProviders(ListProvidersRequest request)List providers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Provider element : eventarcClient.listProviders(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListProvidersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListProvidersPagedResponse |
|
listProviders(LocationName parent)
public final EventarcClient.ListProvidersPagedResponse listProviders(LocationName parent)List providers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Provider element : eventarcClient.listProviders(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent of the provider to get. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListProvidersPagedResponse |
|
listProviders(String parent)
public final EventarcClient.ListProvidersPagedResponse listProviders(String parent)List providers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Provider element : eventarcClient.listProviders(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent of the provider to get. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListProvidersPagedResponse |
|
listProvidersCallable()
public final UnaryCallable<ListProvidersRequest,ListProvidersResponse> listProvidersCallable()List providers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListProvidersResponse response = eventarcClient.listProvidersCallable().call(request);
for (Provider element : response.getProvidersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListProvidersRequest,ListProvidersResponse> |
|
listProvidersPagedCallable()
public final UnaryCallable<ListProvidersRequest,EventarcClient.ListProvidersPagedResponse> listProvidersPagedCallable()List providers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Provider> future = eventarcClient.listProvidersPagedCallable().futureCall(request);
// Do something.
for (Provider element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListProvidersRequest,ListProvidersPagedResponse> |
|
listTriggers(ListTriggersRequest request)
public final EventarcClient.ListTriggersPagedResponse listTriggers(ListTriggersRequest request)List triggers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Trigger element : eventarcClient.listTriggers(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListTriggersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListTriggersPagedResponse |
|
listTriggers(LocationName parent)
public final EventarcClient.ListTriggersPagedResponse listTriggers(LocationName parent)List triggers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent collection to list triggers on. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListTriggersPagedResponse |
|
listTriggers(String parent)
public final EventarcClient.ListTriggersPagedResponse listTriggers(String parent)List triggers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent collection to list triggers on. |
| Returns | |
|---|---|
| Type | Description |
EventarcClient.ListTriggersPagedResponse |
|
listTriggersCallable()
public final UnaryCallable<ListTriggersRequest,ListTriggersResponse> listTriggersCallable()List triggers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListTriggersResponse response = eventarcClient.listTriggersCallable().call(request);
for (Trigger element : response.getTriggersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTriggersRequest,ListTriggersResponse> |
|
listTriggersPagedCallable()
public final UnaryCallable<ListTriggersRequest,EventarcClient.ListTriggersPagedResponse> listTriggersPagedCallable()List triggers.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Trigger> future = eventarcClient.listTriggersPagedCallable().futureCall(request);
// Do something.
for (Trigger element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTriggersRequest,ListTriggersPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = eventarcClient.setIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = eventarcClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = eventarcClient.testIamPermissions(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
eventarcClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateChannelAsync(Channel channel, FieldMask updateMask)
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, FieldMask updateMask)Update a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
Channel channel = Channel.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Channel response = eventarcClient.updateChannelAsync(channel, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
channel |
ChannelThe channel to be updated. |
updateMask |
FieldMaskThe fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
updateChannelAsync(UpdateChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(UpdateChannelRequest request)Update a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
Channel response = eventarcClient.updateChannelAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateChannelRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Channel,OperationMetadata> |
|
updateChannelCallable()
public final UnaryCallable<UpdateChannelRequest,Operation> updateChannelCallable()Update a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.updateChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateChannelRequest,Operation> |
|
updateChannelOperationCallable()
public final OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> updateChannelOperationCallable()Update a single channel.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.updateChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> |
|
updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, FieldMask updateMask)
public final GoogleChannelConfig updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, FieldMask updateMask)Update a single GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
GoogleChannelConfig googleChannelConfig = GoogleChannelConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GoogleChannelConfig response =
eventarcClient.updateGoogleChannelConfig(googleChannelConfig, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
googleChannelConfig |
GoogleChannelConfigRequired. The config to be updated. |
updateMask |
FieldMaskThe fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*". |
| Returns | |
|---|---|
| Type | Description |
GoogleChannelConfig |
|
updateGoogleChannelConfig(UpdateGoogleChannelConfigRequest request)
public final GoogleChannelConfig updateGoogleChannelConfig(UpdateGoogleChannelConfigRequest request)Update a single GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateGoogleChannelConfigRequest request =
UpdateGoogleChannelConfigRequest.newBuilder()
.setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
GoogleChannelConfig response = eventarcClient.updateGoogleChannelConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateGoogleChannelConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GoogleChannelConfig |
|
updateGoogleChannelConfigCallable()
public final UnaryCallable<UpdateGoogleChannelConfigRequest,GoogleChannelConfig> updateGoogleChannelConfigCallable()Update a single GoogleChannelConfig
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateGoogleChannelConfigRequest request =
UpdateGoogleChannelConfigRequest.newBuilder()
.setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<GoogleChannelConfig> future =
eventarcClient.updateGoogleChannelConfigCallable().futureCall(request);
// Do something.
GoogleChannelConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateGoogleChannelConfigRequest,GoogleChannelConfig> |
|
updateTriggerAsync(Trigger trigger, FieldMask updateMask, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(Trigger trigger, FieldMask updateMask, boolean allowMissing)Update a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
Trigger trigger = Trigger.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
boolean allowMissing = true;
Trigger response = eventarcClient.updateTriggerAsync(trigger, updateMask, allowMissing).get();
}
| Parameters | |
|---|---|
| Name | Description |
trigger |
TriggerThe trigger to be updated. |
updateMask |
FieldMaskThe fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*". |
allowMissing |
booleanIf set to true, and the trigger is not found, a new trigger will be
created. In this situation, |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
updateTriggerAsync(UpdateTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(UpdateTriggerRequest request)Update a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.updateTriggerAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateTriggerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Trigger,OperationMetadata> |
|
updateTriggerCallable()
public final UnaryCallable<UpdateTriggerRequest,Operation> updateTriggerCallable()Update a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.updateTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateTriggerRequest,Operation> |
|
updateTriggerOperationCallable()
public final OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata> updateTriggerOperationCallable()Update a single trigger.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.updateTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata> |
|