Skip to content

Commit fae97e8

Browse files
1 parent be4eedc commit fae97e8

3 files changed

Lines changed: 72 additions & 5 deletions

File tree

src/CloudKMS.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,17 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
173173
'projects',
174174
[
175175
'methods' => [
176-
'getKajPolicyConfig' => [
176+
'getAutokeyConfig' => [
177+
'path' => 'v1/{+name}',
178+
'httpMethod' => 'GET',
179+
'parameters' => [
180+
'name' => [
181+
'location' => 'path',
182+
'type' => 'string',
183+
'required' => true,
184+
],
185+
],
186+
],'getKajPolicyConfig' => [
177187
'path' => 'v1/{+name}',
178188
'httpMethod' => 'GET',
179189
'parameters' => [
@@ -213,6 +223,20 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
213223
'required' => true,
214224
],
215225
],
226+
],'updateAutokeyConfig' => [
227+
'path' => 'v1/{+name}',
228+
'httpMethod' => 'PATCH',
229+
'parameters' => [
230+
'name' => [
231+
'location' => 'path',
232+
'type' => 'string',
233+
'required' => true,
234+
],
235+
'updateMask' => [
236+
'location' => 'query',
237+
'type' => 'string',
238+
],
239+
],
216240
],'updateKajPolicyConfig' => [
217241
'path' => 'v1/{+name}',
218242
'httpMethod' => 'PATCH',

src/CloudKMS/Resource/Folders.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131
class Folders extends \Google\Service\Resource
3232
{
3333
/**
34-
* Returns the AutokeyConfig for a folder. (folders.getAutokeyConfig)
34+
* Returns the AutokeyConfig for a folder or project. (folders.getAutokeyConfig)
3535
*
3636
* @param string $name Required. Name of the AutokeyConfig resource, e.g.
37-
* `folders/{FOLDER_NUMBER}/autokeyConfig`.
37+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
38+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
3839
* @param array $optParams Optional parameters.
3940
* @return AutokeyConfig
4041
* @throws \Google\Service\Exception
@@ -62,8 +63,8 @@ public function getKajPolicyConfig($name, $optParams = [])
6263
return $this->call('getKajPolicyConfig', [$params], KeyAccessJustificationsPolicyConfig::class);
6364
}
6465
/**
65-
* Updates the AutokeyConfig for a folder. The caller must have both
66-
* `cloudkms.autokeyConfigs.update` permission on the parent folder and
66+
* Updates the AutokeyConfig for a folder or a project. The caller must have
67+
* both `cloudkms.autokeyConfigs.update` permission on the parent folder and
6768
* `cloudkms.cryptoKeys.setIamPolicy` permission on the provided key project. A
6869
* KeyHandle creation in the folder's descendant projects will use this
6970
* configuration to determine where to create the resulting CryptoKey.

src/CloudKMS/Resource/Projects.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
namespace Google\Service\CloudKMS\Resource;
1919

20+
use Google\Service\CloudKMS\AutokeyConfig;
2021
use Google\Service\CloudKMS\KeyAccessJustificationsPolicyConfig;
2122
use Google\Service\CloudKMS\ShowEffectiveAutokeyConfigResponse;
2223
use Google\Service\CloudKMS\ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse;
@@ -32,6 +33,23 @@
3233
*/
3334
class Projects extends \Google\Service\Resource
3435
{
36+
/**
37+
* Returns the AutokeyConfig for a folder or project.
38+
* (projects.getAutokeyConfig)
39+
*
40+
* @param string $name Required. Name of the AutokeyConfig resource, e.g.
41+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
42+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
43+
* @param array $optParams Optional parameters.
44+
* @return AutokeyConfig
45+
* @throws \Google\Service\Exception
46+
*/
47+
public function getAutokeyConfig($name, $optParams = [])
48+
{
49+
$params = ['name' => $name];
50+
$params = array_merge($params, $optParams);
51+
return $this->call('getAutokeyConfig', [$params], AutokeyConfig::class);
52+
}
3553
/**
3654
* Gets the KeyAccessJustificationsPolicyConfig for a given organization,
3755
* folder, or project. (projects.getKajPolicyConfig)
@@ -101,6 +119,30 @@ public function showEffectiveKeyAccessJustificationsPolicyConfig($project, $optP
101119
$params = array_merge($params, $optParams);
102120
return $this->call('showEffectiveKeyAccessJustificationsPolicyConfig', [$params], ShowEffectiveKeyAccessJustificationsPolicyConfigResponse::class);
103121
}
122+
/**
123+
* Updates the AutokeyConfig for a folder or a project. The caller must have
124+
* both `cloudkms.autokeyConfigs.update` permission on the parent folder and
125+
* `cloudkms.cryptoKeys.setIamPolicy` permission on the provided key project. A
126+
* KeyHandle creation in the folder's descendant projects will use this
127+
* configuration to determine where to create the resulting CryptoKey.
128+
* (projects.updateAutokeyConfig)
129+
*
130+
* @param string $name Identifier. Name of the AutokeyConfig resource, e.g.
131+
* `folders/{FOLDER_NUMBER}/autokeyConfig`
132+
* @param AutokeyConfig $postBody
133+
* @param array $optParams Optional parameters.
134+
*
135+
* @opt_param string updateMask Required. Masks which fields of the
136+
* AutokeyConfig to update, e.g. `keyProject`.
137+
* @return AutokeyConfig
138+
* @throws \Google\Service\Exception
139+
*/
140+
public function updateAutokeyConfig($name, AutokeyConfig $postBody, $optParams = [])
141+
{
142+
$params = ['name' => $name, 'postBody' => $postBody];
143+
$params = array_merge($params, $optParams);
144+
return $this->call('updateAutokeyConfig', [$params], AutokeyConfig::class);
145+
}
104146
/**
105147
* Updates the KeyAccessJustificationsPolicyConfig for a given organization,
106148
* folder, or project. (projects.updateKajPolicyConfig)

0 commit comments

Comments
 (0)