deploy method

Future<GoogleCloudApigeeV1Deployment> deploy(
  1. String name, {
  2. bool? override,
  3. bool? sequencedRollout,
  4. String? serviceAccount,
  5. String? $fields,
})

Deploys a revision of an API proxy.

If another revision of the same API proxy revision is currently deployed, set the override parameter to true to have this revision replace the currently deployed revision. You cannot invoke an API proxy until it has been deployed to an environment. After you deploy an API proxy revision, you cannot edit it. To edit the API proxy, you must create and deploy a new revision. For a request path organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.create on the resource organizations/{org}/environments/{env} * apigee.proxyrevisions.deploy 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/\[^/\]+$.

override - Flag that specifies whether the new deployment replaces other deployed revisions of the API proxy in the environment. Set override to true to replace other deployed revisions. By default, override is false and the deployment is rejected if other revisions of the API proxy are deployed in the environment.

sequencedRollout - Flag that specifies whether to enable sequenced rollout. If set to true, the routing rules for this deployment and the environment changes to add the deployment will be rolled out in a safe order. This reduces the risk of downtime that could be caused by changing the environment group's routing before the new destination for the affected traffic is ready to receive it. This should only be necessary if the new deployment will be capturing traffic from another environment under a shared environment group or if traffic will be rerouted to a different environment due to a base path removal. The generateDeployChangeReport API may be used to examine routing changes before issuing the deployment request, and its response will indicate if a sequenced rollout is recommended for the deployment.

serviceAccount - Google Cloud IAM service account. The service account represents the identity of the deployed proxy, and determines what permissions it has. The format must be {ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com.

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

Completes with a GoogleCloudApigeeV1Deployment.

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

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

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