google-apis-policysimulator_v1beta 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/policysimulator_v1beta/classes.rb +647 -0
- data/lib/google/apis/policysimulator_v1beta/gem_version.rb +28 -0
- data/lib/google/apis/policysimulator_v1beta/representations.rb +234 -0
- data/lib/google/apis/policysimulator_v1beta/service.rb +444 -0
- data/lib/google/apis/policysimulator_v1beta.rb +42 -0
- data/lib/google-apis-policysimulator_v1beta.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,234 @@
|
|
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 PolicysimulatorV1beta
|
24
|
+
|
25
|
+
class GoogleCloudPolicysimulatorV1Replay
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class GoogleCloudPolicysimulatorV1ReplayConfig
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class GoogleCloudPolicysimulatorV1ReplayOperationMetadata
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleCloudPolicysimulatorV1ReplayResultsSummary
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class GoogleIamV1AuditConfig
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class GoogleIamV1AuditLogConfig
|
56
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
+
|
58
|
+
include Google::Apis::Core::JsonObjectSupport
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoogleIamV1Binding
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
class GoogleIamV1Policy
|
68
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class GoogleLongrunningListOperationsResponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class GoogleLongrunningOperation
|
80
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
81
|
+
|
82
|
+
include Google::Apis::Core::JsonObjectSupport
|
83
|
+
end
|
84
|
+
|
85
|
+
class GoogleRpcStatus
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
|
88
|
+
include Google::Apis::Core::JsonObjectSupport
|
89
|
+
end
|
90
|
+
|
91
|
+
class GoogleTypeDate
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
|
+
|
94
|
+
include Google::Apis::Core::JsonObjectSupport
|
95
|
+
end
|
96
|
+
|
97
|
+
class GoogleTypeExpr
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
|
100
|
+
include Google::Apis::Core::JsonObjectSupport
|
101
|
+
end
|
102
|
+
|
103
|
+
class GoogleCloudPolicysimulatorV1Replay
|
104
|
+
# @private
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
106
|
+
property :config, as: 'config', class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1ReplayConfig, decorator: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1ReplayConfig::Representation
|
107
|
+
|
108
|
+
property :name, as: 'name'
|
109
|
+
property :results_summary, as: 'resultsSummary', class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1ReplayResultsSummary, decorator: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1ReplayResultsSummary::Representation
|
110
|
+
|
111
|
+
property :state, as: 'state'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
class GoogleCloudPolicysimulatorV1ReplayConfig
|
116
|
+
# @private
|
117
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
118
|
+
property :log_source, as: 'logSource'
|
119
|
+
hash :policy_overlay, as: 'policyOverlay', class: Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy, decorator: Google::Apis::PolicysimulatorV1beta::GoogleIamV1Policy::Representation
|
120
|
+
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class GoogleCloudPolicysimulatorV1ReplayOperationMetadata
|
125
|
+
# @private
|
126
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
127
|
+
property :start_time, as: 'startTime'
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
class GoogleCloudPolicysimulatorV1ReplayResultsSummary
|
132
|
+
# @private
|
133
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
134
|
+
property :difference_count, as: 'differenceCount'
|
135
|
+
property :error_count, as: 'errorCount'
|
136
|
+
property :log_count, as: 'logCount'
|
137
|
+
property :newest_date, as: 'newestDate', class: Google::Apis::PolicysimulatorV1beta::GoogleTypeDate, decorator: Google::Apis::PolicysimulatorV1beta::GoogleTypeDate::Representation
|
138
|
+
|
139
|
+
property :oldest_date, as: 'oldestDate', class: Google::Apis::PolicysimulatorV1beta::GoogleTypeDate, decorator: Google::Apis::PolicysimulatorV1beta::GoogleTypeDate::Representation
|
140
|
+
|
141
|
+
property :unchanged_count, as: 'unchangedCount'
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
class GoogleIamV1AuditConfig
|
146
|
+
# @private
|
147
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
148
|
+
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditLogConfig, decorator: Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditLogConfig::Representation
|
149
|
+
|
150
|
+
property :service, as: 'service'
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class GoogleIamV1AuditLogConfig
|
155
|
+
# @private
|
156
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
157
|
+
collection :exempted_members, as: 'exemptedMembers'
|
158
|
+
property :log_type, as: 'logType'
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class GoogleIamV1Binding
|
163
|
+
# @private
|
164
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
165
|
+
property :condition, as: 'condition', class: Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr, decorator: Google::Apis::PolicysimulatorV1beta::GoogleTypeExpr::Representation
|
166
|
+
|
167
|
+
collection :members, as: 'members'
|
168
|
+
property :role, as: 'role'
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
class GoogleIamV1Policy
|
173
|
+
# @private
|
174
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
175
|
+
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditConfig, decorator: Google::Apis::PolicysimulatorV1beta::GoogleIamV1AuditConfig::Representation
|
176
|
+
|
177
|
+
collection :bindings, as: 'bindings', class: Google::Apis::PolicysimulatorV1beta::GoogleIamV1Binding, decorator: Google::Apis::PolicysimulatorV1beta::GoogleIamV1Binding::Representation
|
178
|
+
|
179
|
+
property :etag, :base64 => true, as: 'etag'
|
180
|
+
property :version, as: 'version'
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
class GoogleLongrunningListOperationsResponse
|
185
|
+
# @private
|
186
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
187
|
+
property :next_page_token, as: 'nextPageToken'
|
188
|
+
collection :operations, as: 'operations', class: Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation, decorator: Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
189
|
+
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class GoogleLongrunningOperation
|
194
|
+
# @private
|
195
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
196
|
+
property :done, as: 'done'
|
197
|
+
property :error, as: 'error', class: Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus, decorator: Google::Apis::PolicysimulatorV1beta::GoogleRpcStatus::Representation
|
198
|
+
|
199
|
+
hash :metadata, as: 'metadata'
|
200
|
+
property :name, as: 'name'
|
201
|
+
hash :response, as: 'response'
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
class GoogleRpcStatus
|
206
|
+
# @private
|
207
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
208
|
+
property :code, as: 'code'
|
209
|
+
collection :details, as: 'details'
|
210
|
+
property :message, as: 'message'
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class GoogleTypeDate
|
215
|
+
# @private
|
216
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
217
|
+
property :day, as: 'day'
|
218
|
+
property :month, as: 'month'
|
219
|
+
property :year, as: 'year'
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
class GoogleTypeExpr
|
224
|
+
# @private
|
225
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
226
|
+
property :description, as: 'description'
|
227
|
+
property :expression, as: 'expression'
|
228
|
+
property :location, as: 'location'
|
229
|
+
property :title, as: 'title'
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
@@ -0,0 +1,444 @@
|
|
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 PolicysimulatorV1beta
|
23
|
+
# Policy Simulator API
|
24
|
+
#
|
25
|
+
# Policy Simulator is a collection of endpoints for creating, running, and
|
26
|
+
# viewing a Replay. A `Replay` is a type of simulation that lets you see how
|
27
|
+
# your members' access to resources might change if you changed your IAM policy.
|
28
|
+
# During a `Replay`, Policy Simulator re-evaluates, or replays, past access
|
29
|
+
# attempts under both the current policy and your proposed policy, and compares
|
30
|
+
# those results to determine how your members' access might change under the
|
31
|
+
# proposed policy.
|
32
|
+
#
|
33
|
+
# @example
|
34
|
+
# require 'google/apis/policysimulator_v1beta'
|
35
|
+
#
|
36
|
+
# Policysimulator = Google::Apis::PolicysimulatorV1beta # Alias the module
|
37
|
+
# service = Policysimulator::PolicySimulatorService.new
|
38
|
+
#
|
39
|
+
# @see https://cloud.google.com/iam/docs/simulating-access
|
40
|
+
class PolicySimulatorService < Google::Apis::Core::BaseService
|
41
|
+
# @return [String]
|
42
|
+
# API key. Your API key identifies your project and provides you with API access,
|
43
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
44
|
+
attr_accessor :key
|
45
|
+
|
46
|
+
# @return [String]
|
47
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
48
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
49
|
+
attr_accessor :quota_user
|
50
|
+
|
51
|
+
def initialize
|
52
|
+
super('https://policysimulator.googleapis.com/', '',
|
53
|
+
client_name: 'google-apis-policysimulator_v1beta',
|
54
|
+
client_version: Google::Apis::PolicysimulatorV1beta::GEM_VERSION)
|
55
|
+
@batch_path = 'batch'
|
56
|
+
end
|
57
|
+
|
58
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
59
|
+
# to poll the operation result at intervals as recommended by the API service.
|
60
|
+
# @param [String] name
|
61
|
+
# The name of the operation resource.
|
62
|
+
# @param [String] fields
|
63
|
+
# Selector specifying which fields to include in a partial response.
|
64
|
+
# @param [String] quota_user
|
65
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
66
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
67
|
+
# @param [Google::Apis::RequestOptions] options
|
68
|
+
# Request-specific options
|
69
|
+
#
|
70
|
+
# @yield [result, err] Result & error if block supplied
|
71
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
72
|
+
# @yieldparam err [StandardError] error object if request failed
|
73
|
+
#
|
74
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
75
|
+
#
|
76
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
77
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
78
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
79
|
+
def get_folder_location_org_policy_violations_preview_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
80
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
81
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
82
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
83
|
+
command.params['name'] = name unless name.nil?
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
85
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
86
|
+
execute_or_queue_command(command, &block)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
90
|
+
# to poll the operation result at intervals as recommended by the API service.
|
91
|
+
# @param [String] name
|
92
|
+
# The name of the operation resource.
|
93
|
+
# @param [String] fields
|
94
|
+
# Selector specifying which fields to include in a partial response.
|
95
|
+
# @param [String] quota_user
|
96
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
97
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
98
|
+
# @param [Google::Apis::RequestOptions] options
|
99
|
+
# Request-specific options
|
100
|
+
#
|
101
|
+
# @yield [result, err] Result & error if block supplied
|
102
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
103
|
+
# @yieldparam err [StandardError] error object if request failed
|
104
|
+
#
|
105
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
106
|
+
#
|
107
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
108
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
109
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
110
|
+
def get_folder_location_replay_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
111
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
112
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
113
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
114
|
+
command.params['name'] = name unless name.nil?
|
115
|
+
command.query['fields'] = fields unless fields.nil?
|
116
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
117
|
+
execute_or_queue_command(command, &block)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Lists operations that match the specified filter in the request. If the server
|
121
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
122
|
+
# @param [String] name
|
123
|
+
# The name of the operation's parent resource.
|
124
|
+
# @param [String] filter
|
125
|
+
# The standard list filter.
|
126
|
+
# @param [Fixnum] page_size
|
127
|
+
# The standard list page size.
|
128
|
+
# @param [String] page_token
|
129
|
+
# The standard list page token.
|
130
|
+
# @param [String] fields
|
131
|
+
# Selector specifying which fields to include in a partial response.
|
132
|
+
# @param [String] quota_user
|
133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
135
|
+
# @param [Google::Apis::RequestOptions] options
|
136
|
+
# Request-specific options
|
137
|
+
#
|
138
|
+
# @yield [result, err] Result & error if block supplied
|
139
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse] parsed result object
|
140
|
+
# @yieldparam err [StandardError] error object if request failed
|
141
|
+
#
|
142
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse]
|
143
|
+
#
|
144
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
145
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
146
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
147
|
+
def list_folder_location_replay_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
148
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
149
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse::Representation
|
150
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse
|
151
|
+
command.params['name'] = name unless name.nil?
|
152
|
+
command.query['filter'] = filter unless filter.nil?
|
153
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
154
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
155
|
+
command.query['fields'] = fields unless fields.nil?
|
156
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
157
|
+
execute_or_queue_command(command, &block)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
161
|
+
# to poll the operation result at intervals as recommended by the API service.
|
162
|
+
# @param [String] name
|
163
|
+
# The name of the operation resource.
|
164
|
+
# @param [String] fields
|
165
|
+
# Selector specifying which fields to include in a partial response.
|
166
|
+
# @param [String] quota_user
|
167
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
168
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
169
|
+
# @param [Google::Apis::RequestOptions] options
|
170
|
+
# Request-specific options
|
171
|
+
#
|
172
|
+
# @yield [result, err] Result & error if block supplied
|
173
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
174
|
+
# @yieldparam err [StandardError] error object if request failed
|
175
|
+
#
|
176
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
177
|
+
#
|
178
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
179
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
180
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
181
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
182
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
183
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
184
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
185
|
+
command.params['name'] = name unless name.nil?
|
186
|
+
command.query['fields'] = fields unless fields.nil?
|
187
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
188
|
+
execute_or_queue_command(command, &block)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Lists operations that match the specified filter in the request. If the server
|
192
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
193
|
+
# @param [String] name
|
194
|
+
# The name of the operation's parent resource.
|
195
|
+
# @param [String] filter
|
196
|
+
# The standard list filter.
|
197
|
+
# @param [Fixnum] page_size
|
198
|
+
# The standard list page size.
|
199
|
+
# @param [String] page_token
|
200
|
+
# The standard list page token.
|
201
|
+
# @param [String] fields
|
202
|
+
# Selector specifying which fields to include in a partial response.
|
203
|
+
# @param [String] quota_user
|
204
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
205
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
206
|
+
# @param [Google::Apis::RequestOptions] options
|
207
|
+
# Request-specific options
|
208
|
+
#
|
209
|
+
# @yield [result, err] Result & error if block supplied
|
210
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse] parsed result object
|
211
|
+
# @yieldparam err [StandardError] error object if request failed
|
212
|
+
#
|
213
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse]
|
214
|
+
#
|
215
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
216
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
217
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
218
|
+
def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
219
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
220
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse::Representation
|
221
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse
|
222
|
+
command.params['name'] = name unless name.nil?
|
223
|
+
command.query['filter'] = filter unless filter.nil?
|
224
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
225
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
226
|
+
command.query['fields'] = fields unless fields.nil?
|
227
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
228
|
+
execute_or_queue_command(command, &block)
|
229
|
+
end
|
230
|
+
|
231
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
232
|
+
# to poll the operation result at intervals as recommended by the API service.
|
233
|
+
# @param [String] name
|
234
|
+
# The name of the operation resource.
|
235
|
+
# @param [String] fields
|
236
|
+
# Selector specifying which fields to include in a partial response.
|
237
|
+
# @param [String] quota_user
|
238
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
239
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
240
|
+
# @param [Google::Apis::RequestOptions] options
|
241
|
+
# Request-specific options
|
242
|
+
#
|
243
|
+
# @yield [result, err] Result & error if block supplied
|
244
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
245
|
+
# @yieldparam err [StandardError] error object if request failed
|
246
|
+
#
|
247
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
248
|
+
#
|
249
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
250
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
251
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
252
|
+
def get_organization_location_org_policy_violations_preview_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
253
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
254
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
255
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
256
|
+
command.params['name'] = name unless name.nil?
|
257
|
+
command.query['fields'] = fields unless fields.nil?
|
258
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
259
|
+
execute_or_queue_command(command, &block)
|
260
|
+
end
|
261
|
+
|
262
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
263
|
+
# to poll the operation result at intervals as recommended by the API service.
|
264
|
+
# @param [String] name
|
265
|
+
# The name of the operation resource.
|
266
|
+
# @param [String] fields
|
267
|
+
# Selector specifying which fields to include in a partial response.
|
268
|
+
# @param [String] quota_user
|
269
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
270
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
271
|
+
# @param [Google::Apis::RequestOptions] options
|
272
|
+
# Request-specific options
|
273
|
+
#
|
274
|
+
# @yield [result, err] Result & error if block supplied
|
275
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
276
|
+
# @yieldparam err [StandardError] error object if request failed
|
277
|
+
#
|
278
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
279
|
+
#
|
280
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
281
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
282
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
283
|
+
def get_organization_location_replay_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
284
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
285
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
286
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
287
|
+
command.params['name'] = name unless name.nil?
|
288
|
+
command.query['fields'] = fields unless fields.nil?
|
289
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
290
|
+
execute_or_queue_command(command, &block)
|
291
|
+
end
|
292
|
+
|
293
|
+
# Lists operations that match the specified filter in the request. If the server
|
294
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
295
|
+
# @param [String] name
|
296
|
+
# The name of the operation's parent resource.
|
297
|
+
# @param [String] filter
|
298
|
+
# The standard list filter.
|
299
|
+
# @param [Fixnum] page_size
|
300
|
+
# The standard list page size.
|
301
|
+
# @param [String] page_token
|
302
|
+
# The standard list page token.
|
303
|
+
# @param [String] fields
|
304
|
+
# Selector specifying which fields to include in a partial response.
|
305
|
+
# @param [String] quota_user
|
306
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
307
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
308
|
+
# @param [Google::Apis::RequestOptions] options
|
309
|
+
# Request-specific options
|
310
|
+
#
|
311
|
+
# @yield [result, err] Result & error if block supplied
|
312
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse] parsed result object
|
313
|
+
# @yieldparam err [StandardError] error object if request failed
|
314
|
+
#
|
315
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse]
|
316
|
+
#
|
317
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
318
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
319
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
320
|
+
def list_organization_location_replay_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
321
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
322
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse::Representation
|
323
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse
|
324
|
+
command.params['name'] = name unless name.nil?
|
325
|
+
command.query['filter'] = filter unless filter.nil?
|
326
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
327
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
328
|
+
command.query['fields'] = fields unless fields.nil?
|
329
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
330
|
+
execute_or_queue_command(command, &block)
|
331
|
+
end
|
332
|
+
|
333
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
334
|
+
# to poll the operation result at intervals as recommended by the API service.
|
335
|
+
# @param [String] name
|
336
|
+
# The name of the operation resource.
|
337
|
+
# @param [String] fields
|
338
|
+
# Selector specifying which fields to include in a partial response.
|
339
|
+
# @param [String] quota_user
|
340
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
341
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
342
|
+
# @param [Google::Apis::RequestOptions] options
|
343
|
+
# Request-specific options
|
344
|
+
#
|
345
|
+
# @yield [result, err] Result & error if block supplied
|
346
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
347
|
+
# @yieldparam err [StandardError] error object if request failed
|
348
|
+
#
|
349
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
350
|
+
#
|
351
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
352
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
353
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
354
|
+
def get_project_location_org_policy_violations_preview_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
355
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
356
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
357
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
358
|
+
command.params['name'] = name unless name.nil?
|
359
|
+
command.query['fields'] = fields unless fields.nil?
|
360
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
361
|
+
execute_or_queue_command(command, &block)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
365
|
+
# to poll the operation result at intervals as recommended by the API service.
|
366
|
+
# @param [String] name
|
367
|
+
# The name of the operation resource.
|
368
|
+
# @param [String] fields
|
369
|
+
# Selector specifying which fields to include in a partial response.
|
370
|
+
# @param [String] quota_user
|
371
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
372
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
373
|
+
# @param [Google::Apis::RequestOptions] options
|
374
|
+
# Request-specific options
|
375
|
+
#
|
376
|
+
# @yield [result, err] Result & error if block supplied
|
377
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation] parsed result object
|
378
|
+
# @yieldparam err [StandardError] error object if request failed
|
379
|
+
#
|
380
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation]
|
381
|
+
#
|
382
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
383
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
384
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
385
|
+
def get_project_location_replay_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
386
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
387
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation::Representation
|
388
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningOperation
|
389
|
+
command.params['name'] = name unless name.nil?
|
390
|
+
command.query['fields'] = fields unless fields.nil?
|
391
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
392
|
+
execute_or_queue_command(command, &block)
|
393
|
+
end
|
394
|
+
|
395
|
+
# Lists operations that match the specified filter in the request. If the server
|
396
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`.
|
397
|
+
# @param [String] name
|
398
|
+
# The name of the operation's parent resource.
|
399
|
+
# @param [String] filter
|
400
|
+
# The standard list filter.
|
401
|
+
# @param [Fixnum] page_size
|
402
|
+
# The standard list page size.
|
403
|
+
# @param [String] page_token
|
404
|
+
# The standard list page token.
|
405
|
+
# @param [String] fields
|
406
|
+
# Selector specifying which fields to include in a partial response.
|
407
|
+
# @param [String] quota_user
|
408
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
409
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
410
|
+
# @param [Google::Apis::RequestOptions] options
|
411
|
+
# Request-specific options
|
412
|
+
#
|
413
|
+
# @yield [result, err] Result & error if block supplied
|
414
|
+
# @yieldparam result [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse] parsed result object
|
415
|
+
# @yieldparam err [StandardError] error object if request failed
|
416
|
+
#
|
417
|
+
# @return [Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse]
|
418
|
+
#
|
419
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
420
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
421
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
422
|
+
def list_project_location_replay_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
423
|
+
command = make_simple_command(:get, 'v1beta/{+name}', options)
|
424
|
+
command.response_representation = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse::Representation
|
425
|
+
command.response_class = Google::Apis::PolicysimulatorV1beta::GoogleLongrunningListOperationsResponse
|
426
|
+
command.params['name'] = name unless name.nil?
|
427
|
+
command.query['filter'] = filter unless filter.nil?
|
428
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
429
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
430
|
+
command.query['fields'] = fields unless fields.nil?
|
431
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
432
|
+
execute_or_queue_command(command, &block)
|
433
|
+
end
|
434
|
+
|
435
|
+
protected
|
436
|
+
|
437
|
+
def apply_command_defaults(command)
|
438
|
+
command.query['key'] = key unless key.nil?
|
439
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
440
|
+
end
|
441
|
+
end
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|