source: vendor/google/apiclient-services/src/VMwareEngine/Resource/ProjectsLocationsPrivateCloudsHcxActivationKeys.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 9.5 KB
Line 
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
18namespace Google\Service\VMwareEngine\Resource;
19
20use Google\Service\VMwareEngine\HcxActivationKey;
21use Google\Service\VMwareEngine\ListHcxActivationKeysResponse;
22use Google\Service\VMwareEngine\Operation;
23use Google\Service\VMwareEngine\Policy;
24use Google\Service\VMwareEngine\SetIamPolicyRequest;
25use Google\Service\VMwareEngine\TestIamPermissionsRequest;
26use Google\Service\VMwareEngine\TestIamPermissionsResponse;
27
28/**
29 * The "hcxActivationKeys" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $vmwareengineService = new Google\Service\VMwareEngine(...);
33 * $hcxActivationKeys = $vmwareengineService->projects_locations_privateClouds_hcxActivationKeys;
34 * </code>
35 */
36class ProjectsLocationsPrivateCloudsHcxActivationKeys extends \Google\Service\Resource
37{
38 /**
39 * Creates a new HCX activation key in a given private cloud.
40 * (hcxActivationKeys.create)
41 *
42 * @param string $parent Required. The resource name of the private cloud to
43 * create the key for. Resource names are schemeless URIs that follow the
44 * conventions in https://cloud.google.com/apis/design/resource_names. For
45 * example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`
46 * @param HcxActivationKey $postBody
47 * @param array $optParams Optional parameters.
48 *
49 * @opt_param string hcxActivationKeyId Required. The user-provided identifier
50 * of the `HcxActivationKey` to be created. This identifier must be unique among
51 * `HcxActivationKey` resources within the parent and becomes the final token in
52 * the name URI. The identifier must meet the following requirements: * Only
53 * contains 1-63 alphanumeric characters and hyphens * Begins with an
54 * alphabetical character * Ends with a non-hyphen character * Not formatted as
55 * a UUID * Complies with [RFC
56 * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
57 * @opt_param string requestId A request ID to identify requests. Specify a
58 * unique request ID so that if you must retry your request, the server will
59 * know to ignore the request if it has already been completed. The server
60 * guarantees that a request doesn't result in creation of duplicate commitments
61 * for at least 60 minutes. For example, consider a situation where you make an
62 * initial request and the request times out. If you make the request again with
63 * the same request ID, the server can check if original operation with the same
64 * request ID was received, and if so, will ignore the second request. This
65 * prevents clients from accidentally creating duplicate commitments. The
66 * request ID must be a valid UUID with the exception that zero UUID is not
67 * supported (00000000-0000-0000-0000-000000000000).
68 * @return Operation
69 * @throws \Google\Service\Exception
70 */
71 public function create($parent, HcxActivationKey $postBody, $optParams = [])
72 {
73 $params = ['parent' => $parent, 'postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('create', [$params], Operation::class);
76 }
77 /**
78 * Retrieves a `HcxActivationKey` resource by its resource name.
79 * (hcxActivationKeys.get)
80 *
81 * @param string $name Required. The resource name of the HCX activation key to
82 * retrieve. Resource names are schemeless URIs that follow the conventions in
83 * https://cloud.google.com/apis/design/resource_names. For example:
84 * `projects/my-project/locations/us-central1/privateClouds/my-
85 * cloud/hcxActivationKeys/my-key`
86 * @param array $optParams Optional parameters.
87 * @return HcxActivationKey
88 * @throws \Google\Service\Exception
89 */
90 public function get($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('get', [$params], HcxActivationKey::class);
95 }
96 /**
97 * Gets the access control policy for a resource. Returns an empty policy if the
98 * resource exists and does not have a policy set.
99 * (hcxActivationKeys.getIamPolicy)
100 *
101 * @param string $resource REQUIRED: The resource for which the policy is being
102 * requested. See [Resource
103 * names](https://cloud.google.com/apis/design/resource_names) for the
104 * appropriate value for this field.
105 * @param array $optParams Optional parameters.
106 *
107 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
108 * version that will be used to format the policy. Valid values are 0, 1, and 3.
109 * Requests specifying an invalid value will be rejected. Requests for policies
110 * with any conditional role bindings must specify version 3. Policies with no
111 * conditional role bindings may specify any valid value or leave the field
112 * unset. The policy in the response might use the policy version that you
113 * specified, or it might use a lower policy version. For example, if you
114 * specify version 3, but the policy has no conditional role bindings, the
115 * response uses version 1. To learn which resources support conditions in their
116 * IAM policies, see the [IAM
117 * documentation](https://cloud.google.com/iam/help/conditions/resource-
118 * policies).
119 * @return Policy
120 * @throws \Google\Service\Exception
121 */
122 public function getIamPolicy($resource, $optParams = [])
123 {
124 $params = ['resource' => $resource];
125 $params = array_merge($params, $optParams);
126 return $this->call('getIamPolicy', [$params], Policy::class);
127 }
128 /**
129 * Lists `HcxActivationKey` resources in a given private cloud.
130 * (hcxActivationKeys.listProjectsLocationsPrivateCloudsHcxActivationKeys)
131 *
132 * @param string $parent Required. The resource name of the private cloud to be
133 * queried for HCX activation keys. Resource names are schemeless URIs that
134 * follow the conventions in
135 * https://cloud.google.com/apis/design/resource_names. For example:
136 * `projects/my-project/locations/us-central1/privateClouds/my-cloud`
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param int pageSize The maximum number of HCX activation keys to return
140 * in one page. The service may return fewer than this value. The maximum value
141 * is coerced to 1000. The default value of this field is 500.
142 * @opt_param string pageToken A page token, received from a previous
143 * `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page.
144 * When paginating, all other parameters provided to `ListHcxActivationKeys`
145 * must match the call that provided the page token.
146 * @return ListHcxActivationKeysResponse
147 * @throws \Google\Service\Exception
148 */
149 public function listProjectsLocationsPrivateCloudsHcxActivationKeys($parent, $optParams = [])
150 {
151 $params = ['parent' => $parent];
152 $params = array_merge($params, $optParams);
153 return $this->call('list', [$params], ListHcxActivationKeysResponse::class);
154 }
155 /**
156 * Sets the access control policy on the specified resource. Replaces any
157 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
158 * `PERMISSION_DENIED` errors. (hcxActivationKeys.setIamPolicy)
159 *
160 * @param string $resource REQUIRED: The resource for which the policy is being
161 * specified. See [Resource
162 * names](https://cloud.google.com/apis/design/resource_names) for the
163 * appropriate value for this field.
164 * @param SetIamPolicyRequest $postBody
165 * @param array $optParams Optional parameters.
166 * @return Policy
167 * @throws \Google\Service\Exception
168 */
169 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
170 {
171 $params = ['resource' => $resource, 'postBody' => $postBody];
172 $params = array_merge($params, $optParams);
173 return $this->call('setIamPolicy', [$params], Policy::class);
174 }
175 /**
176 * Returns permissions that a caller has on the specified resource. If the
177 * resource does not exist, this will return an empty set of permissions, not a
178 * `NOT_FOUND` error. Note: This operation is designed to be used for building
179 * permission-aware UIs and command-line tools, not for authorization checking.
180 * This operation may "fail open" without warning.
181 * (hcxActivationKeys.testIamPermissions)
182 *
183 * @param string $resource REQUIRED: The resource for which the policy detail is
184 * being requested. See [Resource
185 * names](https://cloud.google.com/apis/design/resource_names) for the
186 * appropriate value for this field.
187 * @param TestIamPermissionsRequest $postBody
188 * @param array $optParams Optional parameters.
189 * @return TestIamPermissionsResponse
190 * @throws \Google\Service\Exception
191 */
192 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
193 {
194 $params = ['resource' => $resource, 'postBody' => $postBody];
195 $params = array_merge($params, $optParams);
196 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
197 }
198}
199
200// Adding a class alias for backwards compatibility with the previous class name.
201class_alias(ProjectsLocationsPrivateCloudsHcxActivationKeys::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsPrivateCloudsHcxActivationKeys');
Note: See TracBrowser for help on using the repository browser.