submit method

Future<Operation> submit(
  1. SubmitConfigSourceRequest request,
  2. String serviceName, {
  3. String? $fields,
})

Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification).

This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout. Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. Operation

request - The metadata request object.

Request parameters:

serviceName - Required. The name of the service. See the overview for naming requirements. For example: example.googleapis.com.

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

Completes with a Operation.

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

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

Implementation

async.Future<Operation> submit(
  SubmitConfigSourceRequest request,
  core.String serviceName, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/services/' +
      commons.escapeVariable('$serviceName') +
      '/configs:submit';

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