google-apis-resourcesettings_v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-resourcesettings_v1.rb +15 -0
- data/lib/google/apis/resourcesettings_v1.rb +38 -0
- data/lib/google/apis/resourcesettings_v1/classes.rb +260 -0
- data/lib/google/apis/resourcesettings_v1/gem_version.rb +28 -0
- data/lib/google/apis/resourcesettings_v1/representations.rb +139 -0
- data/lib/google/apis/resourcesettings_v1/service.rb +420 -0
- metadata +76 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
module Google
|
|
16
|
+
module Apis
|
|
17
|
+
module ResourcesettingsV1
|
|
18
|
+
# Version of the google-apis-resourcesettings_v1 gem
|
|
19
|
+
GEM_VERSION = "0.1.0"
|
|
20
|
+
|
|
21
|
+
# Version of the code generator used to generate this client
|
|
22
|
+
GENERATOR_VERSION = "0.3.0"
|
|
23
|
+
|
|
24
|
+
# Revision of the discovery document this client was generated from
|
|
25
|
+
REVISION = "20210615"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'date'
|
|
16
|
+
require 'google/apis/core/base_service'
|
|
17
|
+
require 'google/apis/core/json_representation'
|
|
18
|
+
require 'google/apis/core/hashable'
|
|
19
|
+
require 'google/apis/errors'
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Apis
|
|
23
|
+
module ResourcesettingsV1
|
|
24
|
+
|
|
25
|
+
class GoogleCloudResourcesettingsV1ListSettingsResponse
|
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
|
+
|
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
class GoogleCloudResourcesettingsV1Setting
|
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
33
|
+
|
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
class GoogleCloudResourcesettingsV1SettingMetadata
|
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
39
|
+
|
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class GoogleCloudResourcesettingsV1Value
|
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
45
|
+
|
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class GoogleCloudResourcesettingsV1ValueEnumValue
|
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
51
|
+
|
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class GoogleCloudResourcesettingsV1ValueStringMap
|
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
57
|
+
|
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class GoogleCloudResourcesettingsV1ValueStringSet
|
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
63
|
+
|
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class GoogleCloudResourcesettingsV1ListSettingsResponse
|
|
68
|
+
# @private
|
|
69
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
70
|
+
property :next_page_token, as: 'nextPageToken'
|
|
71
|
+
collection :settings, as: 'settings', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
class GoogleCloudResourcesettingsV1Setting
|
|
77
|
+
# @private
|
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
79
|
+
property :effective_value, as: 'effectiveValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value::Representation
|
|
80
|
+
|
|
81
|
+
property :etag, as: 'etag'
|
|
82
|
+
property :local_value, as: 'localValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value::Representation
|
|
83
|
+
|
|
84
|
+
property :metadata, as: 'metadata', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1SettingMetadata, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1SettingMetadata::Representation
|
|
85
|
+
|
|
86
|
+
property :name, as: 'name'
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
class GoogleCloudResourcesettingsV1SettingMetadata
|
|
91
|
+
# @private
|
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
93
|
+
property :data_type, as: 'dataType'
|
|
94
|
+
property :default_value, as: 'defaultValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Value::Representation
|
|
95
|
+
|
|
96
|
+
property :description, as: 'description'
|
|
97
|
+
property :display_name, as: 'displayName'
|
|
98
|
+
property :read_only, as: 'readOnly'
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
class GoogleCloudResourcesettingsV1Value
|
|
103
|
+
# @private
|
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
105
|
+
property :boolean_value, as: 'booleanValue'
|
|
106
|
+
property :duration_value, as: 'durationValue'
|
|
107
|
+
property :enum_value, as: 'enumValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueEnumValue, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueEnumValue::Representation
|
|
108
|
+
|
|
109
|
+
property :string_map_value, as: 'stringMapValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueStringMap, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueStringMap::Representation
|
|
110
|
+
|
|
111
|
+
property :string_set_value, as: 'stringSetValue', class: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueStringSet, decorator: Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ValueStringSet::Representation
|
|
112
|
+
|
|
113
|
+
property :string_value, as: 'stringValue'
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
class GoogleCloudResourcesettingsV1ValueEnumValue
|
|
118
|
+
# @private
|
|
119
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
120
|
+
property :value, as: 'value'
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
class GoogleCloudResourcesettingsV1ValueStringMap
|
|
125
|
+
# @private
|
|
126
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
127
|
+
hash :mappings, as: 'mappings'
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
class GoogleCloudResourcesettingsV1ValueStringSet
|
|
132
|
+
# @private
|
|
133
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
134
|
+
collection :values, as: 'values'
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'google/apis/core/base_service'
|
|
16
|
+
require 'google/apis/core/json_representation'
|
|
17
|
+
require 'google/apis/core/hashable'
|
|
18
|
+
require 'google/apis/errors'
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Apis
|
|
22
|
+
module ResourcesettingsV1
|
|
23
|
+
# Resource Settings API
|
|
24
|
+
#
|
|
25
|
+
# The Resource Settings API allows users to control and modify the behavior of
|
|
26
|
+
# their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud
|
|
27
|
+
# Resource Hierarchy.
|
|
28
|
+
#
|
|
29
|
+
# @example
|
|
30
|
+
# require 'google/apis/resourcesettings_v1'
|
|
31
|
+
#
|
|
32
|
+
# Resourcesettings = Google::Apis::ResourcesettingsV1 # Alias the module
|
|
33
|
+
# service = Resourcesettings::ResourceSettingsService.new
|
|
34
|
+
#
|
|
35
|
+
# @see https://cloud.google.com/resource-manager/docs/resource-settings/overview
|
|
36
|
+
class ResourceSettingsService < Google::Apis::Core::BaseService
|
|
37
|
+
# @return [String]
|
|
38
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
39
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
40
|
+
attr_accessor :key
|
|
41
|
+
|
|
42
|
+
# @return [String]
|
|
43
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
44
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
45
|
+
attr_accessor :quota_user
|
|
46
|
+
|
|
47
|
+
def initialize
|
|
48
|
+
super('https://resourcesettings.googleapis.com/', '',
|
|
49
|
+
client_name: 'google-apis-resourcesettings_v1',
|
|
50
|
+
client_version: Google::Apis::ResourcesettingsV1::GEM_VERSION)
|
|
51
|
+
@batch_path = 'batch'
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
55
|
+
# Code.NOT_FOUND` if the setting does not exist.
|
|
56
|
+
# @param [String] name
|
|
57
|
+
# Required. The name of the setting to get. See Setting for naming requirements.
|
|
58
|
+
# @param [String] view
|
|
59
|
+
# The SettingView for this request.
|
|
60
|
+
# @param [String] fields
|
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
|
62
|
+
# @param [String] quota_user
|
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
|
66
|
+
# Request-specific options
|
|
67
|
+
#
|
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
|
69
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
71
|
+
#
|
|
72
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
73
|
+
#
|
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
77
|
+
def get_folder_setting(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
78
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
79
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
80
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
81
|
+
command.params['name'] = name unless name.nil?
|
|
82
|
+
command.query['view'] = view unless view.nil?
|
|
83
|
+
command.query['fields'] = fields unless fields.nil?
|
|
84
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
85
|
+
execute_or_queue_command(command, &block)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Lists all the settings that are available on the Cloud resource `parent`.
|
|
89
|
+
# @param [String] parent
|
|
90
|
+
# Required. The project, folder, or organization that is the parent resource for
|
|
91
|
+
# this setting. Must be in one of the following forms: * `projects/`
|
|
92
|
+
# project_number`` * `projects/`project_id`` * `folders/`folder_id`` * `
|
|
93
|
+
# organizations/`organization_id``
|
|
94
|
+
# @param [Fixnum] page_size
|
|
95
|
+
# Unused. The size of the page to be returned.
|
|
96
|
+
# @param [String] page_token
|
|
97
|
+
# Unused. A page token used to retrieve the next page.
|
|
98
|
+
# @param [String] view
|
|
99
|
+
# The SettingView for this request.
|
|
100
|
+
# @param [String] fields
|
|
101
|
+
# Selector specifying which fields to include in a partial response.
|
|
102
|
+
# @param [String] quota_user
|
|
103
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
104
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
105
|
+
# @param [Google::Apis::RequestOptions] options
|
|
106
|
+
# Request-specific options
|
|
107
|
+
#
|
|
108
|
+
# @yield [result, err] Result & error if block supplied
|
|
109
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse] parsed result object
|
|
110
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
111
|
+
#
|
|
112
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse]
|
|
113
|
+
#
|
|
114
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
115
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
116
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
117
|
+
def list_folder_settings(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
118
|
+
command = make_simple_command(:get, 'v1/{+parent}/settings', options)
|
|
119
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse::Representation
|
|
120
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse
|
|
121
|
+
command.params['parent'] = parent unless parent.nil?
|
|
122
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
123
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
124
|
+
command.query['view'] = view unless view.nil?
|
|
125
|
+
command.query['fields'] = fields unless fields.nil?
|
|
126
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
127
|
+
execute_or_queue_command(command, &block)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
131
|
+
# Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status`
|
|
132
|
+
# with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read
|
|
133
|
+
# only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag
|
|
134
|
+
# supplied in the request does not match the persisted etag of the setting value.
|
|
135
|
+
# On success, the response will contain only `name`, `local_value` and `etag`.
|
|
136
|
+
# The `metadata` and `effective_value` cannot be updated through this API. Note:
|
|
137
|
+
# the supplied setting will perform a full overwrite of the `local_value` field.
|
|
138
|
+
# @param [String] name
|
|
139
|
+
# The resource name of the setting. Must be in one of the following forms: * `
|
|
140
|
+
# projects/`project_number`/settings/`setting_name`` * `folders/`folder_id`/
|
|
141
|
+
# settings/`setting_name`` * `organizations/`organization_id`/settings/`
|
|
142
|
+
# setting_name`` For example, "/projects/123/settings/gcp-enableMyFeature"
|
|
143
|
+
# @param [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] google_cloud_resourcesettings_v1_setting_object
|
|
144
|
+
# @param [String] fields
|
|
145
|
+
# Selector specifying which fields to include in a partial response.
|
|
146
|
+
# @param [String] quota_user
|
|
147
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
148
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
149
|
+
# @param [Google::Apis::RequestOptions] options
|
|
150
|
+
# Request-specific options
|
|
151
|
+
#
|
|
152
|
+
# @yield [result, err] Result & error if block supplied
|
|
153
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
154
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
155
|
+
#
|
|
156
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
157
|
+
#
|
|
158
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
159
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
160
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
161
|
+
def patch_folder_setting(name, google_cloud_resourcesettings_v1_setting_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
162
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
|
163
|
+
command.request_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
164
|
+
command.request_object = google_cloud_resourcesettings_v1_setting_object
|
|
165
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
166
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
167
|
+
command.params['name'] = name unless name.nil?
|
|
168
|
+
command.query['fields'] = fields unless fields.nil?
|
|
169
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
170
|
+
execute_or_queue_command(command, &block)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
174
|
+
# Code.NOT_FOUND` if the setting does not exist.
|
|
175
|
+
# @param [String] name
|
|
176
|
+
# Required. The name of the setting to get. See Setting for naming requirements.
|
|
177
|
+
# @param [String] view
|
|
178
|
+
# The SettingView for this request.
|
|
179
|
+
# @param [String] fields
|
|
180
|
+
# Selector specifying which fields to include in a partial response.
|
|
181
|
+
# @param [String] quota_user
|
|
182
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
183
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
184
|
+
# @param [Google::Apis::RequestOptions] options
|
|
185
|
+
# Request-specific options
|
|
186
|
+
#
|
|
187
|
+
# @yield [result, err] Result & error if block supplied
|
|
188
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
189
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
190
|
+
#
|
|
191
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
192
|
+
#
|
|
193
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
194
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
195
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
196
|
+
def get_organization_setting(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
197
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
198
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
199
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
200
|
+
command.params['name'] = name unless name.nil?
|
|
201
|
+
command.query['view'] = view unless view.nil?
|
|
202
|
+
command.query['fields'] = fields unless fields.nil?
|
|
203
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
204
|
+
execute_or_queue_command(command, &block)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Lists all the settings that are available on the Cloud resource `parent`.
|
|
208
|
+
# @param [String] parent
|
|
209
|
+
# Required. The project, folder, or organization that is the parent resource for
|
|
210
|
+
# this setting. Must be in one of the following forms: * `projects/`
|
|
211
|
+
# project_number`` * `projects/`project_id`` * `folders/`folder_id`` * `
|
|
212
|
+
# organizations/`organization_id``
|
|
213
|
+
# @param [Fixnum] page_size
|
|
214
|
+
# Unused. The size of the page to be returned.
|
|
215
|
+
# @param [String] page_token
|
|
216
|
+
# Unused. A page token used to retrieve the next page.
|
|
217
|
+
# @param [String] view
|
|
218
|
+
# The SettingView for this request.
|
|
219
|
+
# @param [String] fields
|
|
220
|
+
# Selector specifying which fields to include in a partial response.
|
|
221
|
+
# @param [String] quota_user
|
|
222
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
223
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
224
|
+
# @param [Google::Apis::RequestOptions] options
|
|
225
|
+
# Request-specific options
|
|
226
|
+
#
|
|
227
|
+
# @yield [result, err] Result & error if block supplied
|
|
228
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse] parsed result object
|
|
229
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
230
|
+
#
|
|
231
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse]
|
|
232
|
+
#
|
|
233
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
234
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
235
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
236
|
+
def list_organization_settings(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
237
|
+
command = make_simple_command(:get, 'v1/{+parent}/settings', options)
|
|
238
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse::Representation
|
|
239
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse
|
|
240
|
+
command.params['parent'] = parent unless parent.nil?
|
|
241
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
242
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
243
|
+
command.query['view'] = view unless view.nil?
|
|
244
|
+
command.query['fields'] = fields unless fields.nil?
|
|
245
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
246
|
+
execute_or_queue_command(command, &block)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
250
|
+
# Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status`
|
|
251
|
+
# with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read
|
|
252
|
+
# only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag
|
|
253
|
+
# supplied in the request does not match the persisted etag of the setting value.
|
|
254
|
+
# On success, the response will contain only `name`, `local_value` and `etag`.
|
|
255
|
+
# The `metadata` and `effective_value` cannot be updated through this API. Note:
|
|
256
|
+
# the supplied setting will perform a full overwrite of the `local_value` field.
|
|
257
|
+
# @param [String] name
|
|
258
|
+
# The resource name of the setting. Must be in one of the following forms: * `
|
|
259
|
+
# projects/`project_number`/settings/`setting_name`` * `folders/`folder_id`/
|
|
260
|
+
# settings/`setting_name`` * `organizations/`organization_id`/settings/`
|
|
261
|
+
# setting_name`` For example, "/projects/123/settings/gcp-enableMyFeature"
|
|
262
|
+
# @param [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] google_cloud_resourcesettings_v1_setting_object
|
|
263
|
+
# @param [String] fields
|
|
264
|
+
# Selector specifying which fields to include in a partial response.
|
|
265
|
+
# @param [String] quota_user
|
|
266
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
267
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
268
|
+
# @param [Google::Apis::RequestOptions] options
|
|
269
|
+
# Request-specific options
|
|
270
|
+
#
|
|
271
|
+
# @yield [result, err] Result & error if block supplied
|
|
272
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
273
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
274
|
+
#
|
|
275
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
276
|
+
#
|
|
277
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
278
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
279
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
280
|
+
def patch_organization_setting(name, google_cloud_resourcesettings_v1_setting_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
281
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
|
282
|
+
command.request_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
283
|
+
command.request_object = google_cloud_resourcesettings_v1_setting_object
|
|
284
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
285
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
286
|
+
command.params['name'] = name unless name.nil?
|
|
287
|
+
command.query['fields'] = fields unless fields.nil?
|
|
288
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
289
|
+
execute_or_queue_command(command, &block)
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
293
|
+
# Code.NOT_FOUND` if the setting does not exist.
|
|
294
|
+
# @param [String] name
|
|
295
|
+
# Required. The name of the setting to get. See Setting for naming requirements.
|
|
296
|
+
# @param [String] view
|
|
297
|
+
# The SettingView for this request.
|
|
298
|
+
# @param [String] fields
|
|
299
|
+
# Selector specifying which fields to include in a partial response.
|
|
300
|
+
# @param [String] quota_user
|
|
301
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
302
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
303
|
+
# @param [Google::Apis::RequestOptions] options
|
|
304
|
+
# Request-specific options
|
|
305
|
+
#
|
|
306
|
+
# @yield [result, err] Result & error if block supplied
|
|
307
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
308
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
309
|
+
#
|
|
310
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
311
|
+
#
|
|
312
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
313
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
314
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
315
|
+
def get_project_setting(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
316
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
317
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
318
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
319
|
+
command.params['name'] = name unless name.nil?
|
|
320
|
+
command.query['view'] = view unless view.nil?
|
|
321
|
+
command.query['fields'] = fields unless fields.nil?
|
|
322
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
323
|
+
execute_or_queue_command(command, &block)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Lists all the settings that are available on the Cloud resource `parent`.
|
|
327
|
+
# @param [String] parent
|
|
328
|
+
# Required. The project, folder, or organization that is the parent resource for
|
|
329
|
+
# this setting. Must be in one of the following forms: * `projects/`
|
|
330
|
+
# project_number`` * `projects/`project_id`` * `folders/`folder_id`` * `
|
|
331
|
+
# organizations/`organization_id``
|
|
332
|
+
# @param [Fixnum] page_size
|
|
333
|
+
# Unused. The size of the page to be returned.
|
|
334
|
+
# @param [String] page_token
|
|
335
|
+
# Unused. A page token used to retrieve the next page.
|
|
336
|
+
# @param [String] view
|
|
337
|
+
# The SettingView for this request.
|
|
338
|
+
# @param [String] fields
|
|
339
|
+
# Selector specifying which fields to include in a partial response.
|
|
340
|
+
# @param [String] quota_user
|
|
341
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
342
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
343
|
+
# @param [Google::Apis::RequestOptions] options
|
|
344
|
+
# Request-specific options
|
|
345
|
+
#
|
|
346
|
+
# @yield [result, err] Result & error if block supplied
|
|
347
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse] parsed result object
|
|
348
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
349
|
+
#
|
|
350
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse]
|
|
351
|
+
#
|
|
352
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
353
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
354
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
355
|
+
def list_project_settings(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
356
|
+
command = make_simple_command(:get, 'v1/{+parent}/settings', options)
|
|
357
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse::Representation
|
|
358
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1ListSettingsResponse
|
|
359
|
+
command.params['parent'] = parent unless parent.nil?
|
|
360
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
361
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
362
|
+
command.query['view'] = view unless view.nil?
|
|
363
|
+
command.query['fields'] = fields unless fields.nil?
|
|
364
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
365
|
+
execute_or_queue_command(command, &block)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.
|
|
369
|
+
# Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status`
|
|
370
|
+
# with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read
|
|
371
|
+
# only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag
|
|
372
|
+
# supplied in the request does not match the persisted etag of the setting value.
|
|
373
|
+
# On success, the response will contain only `name`, `local_value` and `etag`.
|
|
374
|
+
# The `metadata` and `effective_value` cannot be updated through this API. Note:
|
|
375
|
+
# the supplied setting will perform a full overwrite of the `local_value` field.
|
|
376
|
+
# @param [String] name
|
|
377
|
+
# The resource name of the setting. Must be in one of the following forms: * `
|
|
378
|
+
# projects/`project_number`/settings/`setting_name`` * `folders/`folder_id`/
|
|
379
|
+
# settings/`setting_name`` * `organizations/`organization_id`/settings/`
|
|
380
|
+
# setting_name`` For example, "/projects/123/settings/gcp-enableMyFeature"
|
|
381
|
+
# @param [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] google_cloud_resourcesettings_v1_setting_object
|
|
382
|
+
# @param [String] fields
|
|
383
|
+
# Selector specifying which fields to include in a partial response.
|
|
384
|
+
# @param [String] quota_user
|
|
385
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
386
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
387
|
+
# @param [Google::Apis::RequestOptions] options
|
|
388
|
+
# Request-specific options
|
|
389
|
+
#
|
|
390
|
+
# @yield [result, err] Result & error if block supplied
|
|
391
|
+
# @yieldparam result [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting] parsed result object
|
|
392
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
393
|
+
#
|
|
394
|
+
# @return [Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting]
|
|
395
|
+
#
|
|
396
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
397
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
398
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
399
|
+
def patch_project_setting(name, google_cloud_resourcesettings_v1_setting_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
400
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
|
401
|
+
command.request_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
402
|
+
command.request_object = google_cloud_resourcesettings_v1_setting_object
|
|
403
|
+
command.response_representation = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting::Representation
|
|
404
|
+
command.response_class = Google::Apis::ResourcesettingsV1::GoogleCloudResourcesettingsV1Setting
|
|
405
|
+
command.params['name'] = name unless name.nil?
|
|
406
|
+
command.query['fields'] = fields unless fields.nil?
|
|
407
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
408
|
+
execute_or_queue_command(command, &block)
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
protected
|
|
412
|
+
|
|
413
|
+
def apply_command_defaults(command)
|
|
414
|
+
command.query['key'] = key unless key.nil?
|
|
415
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
416
|
+
end
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|