undeploy method

Future<GoogleProtobufEmpty> undeploy(
  1. String name, {
  2. bool? sequencedRollout,
  3. String? $fields,
})

Undeploys an API proxy revision from an environment.

For a request path organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.delete on the resource organizations/{org}/environments/{env} * apigee.proxyrevisions.undeploy on the resource organizations/{org}/apis/{api}/revisions/{rev}

Request parameters:

name - Required. Name of the API proxy revision deployment in the following format: organizations/{org}/environments/{env}/apis/{api}/revisions/{rev} Value must have pattern ^organizations/\[^/\]+/environments/\[^/\]+/apis/\[^/\]+/revisions/\[^/\]+$.

sequencedRollout - Flag that specifies whether to enable sequenced rollout. If set to true, the environment group routing rules corresponding to this deployment will be removed before removing the deployment from the runtime. This is likely to be a rare use case; it is only needed when the intended effect of undeploying this proxy is to cause the traffic it currently handles to be rerouted to some other existing proxy in the environment group. The GenerateUndeployChangeReport API may be used to examine routing changes before issuing the undeployment request, and its response will indicate if a sequenced rollout is recommended for the undeployment.

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

Completes with a GoogleProtobufEmpty.

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<GoogleProtobufEmpty> undeploy(
  core.String name, {
  core.bool? sequencedRollout,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (sequencedRollout != null) 'sequencedRollout': ['${sequencedRollout}'],
    if ($fields != null) 'fields': [$fields],
  };

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

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