executeEvent method

Future<GoogleCloudIntegrationsV1alphaExecuteEventResponse> executeEvent(
  1. String name, {
  2. String? triggerId,
  3. String? $fields,
})

Executes an integration on receiving events from Integration Connector triggers, Eventarc or CPS Trigger.

Input data to integration is received in body in json format

Request parameters:

name - Required. The integration resource name. Format: projects/{gcp_project_id}/locations/{location}/integrations/{integration_id} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/integrations/\[^/\]+$.

triggerId - Required. Id of the integration trigger config. The trigger_id is in the format: integration_connector_trigger/projects/{gcp_project_id}/location/{location}/connections/{connection_name}/subscriptions/{subscription_name}.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleCloudIntegrationsV1alphaExecuteEventResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GoogleCloudIntegrationsV1alphaExecuteEventResponse> executeEvent(
  core.String name, {
  core.String? triggerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (triggerId != null) 'triggerId': [triggerId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':executeEvent';

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return GoogleCloudIntegrationsV1alphaExecuteEventResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}