execute method

Future<GoogleApiHttpBody> execute(
  1. String parent, {
  2. String? requestId,
  3. String? triggerId,
  4. String? $fields,
})

Executes integrations synchronously.

The response is not returned until the requested execution is either fulfilled or experienced an error. Only one integration can be executed. Request format URL: https://integrations.googleapis.com/v2/projects/$PROJECT/locations/$LOCATION/integrations/$INTEGRATION_NAME:execute Request payload: (the entire payload is optional unless input variables need to be set.) {"variable1": "hello world", "variable2": 1, "variable3": {"my_json_key": "my json string value" }

Request parameters:

parent - Required. The integration resource name. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/integrations/\[^/\]+$.

requestId - Optional. This is used to de-dup incoming request: if the duplicate request was detected, the response from the previous execution is returned.

triggerId - Required. The API trigger id associated with the integration. An integration can have multiple trigger_id. This field is required to disambiguate which trigger should be invoked.

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

Completes with a GoogleApiHttpBody.

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<GoogleApiHttpBody> execute(
  core.String parent, {
  core.String? requestId,
  core.String? triggerId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'requestId': ?requestId == null ? null : [requestId],
    'triggerId': ?triggerId == null ? null : [triggerId],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v2/' + core.Uri.encodeFull('$parent') + ':execute';

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