create method

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

Creates a new service configuration rollout.

Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts 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> create(
  Rollout 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') + '/rollouts';

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