|
17 | 17 |
|
18 | 18 | namespace Google\Service\CloudKMS\Resource; |
19 | 19 |
|
| 20 | +use Google\Service\CloudKMS\AutokeyConfig; |
20 | 21 | use Google\Service\CloudKMS\KeyAccessJustificationsPolicyConfig; |
21 | 22 | use Google\Service\CloudKMS\ShowEffectiveAutokeyConfigResponse; |
22 | 23 | use Google\Service\CloudKMS\ShowEffectiveKeyAccessJustificationsEnrollmentConfigResponse; |
|
32 | 33 | */ |
33 | 34 | class Projects extends \Google\Service\Resource |
34 | 35 | { |
| 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 | + } |
35 | 53 | /** |
36 | 54 | * Gets the KeyAccessJustificationsPolicyConfig for a given organization, |
37 | 55 | * folder, or project. (projects.getKajPolicyConfig) |
@@ -101,6 +119,30 @@ public function showEffectiveKeyAccessJustificationsPolicyConfig($project, $optP |
101 | 119 | $params = array_merge($params, $optParams); |
102 | 120 | return $this->call('showEffectiveKeyAccessJustificationsPolicyConfig', [$params], ShowEffectiveKeyAccessJustificationsPolicyConfigResponse::class); |
103 | 121 | } |
| 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 | + } |
104 | 146 | /** |
105 | 147 | * Updates the KeyAccessJustificationsPolicyConfig for a given organization, |
106 | 148 | * folder, or project. (projects.updateKajPolicyConfig) |
|
0 commit comments