public abstract class EventarcClient
Eventarc client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Eventarc.V1Assembly
Google.Cloud.Eventarc.V1.dll
Remarks
Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.
Properties
CreateTriggerOperationsClient
public virtual OperationsClient CreateTriggerOperationsClient { get; }
The long-running operations client for CreateTrigger
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Eventarc service, which is a host of "eventarc.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Eventarc scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Eventarc scopes are:
DeleteTriggerOperationsClient
public virtual OperationsClient DeleteTriggerOperationsClient { get; }
The long-running operations client for DeleteTrigger
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Eventarc.EventarcClient GrpcClient { get; }
The underlying gRPC Eventarc client
Property Value | |
---|---|
Type | Description |
Eventarc.EventarcClient |
UpdateTriggerOperationsClient
public virtual OperationsClient UpdateTriggerOperationsClient { get; }
The long-running operations client for UpdateTrigger
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static EventarcClient Create()
Synchronously creates a EventarcClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EventarcClientBuilder.
Returns | |
---|---|
Type | Description |
EventarcClient | The created EventarcClient. |
CreateAsync(CancellationToken)
public static Task<EventarcClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a EventarcClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EventarcClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<EventarcClient> | The task representing the created EventarcClient. |
CreateTrigger(LocationName, Trigger, String, CallSettings)
public virtual Operation<Trigger, OperationMetadata> CreateTrigger(LocationName parent, Trigger trigger, string triggerId, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTrigger(CreateTriggerRequest, CallSettings)
public virtual Operation<Trigger, OperationMetadata> CreateTrigger(CreateTriggerRequest request, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
request | CreateTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Trigger = new Trigger(),
TriggerId = "",
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTrigger(String, Trigger, String, CallSettings)
public virtual Operation<Trigger, OperationMetadata> CreateTrigger(string parent, Trigger trigger, string triggerId, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(LocationName, Trigger, String, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(LocationName parent, Trigger trigger, string triggerId, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(LocationName, Trigger, String, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(LocationName parent, Trigger trigger, string triggerId, CancellationToken cancellationToken)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(CreateTriggerRequest, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(CreateTriggerRequest request, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
request | CreateTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Trigger = new Trigger(),
TriggerId = "",
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(CreateTriggerRequest, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(CreateTriggerRequest request, CancellationToken cancellationToken)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
request | CreateTriggerRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Trigger = new Trigger(),
TriggerId = "",
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(String, Trigger, String, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(string parent, Trigger trigger, string triggerId, CallSettings callSettings = null)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
CreateTriggerAsync(String, Trigger, String, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(string parent, Trigger trigger, string triggerId, CancellationToken cancellationToken)
Create a new trigger in a particular project and location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTrigger(DeleteTriggerRequest, CallSettings)
public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(DeleteTriggerRequest request, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
request | DeleteTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTrigger(TriggerName, Boolean, CallSettings)
public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(TriggerName name, bool allowMissing, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTrigger(String, Boolean, CallSettings)
public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(string name, bool allowMissing, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(DeleteTriggerRequest, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(DeleteTriggerRequest request, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
request | DeleteTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(DeleteTriggerRequest, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(DeleteTriggerRequest request, CancellationToken cancellationToken)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
request | DeleteTriggerRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
Etag = "",
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(TriggerName, Boolean, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(TriggerName name, bool allowMissing, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(TriggerName, Boolean, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(TriggerName name, bool allowMissing, CancellationToken cancellationToken)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(String, Boolean, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(string name, bool allowMissing, CallSettings callSettings = null)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
DeleteTriggerAsync(String, Boolean, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(string name, bool allowMissing, CancellationToken cancellationToken)
Delete a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to be deleted. |
allowMissing | Boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
GetTrigger(GetTriggerRequest, CallSettings)
public virtual Trigger GetTrigger(GetTriggerRequest request, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
request | GetTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Trigger | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = eventarcClient.GetTrigger(request);
GetTrigger(TriggerName, CallSettings)
public virtual Trigger GetTrigger(TriggerName name, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Trigger | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = eventarcClient.GetTrigger(name);
GetTrigger(String, CallSettings)
public virtual Trigger GetTrigger(string name, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Trigger | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = eventarcClient.GetTrigger(name);
GetTriggerAsync(GetTriggerRequest, CallSettings)
public virtual Task<Trigger> GetTriggerAsync(GetTriggerRequest request, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
request | GetTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(request);
GetTriggerAsync(GetTriggerRequest, CancellationToken)
public virtual Task<Trigger> GetTriggerAsync(GetTriggerRequest request, CancellationToken cancellationToken)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
request | GetTriggerRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(request);
GetTriggerAsync(TriggerName, CallSettings)
public virtual Task<Trigger> GetTriggerAsync(TriggerName name, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);
GetTriggerAsync(TriggerName, CancellationToken)
public virtual Task<Trigger> GetTriggerAsync(TriggerName name, CancellationToken cancellationToken)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | TriggerName Required. The name of the trigger to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);
GetTriggerAsync(String, CallSettings)
public virtual Task<Trigger> GetTriggerAsync(string name, CallSettings callSettings = null)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);
GetTriggerAsync(String, CancellationToken)
public virtual Task<Trigger> GetTriggerAsync(string name, CancellationToken cancellationToken)
Get a single trigger.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the trigger to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Trigger> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);
ListTriggers(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent collection to list triggers on. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTriggersResponse, Trigger> | A pageable sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTriggersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTriggers(ListTriggersRequest, CallSettings)
public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(ListTriggersRequest request, CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
request | ListTriggersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTriggersResponse, Trigger> | A pageable sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
ListTriggersRequest request = new ListTriggersRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
OrderBy = "",
};
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTriggersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTriggers(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent collection to list triggers on. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTriggersResponse, Trigger> | A pageable sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTriggersResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTriggersAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent collection to list triggers on. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTriggersResponse, Trigger> | A pageable asynchronous sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTriggersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTriggersAsync(ListTriggersRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(ListTriggersRequest request, CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
request | ListTriggersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTriggersResponse, Trigger> | A pageable asynchronous sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
ListTriggersRequest request = new ListTriggersRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTriggersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListTriggersAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
List triggers.
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent collection to list triggers on. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTriggersResponse, Trigger> | A pageable asynchronous sequence of Trigger resources. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTriggersResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Trigger item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Trigger> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Trigger item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceCreateTrigger(String, CallSettings)
public virtual Operation<Trigger, OperationMetadata> PollOnceCreateTrigger(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of CreateTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The result of polling the operation. |
PollOnceCreateTriggerAsync(String, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceCreateTriggerAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteTrigger(String, CallSettings)
public virtual Operation<Trigger, OperationMetadata> PollOnceDeleteTrigger(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of DeleteTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteTriggerAsync(String, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceDeleteTriggerAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateTrigger(String, CallSettings)
public virtual Operation<Trigger, OperationMetadata> PollOnceUpdateTrigger(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UpdateTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The result of polling the operation. |
PollOnceUpdateTriggerAsync(String, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceUpdateTriggerAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateTrigger
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateTrigger(Trigger, FieldMask, Boolean, CallSettings)
public virtual Operation<Trigger, OperationMetadata> UpdateTrigger(Trigger trigger, FieldMask updateMask, bool allowMissing, CallSettings callSettings = null)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
trigger | Trigger The trigger to be updated. |
updateMask | FieldMask The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*". |
allowMissing | Boolean If set to true, and the trigger is not found, a new trigger will be
created. In this situation, |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.UpdateTrigger(trigger, updateMask, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceUpdateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
UpdateTrigger(UpdateTriggerRequest, CallSettings)
public virtual Operation<Trigger, OperationMetadata> UpdateTrigger(UpdateTriggerRequest request, CallSettings callSettings = null)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
request | UpdateTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Trigger, OperationMetadata> | The RPC response. |
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
Trigger = new Trigger(),
UpdateMask = new FieldMask(),
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.UpdateTrigger(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceUpdateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
UpdateTriggerAsync(Trigger, FieldMask, Boolean, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(Trigger trigger, FieldMask updateMask, bool allowMissing, CallSettings callSettings = null)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
trigger | Trigger The trigger to be updated. |
updateMask | FieldMask The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*". |
allowMissing | Boolean If set to true, and the trigger is not found, a new trigger will be
created. In this situation, |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(trigger, updateMask, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
UpdateTriggerAsync(Trigger, FieldMask, Boolean, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(Trigger trigger, FieldMask updateMask, bool allowMissing, CancellationToken cancellationToken)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
trigger | Trigger The trigger to be updated. |
updateMask | FieldMask The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*". |
allowMissing | Boolean If set to true, and the trigger is not found, a new trigger will be
created. In this situation, |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(trigger, updateMask, allowMissing);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
UpdateTriggerAsync(UpdateTriggerRequest, CallSettings)
public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(UpdateTriggerRequest request, CallSettings callSettings = null)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
request | UpdateTriggerRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
Trigger = new Trigger(),
UpdateMask = new FieldMask(),
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}
UpdateTriggerAsync(UpdateTriggerRequest, CancellationToken)
public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(UpdateTriggerRequest request, CancellationToken cancellationToken)
Update a single trigger.
Parameters | |
---|---|
Name | Description |
request | UpdateTriggerRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Trigger, OperationMetadata>> | A Task containing the RPC response. |
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
Trigger = new Trigger(),
UpdateMask = new FieldMask(),
AllowMissing = false,
ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(request);
// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Trigger retrievedResult = retrievedResponse.Result;
}