deploy method

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

Deploys a revision of a shared flow.

If another revision of the same shared flow is currently deployed, set the override parameter to true to have this revision replace the currently deployed revision. You cannot use a shared flow until it has been deployed to an environment. For a request path organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployments, two permissions are required: * apigee.deployments.create on the resource organizations/{org}/environments/{env} * apigee.sharedflowrevisions.deploy on the resource organizations/{org}/sharedflows/{sf}/revisions/{rev}

Request parameters:

name - Required. Name of the shared flow revision to deploy in the following format: organizations/{org}/environments/{env}/sharedflows/{sharedflow}/revisions/{rev} Value must have pattern ^organizations/\[^/\]+/environments/\[^/\]+/sharedflows/\[^/\]+/revisions/\[^/\]+$.

override - Flag that specifies whether the new deployment replaces other deployed revisions of the shared flow 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 shared flow are deployed in the environment.

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