1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\Apigee\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Apigee\GoogleCloudApigeeV1DeploymentChangeReport;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * The "deployments" collection of methods.
|
---|
24 | * Typical usage is:
|
---|
25 | * <code>
|
---|
26 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
27 | * $deployments = $apigeeService->organizations_environments_apis_revisions_deployments;
|
---|
28 | * </code>
|
---|
29 | */
|
---|
30 | class OrganizationsEnvironmentsApisRevisionsDeployments extends \Google\Service\Resource
|
---|
31 | {
|
---|
32 | /**
|
---|
33 | * Generates a report for a dry run analysis of a DeployApiProxy request without
|
---|
34 | * committing the deployment. In addition to the standard validations performed
|
---|
35 | * when adding deployments, additional analysis will be done to detect possible
|
---|
36 | * traffic routing changes that would result from this deployment being created.
|
---|
37 | * Any potential routing conflicts or unsafe changes will be reported in the
|
---|
38 | * response. This routing analysis is not performed for a non-dry-run
|
---|
39 | * DeployApiProxy request. For a request path `organizations/{org}/environments/
|
---|
40 | * {env}/apis/{api}/revisions/{rev}/deployments:generateDeployChangeReport`, two
|
---|
41 | * permissions are required: * `apigee.deployments.create` on the resource
|
---|
42 | * `organizations/{org}/environments/{env}` * `apigee.proxyrevisions.deploy` on
|
---|
43 | * the resource `organizations/{org}/apis/{api}/revisions/{rev}`
|
---|
44 | * (deployments.generateDeployChangeReport)
|
---|
45 | *
|
---|
46 | * @param string $name Name of the API proxy revision deployment in the
|
---|
47 | * following format:
|
---|
48 | * `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`
|
---|
49 | * @param array $optParams Optional parameters.
|
---|
50 | *
|
---|
51 | * @opt_param bool override Flag that specifies whether to force the deployment
|
---|
52 | * of the new revision over the currently deployed revision by overriding
|
---|
53 | * conflict checks.
|
---|
54 | * @return GoogleCloudApigeeV1DeploymentChangeReport
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function generateDeployChangeReport($name, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['name' => $name];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('generateDeployChangeReport', [$params], GoogleCloudApigeeV1DeploymentChangeReport::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Generates a report for a dry run analysis of an UndeployApiProxy request
|
---|
65 | * without committing the undeploy. In addition to the standard validations
|
---|
66 | * performed when removing deployments, additional analysis will be done to
|
---|
67 | * detect possible traffic routing changes that would result from this
|
---|
68 | * deployment being removed. Any potential routing conflicts or unsafe changes
|
---|
69 | * will be reported in the response. This routing analysis is not performed for
|
---|
70 | * a non-dry-run UndeployApiProxy request. For a request path `organizations/{or
|
---|
71 | * g}/environments/{env}/apis/{api}/revisions/{rev}/deployments:generateUndeploy
|
---|
72 | * ChangeReport`, two permissions are required: * `apigee.deployments.delete` on
|
---|
73 | * the resource `organizations/{org}/environments/{env}` *
|
---|
74 | * `apigee.proxyrevisions.undeploy` on the resource
|
---|
75 | * `organizations/{org}/apis/{api}/revisions/{rev}`
|
---|
76 | * (deployments.generateUndeployChangeReport)
|
---|
77 | *
|
---|
78 | * @param string $name Name of the API proxy revision deployment in the
|
---|
79 | * following format:
|
---|
80 | * `organizations/{org}/environments/{env}/apis/{api}/revisions/{rev}`
|
---|
81 | * @param array $optParams Optional parameters.
|
---|
82 | * @return GoogleCloudApigeeV1DeploymentChangeReport
|
---|
83 | * @throws \Google\Service\Exception
|
---|
84 | */
|
---|
85 | public function generateUndeployChangeReport($name, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['name' => $name];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('generateUndeployChangeReport', [$params], GoogleCloudApigeeV1DeploymentChangeReport::class);
|
---|
90 | }
|
---|
91 | }
|
---|
92 |
|
---|
93 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
94 | class_alias(OrganizationsEnvironmentsApisRevisionsDeployments::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsApisRevisionsDeployments');
|
---|