source: vendor/google/apiclient-services/src/Logging/Resource/V2.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 7.1 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\Logging\Resource;
19
20use Google\Service\Logging\CmekSettings;
21use Google\Service\Logging\Settings;
22
23/**
24 * The "v2" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $loggingService = new Google\Service\Logging(...);
28 * $v2 = $loggingService->v2;
29 * </code>
30 */
31class V2 extends \Google\Service\Resource
32{
33 /**
34 * Gets the Logging CMEK settings for the given resource.Note: CMEK for the Log
35 * Router can be configured for Google Cloud projects, folders, organizations,
36 * and billing accounts. Once configured for an organization, it applies to all
37 * projects and folders in the Google Cloud organization.See Enabling CMEK for
38 * Log Router (https://cloud.google.com/logging/docs/routing/managed-encryption)
39 * for more information. (v2.getCmekSettings)
40 *
41 * @param string $name Required. The resource for which to retrieve CMEK
42 * settings. "projects/[PROJECT_ID]/cmekSettings"
43 * "organizations/[ORGANIZATION_ID]/cmekSettings"
44 * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
45 * "folders/[FOLDER_ID]/cmekSettings" For
46 * example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can
47 * be configured for Google Cloud projects, folders, organizations, and billing
48 * accounts. Once configured for an organization, it applies to all projects and
49 * folders in the Google Cloud organization.
50 * @param array $optParams Optional parameters.
51 * @return CmekSettings
52 * @throws \Google\Service\Exception
53 */
54 public function getCmekSettings($name, $optParams = [])
55 {
56 $params = ['name' => $name];
57 $params = array_merge($params, $optParams);
58 return $this->call('getCmekSettings', [$params], CmekSettings::class);
59 }
60 /**
61 * Gets the settings for the given resource.Note: Settings can be retrieved for
62 * Google Cloud projects, folders, organizations, and billing accounts.See View
63 * default resource settings for Logging
64 * (https://cloud.google.com/logging/docs/default-settings#view-org-settings)
65 * for more information. (v2.getSettings)
66 *
67 * @param string $name Required. The resource for which to retrieve settings.
68 * "projects/[PROJECT_ID]/settings" "organizations/[ORGANIZATION_ID]/settings"
69 * "billingAccounts/[BILLING_ACCOUNT_ID]/settings"
70 * "folders/[FOLDER_ID]/settings" For
71 * example:"organizations/12345/settings"Note: Settings can be retrieved for
72 * Google Cloud projects, folders, organizations, and billing accounts.
73 * @param array $optParams Optional parameters.
74 * @return Settings
75 * @throws \Google\Service\Exception
76 */
77 public function getSettings($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('getSettings', [$params], Settings::class);
82 }
83 /**
84 * Updates the Log Router CMEK settings for the given resource.Note: CMEK for
85 * the Log Router can currently only be configured for Google Cloud
86 * organizations. Once configured, it applies to all projects and folders in the
87 * Google Cloud organization.UpdateCmekSettings fails when any of the following
88 * are true: The value of kms_key_name is invalid. The associated service
89 * account doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter
90 * role assigned for the key. Access to the key is disabled.See Enabling CMEK
91 * for Log Router (https://cloud.google.com/logging/docs/routing/managed-
92 * encryption) for more information. (v2.updateCmekSettings)
93 *
94 * @param string $name Required. The resource name for the CMEK settings to
95 * update. "projects/[PROJECT_ID]/cmekSettings"
96 * "organizations/[ORGANIZATION_ID]/cmekSettings"
97 * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings"
98 * "folders/[FOLDER_ID]/cmekSettings" For
99 * example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router can
100 * currently only be configured for Google Cloud organizations. Once configured,
101 * it applies to all projects and folders in the Google Cloud organization.
102 * @param CmekSettings $postBody
103 * @param array $optParams Optional parameters.
104 *
105 * @opt_param string updateMask Optional. Field mask identifying which fields
106 * from cmek_settings should be updated. A field will be overwritten if and only
107 * if it is in the update mask. Output only fields cannot be updated.See
108 * FieldMask for more information.For example: "updateMask=kmsKeyName"
109 * @return CmekSettings
110 * @throws \Google\Service\Exception
111 */
112 public function updateCmekSettings($name, CmekSettings $postBody, $optParams = [])
113 {
114 $params = ['name' => $name, 'postBody' => $postBody];
115 $params = array_merge($params, $optParams);
116 return $this->call('updateCmekSettings', [$params], CmekSettings::class);
117 }
118 /**
119 * Updates the settings for the given resource. This method applies to all
120 * feature configurations for organization and folders.UpdateSettings fails when
121 * any of the following are true: The value of storage_location either isn't
122 * supported by Logging or violates the location OrgPolicy. The
123 * default_sink_config field is set, but it has an unspecified filter write
124 * mode. The value of kms_key_name is invalid. The associated service account
125 * doesn't have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role
126 * assigned for the key. Access to the key is disabled.See Configure default
127 * settings for organizations and folders
128 * (https://cloud.google.com/logging/docs/default-settings) for more
129 * information. (v2.updateSettings)
130 *
131 * @param string $name Required. The resource name for the settings to update.
132 * "organizations/[ORGANIZATION_ID]/settings" "folders/[FOLDER_ID]/settings" For
133 * example:"organizations/12345/settings"
134 * @param Settings $postBody
135 * @param array $optParams Optional parameters.
136 *
137 * @opt_param string updateMask Optional. Field mask identifying which fields
138 * from settings should be updated. A field will be overwritten if and only if
139 * it is in the update mask. Output only fields cannot be updated.See FieldMask
140 * for more information.For example: "updateMask=kmsKeyName"
141 * @return Settings
142 * @throws \Google\Service\Exception
143 */
144 public function updateSettings($name, Settings $postBody, $optParams = [])
145 {
146 $params = ['name' => $name, 'postBody' => $postBody];
147 $params = array_merge($params, $optParams);
148 return $this->call('updateSettings', [$params], Settings::class);
149 }
150}
151
152// Adding a class alias for backwards compatibility with the previous class name.
153class_alias(V2::class, 'Google_Service_Logging_Resource_V2');
Note: See TracBrowser for help on using the repository browser.