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\GoogleCloudApigeeV1Deployment;
|
---|
21 | use Google\Service\Apigee\GoogleProtobufEmpty;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "revisions" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $apigeeService = new Google\Service\Apigee(...);
|
---|
28 | * $revisions = $apigeeService->organizations_environments_sharedflows_revisions;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class OrganizationsEnvironmentsSharedflowsRevisions extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Deploys a revision of a shared flow. If another revision of the same shared
|
---|
35 | * flow is currently deployed, set the `override` parameter to `true` to have
|
---|
36 | * this revision replace the currently deployed revision. You cannot use a
|
---|
37 | * shared flow until it has been deployed to an environment. For a request path
|
---|
38 | * `organizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/depl
|
---|
39 | * oyments`, two permissions are required: * `apigee.deployments.create` on the
|
---|
40 | * resource `organizations/{org}/environments/{env}` *
|
---|
41 | * `apigee.sharedflowrevisions.deploy` on the resource
|
---|
42 | * `organizations/{org}/sharedflows/{sf}/revisions/{rev}` (revisions.deploy)
|
---|
43 | *
|
---|
44 | * @param string $name Required. Name of the shared flow revision to deploy in
|
---|
45 | * the following format: `organizations/{org}/environments/{env}/sharedflows/{sh
|
---|
46 | * aredflow}/revisions/{rev}`
|
---|
47 | * @param array $optParams Optional parameters.
|
---|
48 | *
|
---|
49 | * @opt_param bool override Flag that specifies whether the new deployment
|
---|
50 | * replaces other deployed revisions of the shared flow in the environment. Set
|
---|
51 | * `override` to `true` to replace other deployed revisions. By default,
|
---|
52 | * `override` is `false` and the deployment is rejected if other revisions of
|
---|
53 | * the shared flow are deployed in the environment.
|
---|
54 | * @opt_param string serviceAccount Google Cloud IAM service account. The
|
---|
55 | * service account represents the identity of the deployed proxy, and determines
|
---|
56 | * what permissions it has. The format must be
|
---|
57 | * `{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`.
|
---|
58 | * @return GoogleCloudApigeeV1Deployment
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function deploy($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('deploy', [$params], GoogleCloudApigeeV1Deployment::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Gets the deployment of a shared flow revision and actual state reported by
|
---|
69 | * runtime pods. (revisions.getDeployments)
|
---|
70 | *
|
---|
71 | * @param string $name Required. Name representing a shared flow in an
|
---|
72 | * environment in the following format: `organizations/{org}/environments/{env}/
|
---|
73 | * sharedflows/{sharedflow}/revisions/{rev}`
|
---|
74 | * @param array $optParams Optional parameters.
|
---|
75 | * @return GoogleCloudApigeeV1Deployment
|
---|
76 | * @throws \Google\Service\Exception
|
---|
77 | */
|
---|
78 | public function getDeployments($name, $optParams = [])
|
---|
79 | {
|
---|
80 | $params = ['name' => $name];
|
---|
81 | $params = array_merge($params, $optParams);
|
---|
82 | return $this->call('getDeployments', [$params], GoogleCloudApigeeV1Deployment::class);
|
---|
83 | }
|
---|
84 | /**
|
---|
85 | * Undeploys a shared flow revision from an environment. For a request path `org
|
---|
86 | * anizations/{org}/environments/{env}/sharedflows/{sf}/revisions/{rev}/deployme
|
---|
87 | * nts`, two permissions are required: * `apigee.deployments.delete` on the
|
---|
88 | * resource `organizations/{org}/environments/{env}` *
|
---|
89 | * `apigee.sharedflowrevisions.undeploy` on the resource
|
---|
90 | * `organizations/{org}/sharedflows/{sf}/revisions/{rev}` (revisions.undeploy)
|
---|
91 | *
|
---|
92 | * @param string $name Required. Name of the shared flow revision to undeploy in
|
---|
93 | * the following format: `organizations/{org}/environments/{env}/sharedflows/{sh
|
---|
94 | * aredflow}/revisions/{rev}`
|
---|
95 | * @param array $optParams Optional parameters.
|
---|
96 | * @return GoogleProtobufEmpty
|
---|
97 | * @throws \Google\Service\Exception
|
---|
98 | */
|
---|
99 | public function undeploy($name, $optParams = [])
|
---|
100 | {
|
---|
101 | $params = ['name' => $name];
|
---|
102 | $params = array_merge($params, $optParams);
|
---|
103 | return $this->call('undeploy', [$params], GoogleProtobufEmpty::class);
|
---|
104 | }
|
---|
105 | }
|
---|
106 |
|
---|
107 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
108 | class_alias(OrganizationsEnvironmentsSharedflowsRevisions::class, 'Google_Service_Apigee_Resource_OrganizationsEnvironmentsSharedflowsRevisions');
|
---|