google-api-client 0.10.2 → 0.10.3

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.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/MIGRATING.md +22 -7
  4. data/README.md +4 -8
  5. data/api_names.yaml +1210 -37815
  6. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +32 -0
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +144 -0
  8. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +86 -0
  9. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +90 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +764 -764
  12. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +180 -180
  13. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +421 -421
  14. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/classes.rb +1 -0
  16. data/generated/google/apis/admin_reports_v1.rb +1 -1
  17. data/generated/google/apis/adsense_v1_4.rb +1 -1
  18. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +187 -187
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +42 -42
  21. data/generated/google/apis/appengine_v1.rb +40 -0
  22. data/generated/google/apis/appengine_v1/classes.rb +2251 -0
  23. data/generated/google/apis/appengine_v1/representations.rb +858 -0
  24. data/generated/google/apis/appengine_v1/service.rb +894 -0
  25. data/generated/google/apis/bigquery_v2.rb +1 -1
  26. data/generated/google/apis/bigquery_v2/classes.rb +11 -6
  27. data/generated/google/apis/books_v1.rb +1 -1
  28. data/generated/google/apis/books_v1/classes.rb +26 -0
  29. data/generated/google/apis/books_v1/representations.rb +15 -0
  30. data/generated/google/apis/books_v1/service.rb +4 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1/classes.rb +638 -637
  35. data/generated/google/apis/cloudbuild_v1/representations.rb +110 -110
  36. data/generated/google/apis/cloudbuild_v1/service.rb +139 -139
  37. data/generated/google/apis/clouddebugger_v2.rb +3 -3
  38. data/generated/google/apis/clouddebugger_v2/classes.rb +131 -131
  39. data/generated/google/apis/clouddebugger_v2/representations.rb +25 -25
  40. data/generated/google/apis/clouderrorreporting_v1beta1.rb +36 -0
  41. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +590 -0
  42. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +252 -0
  43. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +350 -0
  44. data/generated/google/apis/cloudfunctions_v1.rb +35 -0
  45. data/generated/google/apis/cloudfunctions_v1/classes.rb +98 -0
  46. data/generated/google/apis/cloudfunctions_v1/representations.rb +57 -0
  47. data/generated/google/apis/cloudfunctions_v1/service.rb +89 -0
  48. data/generated/google/apis/cloudkms_v1/classes.rb +277 -270
  49. data/generated/google/apis/cloudkms_v1/representations.rb +73 -73
  50. data/generated/google/apis/cloudkms_v1/service.rb +194 -194
  51. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  52. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1147 -1144
  53. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
  54. data/generated/google/apis/cloudresourcemanager_v1/service.rb +513 -936
  55. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +307 -916
  57. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +63 -285
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +333 -681
  59. data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
  60. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  61. data/generated/google/apis/cloudtrace_v1/service.rb +16 -16
  62. data/generated/google/apis/compute_beta.rb +1 -1
  63. data/generated/google/apis/compute_beta/classes.rb +32 -7
  64. data/generated/google/apis/compute_beta/representations.rb +2 -0
  65. data/generated/google/apis/compute_beta/service.rb +11 -11
  66. data/generated/google/apis/compute_v1.rb +1 -1
  67. data/generated/google/apis/compute_v1/classes.rb +95 -2
  68. data/generated/google/apis/compute_v1/representations.rb +33 -0
  69. data/generated/google/apis/dataflow_v1b3/classes.rb +3333 -3333
  70. data/generated/google/apis/dataflow_v1b3/representations.rb +759 -759
  71. data/generated/google/apis/dataflow_v1b3/service.rb +154 -154
  72. data/generated/google/apis/dataproc_v1.rb +1 -1
  73. data/generated/google/apis/dataproc_v1/classes.rb +1097 -1097
  74. data/generated/google/apis/dataproc_v1/representations.rb +200 -200
  75. data/generated/google/apis/dataproc_v1/service.rb +356 -356
  76. data/generated/google/apis/datastore_v1.rb +4 -4
  77. data/generated/google/apis/datastore_v1/classes.rb +701 -690
  78. data/generated/google/apis/datastore_v1/representations.rb +160 -160
  79. data/generated/google/apis/datastore_v1/service.rb +52 -52
  80. data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -0
  81. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  82. data/generated/google/apis/drive_v2.rb +1 -1
  83. data/generated/google/apis/drive_v2/classes.rb +158 -35
  84. data/generated/google/apis/drive_v2/representations.rb +39 -0
  85. data/generated/google/apis/drive_v2/service.rb +4 -4
  86. data/generated/google/apis/drive_v3.rb +1 -1
  87. data/generated/google/apis/drive_v3/classes.rb +162 -33
  88. data/generated/google/apis/drive_v3/representations.rb +39 -0
  89. data/generated/google/apis/drive_v3/service.rb +4 -4
  90. data/generated/google/apis/firebasedynamiclinks_v1.rb +35 -0
  91. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +466 -0
  92. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +222 -0
  93. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +95 -0
  94. data/generated/google/apis/firebaserules_v1.rb +41 -0
  95. data/generated/google/apis/firebaserules_v1/classes.rb +425 -0
  96. data/generated/google/apis/firebaserules_v1/representations.rb +222 -0
  97. data/generated/google/apis/firebaserules_v1/service.rb +495 -0
  98. data/generated/google/apis/games_v1/classes.rb +4 -0
  99. data/generated/google/apis/genomics_v1.rb +7 -7
  100. data/generated/google/apis/genomics_v1/classes.rb +2336 -2335
  101. data/generated/google/apis/genomics_v1/representations.rb +387 -387
  102. data/generated/google/apis/genomics_v1/service.rb +1187 -1187
  103. data/generated/google/apis/gmail_v1/classes.rb +3 -0
  104. data/generated/google/apis/iam_v1.rb +1 -1
  105. data/generated/google/apis/iam_v1/classes.rb +123 -117
  106. data/generated/google/apis/iam_v1/representations.rb +33 -33
  107. data/generated/google/apis/iam_v1/service.rb +109 -109
  108. data/generated/google/apis/identitytoolkit_v3/classes.rb +5 -0
  109. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  110. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  111. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  112. data/generated/google/apis/language_v1.rb +36 -0
  113. data/generated/google/apis/language_v1/classes.rb +757 -0
  114. data/generated/google/apis/language_v1/representations.rb +338 -0
  115. data/generated/google/apis/language_v1/service.rb +185 -0
  116. data/generated/google/apis/language_v1beta1/classes.rb +407 -407
  117. data/generated/google/apis/language_v1beta1/representations.rb +103 -103
  118. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  119. data/generated/google/apis/logging_v2.rb +46 -0
  120. data/generated/google/apis/logging_v2/classes.rb +1271 -0
  121. data/generated/google/apis/logging_v2/representations.rb +421 -0
  122. data/generated/google/apis/logging_v2/service.rb +1569 -0
  123. data/generated/google/apis/logging_v2beta1.rb +1 -1
  124. data/generated/google/apis/logging_v2beta1/classes.rb +886 -886
  125. data/generated/google/apis/logging_v2beta1/representations.rb +132 -132
  126. data/generated/google/apis/logging_v2beta1/service.rb +235 -235
  127. data/generated/google/apis/manufacturers_v1/classes.rb +147 -147
  128. data/generated/google/apis/manufacturers_v1/representations.rb +29 -29
  129. data/generated/google/apis/ml_v1.rb +34 -0
  130. data/generated/google/apis/ml_v1/classes.rb +1617 -0
  131. data/generated/google/apis/ml_v1/representations.rb +498 -0
  132. data/generated/google/apis/ml_v1/service.rb +769 -0
  133. data/generated/google/apis/monitoring_v3.rb +4 -4
  134. data/generated/google/apis/monitoring_v3/classes.rb +630 -630
  135. data/generated/google/apis/monitoring_v3/representations.rb +134 -134
  136. data/generated/google/apis/monitoring_v3/service.rb +240 -240
  137. data/generated/google/apis/pagespeedonline_v2/classes.rb +1 -0
  138. data/generated/google/apis/partners_v2.rb +1 -1
  139. data/generated/google/apis/partners_v2/classes.rb +639 -639
  140. data/generated/google/apis/partners_v2/representations.rb +168 -168
  141. data/generated/google/apis/partners_v2/service.rb +381 -381
  142. data/generated/google/apis/people_v1.rb +10 -10
  143. data/generated/google/apis/people_v1/classes.rb +524 -524
  144. data/generated/google/apis/people_v1/representations.rb +143 -143
  145. data/generated/google/apis/people_v1/service.rb +30 -30
  146. data/generated/google/apis/plus_domains_v1.rb +1 -1
  147. data/generated/google/apis/plus_v1.rb +1 -1
  148. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +454 -444
  149. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +90 -90
  150. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +110 -110
  151. data/generated/google/apis/pubsub_v1/classes.rb +175 -173
  152. data/generated/google/apis/pubsub_v1/representations.rb +53 -53
  153. data/generated/google/apis/pubsub_v1/service.rb +210 -210
  154. data/generated/google/apis/replicapool_v1beta2/classes.rb +2 -0
  155. data/generated/google/apis/runtimeconfig_v1.rb +38 -0
  156. data/generated/google/apis/runtimeconfig_v1/classes.rb +252 -0
  157. data/generated/google/apis/runtimeconfig_v1/representations.rb +98 -0
  158. data/generated/google/apis/runtimeconfig_v1/service.rb +176 -0
  159. data/generated/google/apis/script_v1.rb +1 -1
  160. data/generated/google/apis/script_v1/classes.rb +6 -6
  161. data/generated/google/apis/script_v1/representations.rb +1 -1
  162. data/generated/google/apis/searchconsole_v1.rb +31 -0
  163. data/generated/google/apis/searchconsole_v1/classes.rb +205 -0
  164. data/generated/google/apis/searchconsole_v1/representations.rb +129 -0
  165. data/generated/google/apis/searchconsole_v1/service.rb +88 -0
  166. data/generated/google/apis/servicecontrol_v1.rb +38 -0
  167. data/generated/google/apis/servicecontrol_v1/classes.rb +1675 -0
  168. data/generated/google/apis/servicecontrol_v1/representations.rb +601 -0
  169. data/generated/google/apis/servicecontrol_v1/service.rb +337 -0
  170. data/generated/google/apis/servicemanagement_v1.rb +45 -0
  171. data/generated/google/apis/servicemanagement_v1/classes.rb +4934 -0
  172. data/generated/google/apis/servicemanagement_v1/representations.rb +1526 -0
  173. data/generated/google/apis/servicemanagement_v1/service.rb +860 -0
  174. data/generated/google/apis/serviceuser_v1.rb +42 -0
  175. data/generated/google/apis/serviceuser_v1/classes.rb +3746 -0
  176. data/generated/google/apis/serviceuser_v1/representations.rb +1041 -0
  177. data/generated/google/apis/serviceuser_v1/service.rb +214 -0
  178. data/generated/google/apis/sheets_v4.rb +3 -3
  179. data/generated/google/apis/sheets_v4/classes.rb +4390 -4390
  180. data/generated/google/apis/sheets_v4/representations.rb +381 -381
  181. data/generated/google/apis/sheets_v4/service.rb +48 -48
  182. data/generated/google/apis/slides_v1.rb +3 -3
  183. data/generated/google/apis/slides_v1/classes.rb +2860 -2860
  184. data/generated/google/apis/slides_v1/representations.rb +693 -693
  185. data/generated/google/apis/slides_v1/service.rb +30 -30
  186. data/generated/google/apis/sourcerepo_v1.rb +34 -0
  187. data/generated/google/apis/sourcerepo_v1/classes.rb +687 -0
  188. data/generated/google/apis/sourcerepo_v1/representations.rb +285 -0
  189. data/generated/google/apis/sourcerepo_v1/service.rb +291 -0
  190. data/generated/google/apis/spanner_v1.rb +35 -0
  191. data/generated/google/apis/spanner_v1/classes.rb +3294 -0
  192. data/generated/google/apis/spanner_v1/representations.rb +984 -0
  193. data/generated/google/apis/spanner_v1/service.rb +1504 -0
  194. data/generated/google/apis/speech_v1beta1.rb +1 -1
  195. data/generated/google/apis/speech_v1beta1/classes.rb +197 -196
  196. data/generated/google/apis/speech_v1beta1/representations.rb +53 -53
  197. data/generated/google/apis/speech_v1beta1/service.rb +27 -27
  198. data/generated/google/apis/storage_v1.rb +1 -1
  199. data/generated/google/apis/storage_v1/classes.rb +131 -0
  200. data/generated/google/apis/storage_v1/representations.rb +51 -0
  201. data/generated/google/apis/storage_v1/service.rb +182 -0
  202. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  203. data/generated/google/apis/storagetransfer_v1/classes.rb +732 -661
  204. data/generated/google/apis/storagetransfer_v1/representations.rb +132 -132
  205. data/generated/google/apis/storagetransfer_v1/service.rb +174 -197
  206. data/generated/google/apis/surveys_v2.rb +40 -0
  207. data/generated/google/apis/surveys_v2/classes.rb +806 -0
  208. data/generated/google/apis/surveys_v2/representations.rb +347 -0
  209. data/generated/google/apis/surveys_v2/service.rb +477 -0
  210. data/generated/google/apis/tagmanager_v2.rb +52 -0
  211. data/generated/google/apis/tagmanager_v2/classes.rb +2435 -0
  212. data/generated/google/apis/tagmanager_v2/representations.rb +993 -0
  213. data/generated/google/apis/tagmanager_v2/service.rb +2865 -0
  214. data/generated/google/apis/toolresults_v1beta3.rb +34 -0
  215. data/generated/google/apis/toolresults_v1beta3/classes.rb +2160 -0
  216. data/generated/google/apis/toolresults_v1beta3/representations.rb +729 -0
  217. data/generated/google/apis/toolresults_v1beta3/service.rb +1236 -0
  218. data/generated/google/apis/tracing_v1.rb +40 -0
  219. data/generated/google/apis/tracing_v1/classes.rb +664 -0
  220. data/generated/google/apis/tracing_v1/representations.rb +279 -0
  221. data/generated/google/apis/tracing_v1/service.rb +225 -0
  222. data/generated/google/apis/vision_v1.rb +1 -1
  223. data/generated/google/apis/vision_v1/classes.rb +1223 -1222
  224. data/generated/google/apis/vision_v1/representations.rb +234 -234
  225. data/generated/google/apis/vision_v1/service.rb +10 -10
  226. data/generated/google/apis/webfonts_v1.rb +33 -0
  227. data/generated/google/apis/webfonts_v1/classes.rb +113 -0
  228. data/generated/google/apis/webfonts_v1/representations.rb +62 -0
  229. data/generated/google/apis/webfonts_v1/service.rb +102 -0
  230. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  231. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  232. data/generated/google/apis/youtube_partner_v1/classes.rb +31 -0
  233. data/generated/google/apis/youtube_partner_v1/representations.rb +6 -0
  234. data/generated/google/apis/youtube_partner_v1/service.rb +41 -0
  235. data/generated/google/apis/youtube_v3/classes.rb +1 -0
  236. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  237. data/generated/google/apis/youtubereporting_v1/classes.rb +76 -76
  238. data/generated/google/apis/youtubereporting_v1/representations.rb +25 -25
  239. data/generated/google/apis/youtubereporting_v1/service.rb +95 -95
  240. data/lib/google/apis/generator/annotator.rb +5 -4
  241. data/lib/google/apis/generator/templates/_class.tmpl +3 -0
  242. data/lib/google/apis/version.rb +1 -1
  243. data/samples/cli/lib/samples/adsense.rb +99 -0
  244. data/samples/cli/lib/samples/analytics.rb +18 -0
  245. data/samples/cli/lib/samples/gmail.rb +33 -0
  246. data/samples/cli/lib/samples/vision.rb +69 -0
  247. metadata +89 -4
  248. data/sync.rb +0 -71
@@ -33,100 +33,29 @@ module Google
33
33
  #
34
34
  # @see https://cloud.google.com/resource-manager
35
35
  class CloudResourceManagerService < Google::Apis::Core::BaseService
36
- # @return [String]
37
- # API key. Your API key identifies your project and provides you with API access,
38
- # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
- attr_accessor :key
40
-
41
36
  # @return [String]
42
37
  # Available to use for quota purposes for server-side applications. Can be any
43
38
  # arbitrary string assigned to a user, but should not exceed 40 characters.
44
39
  attr_accessor :quota_user
45
40
 
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
46
  def initialize
47
47
  super('https://cloudresourcemanager.googleapis.com/', '')
48
48
  end
49
49
 
50
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
51
- # that `Constraint` on the resource if one does not exist.
52
- # Not supplying an `etag` on the request `Policy` results in an unconditional
53
- # write of the `Policy`.
54
- # @param [String] resource
55
- # Resource name of the resource to attach the `Policy`.
56
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
57
- # @param [String] fields
58
- # Selector specifying which fields to include in a partial response.
59
- # @param [String] quota_user
60
- # Available to use for quota purposes for server-side applications. Can be any
61
- # arbitrary string assigned to a user, but should not exceed 40 characters.
62
- # @param [Google::Apis::RequestOptions] options
63
- # Request-specific options
64
- #
65
- # @yield [result, err] Result & error if block supplied
66
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
67
- # @yieldparam err [StandardError] error object if request failed
68
- #
69
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
70
- #
71
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
- # @raise [Google::Apis::AuthorizationError] Authorization is required
74
- def set_folder_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
75
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options)
76
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
77
- command.request_object = set_org_policy_request_object
78
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
79
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
80
- command.params['resource'] = resource unless resource.nil?
81
- command.query['fields'] = fields unless fields.nil?
82
- command.query['quotaUser'] = quota_user unless quota_user.nil?
83
- execute_or_queue_command(command, &block)
84
- end
85
-
86
- # Gets the effective `Policy` on a resource. This is the result of merging
87
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
88
- # an `etag`set because it is a computed `Policy` across multiple resources.
89
- # @param [String] resource
90
- # The name of the resource to start computing the effective `Policy`.
91
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
92
- # @param [String] fields
93
- # Selector specifying which fields to include in a partial response.
94
- # @param [String] quota_user
95
- # Available to use for quota purposes for server-side applications. Can be any
96
- # arbitrary string assigned to a user, but should not exceed 40 characters.
97
- # @param [Google::Apis::RequestOptions] options
98
- # Request-specific options
99
- #
100
- # @yield [result, err] Result & error if block supplied
101
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
102
- # @yieldparam err [StandardError] error object if request failed
103
- #
104
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
105
- #
106
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
- # @raise [Google::Apis::AuthorizationError] Authorization is required
109
- def get_folder_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
110
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options)
111
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
112
- command.request_object = get_effective_org_policy_request_object
113
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
114
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
115
- command.params['resource'] = resource unless resource.nil?
116
- command.query['fields'] = fields unless fields.nil?
117
- command.query['quotaUser'] = quota_user unless quota_user.nil?
118
- execute_or_queue_command(command, &block)
119
- end
120
-
121
50
  # Clears a `Policy` from a resource.
122
51
  # @param [String] resource
123
52
  # Name of the resource for the `Policy` to clear.
124
53
  # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
125
- # @param [String] fields
126
- # Selector specifying which fields to include in a partial response.
127
54
  # @param [String] quota_user
128
55
  # Available to use for quota purposes for server-side applications. Can be any
129
56
  # arbitrary string assigned to a user, but should not exceed 40 characters.
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
130
59
  # @param [Google::Apis::RequestOptions] options
131
60
  # Request-specific options
132
61
  #
@@ -139,15 +68,15 @@ module Google
139
68
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
140
69
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
141
70
  # @raise [Google::Apis::AuthorizationError] Authorization is required
142
- def clear_folder_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
71
+ def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
143
72
  command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
144
73
  command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
145
74
  command.request_object = clear_org_policy_request_object
146
75
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
147
76
  command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
148
77
  command.params['resource'] = resource unless resource.nil?
149
- command.query['fields'] = fields unless fields.nil?
150
78
  command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ command.query['fields'] = fields unless fields.nil?
151
80
  execute_or_queue_command(command, &block)
152
81
  end
153
82
 
@@ -158,11 +87,11 @@ module Google
158
87
  # @param [String] resource
159
88
  # Resource name of the resource to attach the `Policy`.
160
89
  # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
161
- # @param [String] fields
162
- # Selector specifying which fields to include in a partial response.
163
90
  # @param [String] quota_user
164
91
  # Available to use for quota purposes for server-side applications. Can be any
165
92
  # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
166
95
  # @param [Google::Apis::RequestOptions] options
167
96
  # Request-specific options
168
97
  #
@@ -175,48 +104,51 @@ module Google
175
104
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
176
105
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
177
106
  # @raise [Google::Apis::AuthorizationError] Authorization is required
178
- def set_folder_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ def set_organization_org_policy(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
179
108
  command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
180
109
  command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
181
110
  command.request_object = set_org_policy_request_object
182
111
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
183
112
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
184
113
  command.params['resource'] = resource unless resource.nil?
185
- command.query['fields'] = fields unless fields.nil?
186
114
  command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ command.query['fields'] = fields unless fields.nil?
187
116
  execute_or_queue_command(command, &block)
188
117
  end
189
118
 
190
- # Clears a `Policy` from a resource.
119
+ # Sets the access control policy on an Organization resource. Replaces any
120
+ # existing policy. The `resource` field should be the organization's resource
121
+ # name, e.g. "organizations/123".
191
122
  # @param [String] resource
192
- # Name of the resource for the `Policy` to clear.
193
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
194
- # @param [String] fields
195
- # Selector specifying which fields to include in a partial response.
123
+ # REQUIRED: The resource for which the policy is being specified.
124
+ # See the operation documentation for the appropriate value for this field.
125
+ # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
196
126
  # @param [String] quota_user
197
127
  # Available to use for quota purposes for server-side applications. Can be any
198
128
  # arbitrary string assigned to a user, but should not exceed 40 characters.
129
+ # @param [String] fields
130
+ # Selector specifying which fields to include in a partial response.
199
131
  # @param [Google::Apis::RequestOptions] options
200
132
  # Request-specific options
201
133
  #
202
134
  # @yield [result, err] Result & error if block supplied
203
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
135
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
204
136
  # @yieldparam err [StandardError] error object if request failed
205
137
  #
206
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
138
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
207
139
  #
208
140
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
209
141
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
210
142
  # @raise [Google::Apis::AuthorizationError] Authorization is required
211
- def clear_folder_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
212
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options)
213
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
214
- command.request_object = clear_org_policy_request_object
215
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
216
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
143
+ def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
144
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
145
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
146
+ command.request_object = set_iam_policy_request_object
147
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
148
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
217
149
  command.params['resource'] = resource unless resource.nil?
218
- command.query['fields'] = fields unless fields.nil?
219
150
  command.query['quotaUser'] = quota_user unless quota_user.nil?
151
+ command.query['fields'] = fields unless fields.nil?
220
152
  execute_or_queue_command(command, &block)
221
153
  end
222
154
 
@@ -224,11 +156,11 @@ module Google
224
156
  # @param [String] resource
225
157
  # Name of the resource to list Policies for.
226
158
  # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
227
- # @param [String] fields
228
- # Selector specifying which fields to include in a partial response.
229
159
  # @param [String] quota_user
230
160
  # Available to use for quota purposes for server-side applications. Can be any
231
161
  # arbitrary string assigned to a user, but should not exceed 40 characters.
162
+ # @param [String] fields
163
+ # Selector specifying which fields to include in a partial response.
232
164
  # @param [Google::Apis::RequestOptions] options
233
165
  # Request-specific options
234
166
  #
@@ -241,15 +173,15 @@ module Google
241
173
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
174
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
175
  # @raise [Google::Apis::AuthorizationError] Authorization is required
244
- def list_folder_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
176
+ def list_organization_org_policies(resource, list_org_policies_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
245
177
  command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
246
178
  command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
247
179
  command.request_object = list_org_policies_request_object
248
180
  command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
249
181
  command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
250
182
  command.params['resource'] = resource unless resource.nil?
251
- command.query['fields'] = fields unless fields.nil?
252
183
  command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ command.query['fields'] = fields unless fields.nil?
253
185
  execute_or_queue_command(command, &block)
254
186
  end
255
187
 
@@ -257,11 +189,11 @@ module Google
257
189
  # @param [String] resource
258
190
  # Name of the resource to list `Constraints` for.
259
191
  # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
260
- # @param [String] fields
261
- # Selector specifying which fields to include in a partial response.
262
192
  # @param [String] quota_user
263
193
  # Available to use for quota purposes for server-side applications. Can be any
264
194
  # arbitrary string assigned to a user, but should not exceed 40 characters.
195
+ # @param [String] fields
196
+ # Selector specifying which fields to include in a partial response.
265
197
  # @param [Google::Apis::RequestOptions] options
266
198
  # Request-specific options
267
199
  #
@@ -274,87 +206,84 @@ module Google
274
206
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
275
207
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
276
208
  # @raise [Google::Apis::AuthorizationError] Authorization is required
277
- def list_folder_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
209
+ def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
278
210
  command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
279
211
  command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
280
212
  command.request_object = list_available_org_policy_constraints_request_object
281
213
  command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
282
214
  command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
283
215
  command.params['resource'] = resource unless resource.nil?
284
- command.query['fields'] = fields unless fields.nil?
285
216
  command.query['quotaUser'] = quota_user unless quota_user.nil?
217
+ command.query['fields'] = fields unless fields.nil?
286
218
  execute_or_queue_command(command, &block)
287
219
  end
288
220
 
289
- # Gets a `Policy` on a resource.
290
- # If no `Policy` is set on the resource, a `Policy` is returned with default
291
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
292
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
293
- # `Policy` during read-modify-write.
221
+ # Gets the access control policy for an Organization resource. May be empty
222
+ # if no such policy or resource exists. The `resource` field should be the
223
+ # organization's resource name, e.g. "organizations/123".
294
224
  # @param [String] resource
295
- # Name of the resource the `Policy` is set on.
296
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
297
- # @param [String] fields
298
- # Selector specifying which fields to include in a partial response.
225
+ # REQUIRED: The resource for which the policy is being requested.
226
+ # See the operation documentation for the appropriate value for this field.
227
+ # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
299
228
  # @param [String] quota_user
300
229
  # Available to use for quota purposes for server-side applications. Can be any
301
230
  # arbitrary string assigned to a user, but should not exceed 40 characters.
231
+ # @param [String] fields
232
+ # Selector specifying which fields to include in a partial response.
302
233
  # @param [Google::Apis::RequestOptions] options
303
234
  # Request-specific options
304
235
  #
305
236
  # @yield [result, err] Result & error if block supplied
306
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
237
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
307
238
  # @yieldparam err [StandardError] error object if request failed
308
239
  #
309
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
240
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
310
241
  #
311
242
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
312
243
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
313
244
  # @raise [Google::Apis::AuthorizationError] Authorization is required
314
- def get_folder_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
315
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
316
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
317
- command.request_object = get_org_policy_request_object
318
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
319
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
245
+ def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
246
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
247
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
248
+ command.request_object = get_iam_policy_request_object
249
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
250
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
320
251
  command.params['resource'] = resource unless resource.nil?
321
- command.query['fields'] = fields unless fields.nil?
322
252
  command.query['quotaUser'] = quota_user unless quota_user.nil?
253
+ command.query['fields'] = fields unless fields.nil?
323
254
  execute_or_queue_command(command, &block)
324
255
  end
325
256
 
326
- # Gets the effective `Policy` on a resource. This is the result of merging
327
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
328
- # an `etag`set because it is a computed `Policy` across multiple resources.
329
- # @param [String] resource
330
- # The name of the resource to start computing the effective `Policy`.
331
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
332
- # @param [String] fields
333
- # Selector specifying which fields to include in a partial response.
257
+ # Searches Organization resources that are visible to the user and satisfy
258
+ # the specified filter. This method returns Organizations in an unspecified
259
+ # order. New Organizations do not necessarily appear at the end of the
260
+ # results.
261
+ # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
334
262
  # @param [String] quota_user
335
263
  # Available to use for quota purposes for server-side applications. Can be any
336
264
  # arbitrary string assigned to a user, but should not exceed 40 characters.
265
+ # @param [String] fields
266
+ # Selector specifying which fields to include in a partial response.
337
267
  # @param [Google::Apis::RequestOptions] options
338
268
  # Request-specific options
339
269
  #
340
270
  # @yield [result, err] Result & error if block supplied
341
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
271
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
342
272
  # @yieldparam err [StandardError] error object if request failed
343
273
  #
344
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
274
+ # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
345
275
  #
346
276
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
347
277
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
348
278
  # @raise [Google::Apis::AuthorizationError] Authorization is required
349
- def get_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
350
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
351
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
352
- command.request_object = get_effective_org_policy_request_object
353
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
354
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
355
- command.params['resource'] = resource unless resource.nil?
356
- command.query['fields'] = fields unless fields.nil?
279
+ def search_organizations(search_organizations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
280
+ command = make_simple_command(:post, 'v1/organizations:search', options)
281
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
282
+ command.request_object = search_organizations_request_object
283
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
284
+ command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
357
285
  command.query['quotaUser'] = quota_user unless quota_user.nil?
286
+ command.query['fields'] = fields unless fields.nil?
358
287
  execute_or_queue_command(command, &block)
359
288
  end
360
289
 
@@ -366,11 +295,11 @@ module Google
366
295
  # @param [String] resource
367
296
  # Name of the resource the `Policy` is set on.
368
297
  # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
369
- # @param [String] fields
370
- # Selector specifying which fields to include in a partial response.
371
298
  # @param [String] quota_user
372
299
  # Available to use for quota purposes for server-side applications. Can be any
373
300
  # arbitrary string assigned to a user, but should not exceed 40 characters.
301
+ # @param [String] fields
302
+ # Selector specifying which fields to include in a partial response.
374
303
  # @param [Google::Apis::RequestOptions] options
375
304
  # Request-specific options
376
305
  #
@@ -383,267 +312,288 @@ module Google
383
312
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
384
313
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
385
314
  # @raise [Google::Apis::AuthorizationError] Authorization is required
386
- def get_folder_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
387
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options)
315
+ def get_organization_org_policy(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
316
+ command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
388
317
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
389
318
  command.request_object = get_org_policy_request_object
390
319
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
391
320
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
392
321
  command.params['resource'] = resource unless resource.nil?
393
- command.query['fields'] = fields unless fields.nil?
394
322
  command.query['quotaUser'] = quota_user unless quota_user.nil?
323
+ command.query['fields'] = fields unless fields.nil?
395
324
  execute_or_queue_command(command, &block)
396
325
  end
397
326
 
398
- # Lists `Constraints` that could be applied on the specified resource.
327
+ # Gets the effective `Policy` on a resource. This is the result of merging
328
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
329
+ # an `etag`set because it is a computed `Policy` across multiple resources.
399
330
  # @param [String] resource
400
- # Name of the resource to list `Constraints` for.
401
- # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
402
- # @param [String] fields
403
- # Selector specifying which fields to include in a partial response.
331
+ # The name of the resource to start computing the effective `Policy`.
332
+ # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
404
333
  # @param [String] quota_user
405
334
  # Available to use for quota purposes for server-side applications. Can be any
406
335
  # arbitrary string assigned to a user, but should not exceed 40 characters.
336
+ # @param [String] fields
337
+ # Selector specifying which fields to include in a partial response.
407
338
  # @param [Google::Apis::RequestOptions] options
408
339
  # Request-specific options
409
340
  #
410
341
  # @yield [result, err] Result & error if block supplied
411
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
342
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
412
343
  # @yieldparam err [StandardError] error object if request failed
413
344
  #
414
- # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
345
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
415
346
  #
416
347
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
417
348
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
418
349
  # @raise [Google::Apis::AuthorizationError] Authorization is required
419
- def list_project_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
420
- command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
421
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
422
- command.request_object = list_available_org_policy_constraints_request_object
423
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
424
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
350
+ def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
351
+ command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
352
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
353
+ command.request_object = get_effective_org_policy_request_object
354
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
355
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
425
356
  command.params['resource'] = resource unless resource.nil?
426
- command.query['fields'] = fields unless fields.nil?
427
357
  command.query['quotaUser'] = quota_user unless quota_user.nil?
358
+ command.query['fields'] = fields unless fields.nil?
428
359
  execute_or_queue_command(command, &block)
429
360
  end
430
361
 
431
- # Returns the IAM access control policy for the specified Project.
432
- # Permission is denied if the policy or the resource does not exist.
433
- # @param [String] resource
434
- # REQUIRED: The resource for which the policy is being requested.
435
- # See the operation documentation for the appropriate value for this field.
436
- # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
437
- # @param [String] fields
438
- # Selector specifying which fields to include in a partial response.
362
+ # Fetches an Organization resource identified by the specified resource name.
363
+ # @param [String] name
364
+ # The resource name of the Organization to fetch, e.g. "organizations/1234".
439
365
  # @param [String] quota_user
440
366
  # Available to use for quota purposes for server-side applications. Can be any
441
367
  # arbitrary string assigned to a user, but should not exceed 40 characters.
368
+ # @param [String] fields
369
+ # Selector specifying which fields to include in a partial response.
442
370
  # @param [Google::Apis::RequestOptions] options
443
371
  # Request-specific options
444
372
  #
445
373
  # @yield [result, err] Result & error if block supplied
446
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
374
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
447
375
  # @yieldparam err [StandardError] error object if request failed
448
376
  #
449
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
377
+ # @return [Google::Apis::CloudresourcemanagerV1::Organization]
450
378
  #
451
379
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
452
380
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
453
381
  # @raise [Google::Apis::AuthorizationError] Authorization is required
454
- def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
455
- command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
456
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
457
- command.request_object = get_iam_policy_request_object
458
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
459
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
460
- command.params['resource'] = resource unless resource.nil?
461
- command.query['fields'] = fields unless fields.nil?
462
- command.query['quotaUser'] = quota_user unless quota_user.nil?
463
- execute_or_queue_command(command, &block)
464
- end
382
+ def get_organization(name, quota_user: nil, fields: nil, options: nil, &block)
383
+ command = make_simple_command(:get, 'v1/{+name}', options)
384
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
385
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
386
+ command.params['name'] = name unless name.nil?
387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
388
+ command.query['fields'] = fields unless fields.nil?
389
+ execute_or_queue_command(command, &block)
390
+ end
465
391
 
466
- # Gets a `Policy` on a resource.
467
- # If no `Policy` is set on the resource, a `Policy` is returned with default
468
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
469
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
470
- # `Policy` during read-modify-write.
392
+ # Returns permissions that a caller has on the specified Organization.
393
+ # The `resource` field should be the organization's resource name,
394
+ # e.g. "organizations/123".
471
395
  # @param [String] resource
472
- # Name of the resource the `Policy` is set on.
473
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
474
- # @param [String] fields
475
- # Selector specifying which fields to include in a partial response.
396
+ # REQUIRED: The resource for which the policy detail is being requested.
397
+ # See the operation documentation for the appropriate value for this field.
398
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
476
399
  # @param [String] quota_user
477
400
  # Available to use for quota purposes for server-side applications. Can be any
478
401
  # arbitrary string assigned to a user, but should not exceed 40 characters.
402
+ # @param [String] fields
403
+ # Selector specifying which fields to include in a partial response.
479
404
  # @param [Google::Apis::RequestOptions] options
480
405
  # Request-specific options
481
406
  #
482
407
  # @yield [result, err] Result & error if block supplied
483
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
408
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
484
409
  # @yieldparam err [StandardError] error object if request failed
485
410
  #
486
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
411
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
487
412
  #
488
413
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
489
414
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
490
415
  # @raise [Google::Apis::AuthorizationError] Authorization is required
491
- def get_project_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
492
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
493
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
494
- command.request_object = get_org_policy_request_object
495
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
496
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
416
+ def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
417
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
418
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
419
+ command.request_object = test_iam_permissions_request_object
420
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
421
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
497
422
  command.params['resource'] = resource unless resource.nil?
498
- command.query['fields'] = fields unless fields.nil?
499
423
  command.query['quotaUser'] = quota_user unless quota_user.nil?
424
+ command.query['fields'] = fields unless fields.nil?
500
425
  execute_or_queue_command(command, &block)
501
426
  end
502
427
 
503
- # Gets the effective `Policy` on a resource. This is the result of merging
504
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
505
- # an `etag`set because it is a computed `Policy` across multiple resources.
506
- # @param [String] resource
507
- # The name of the resource to start computing the effective `Policy`.
508
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
509
- # @param [String] fields
510
- # Selector specifying which fields to include in a partial response.
428
+ # Delete a Lien by `name`.
429
+ # Callers of this method will require permission on the `parent` resource.
430
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
431
+ # `resourcemanager.projects.updateLiens`.
432
+ # @param [String] name
433
+ # The name/identifier of the Lien to delete.
511
434
  # @param [String] quota_user
512
435
  # Available to use for quota purposes for server-side applications. Can be any
513
436
  # arbitrary string assigned to a user, but should not exceed 40 characters.
437
+ # @param [String] fields
438
+ # Selector specifying which fields to include in a partial response.
514
439
  # @param [Google::Apis::RequestOptions] options
515
440
  # Request-specific options
516
441
  #
517
442
  # @yield [result, err] Result & error if block supplied
518
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
443
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
519
444
  # @yieldparam err [StandardError] error object if request failed
520
445
  #
521
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
446
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
522
447
  #
523
448
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
524
449
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
525
450
  # @raise [Google::Apis::AuthorizationError] Authorization is required
526
- def get_project_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
527
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
528
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
529
- command.request_object = get_effective_org_policy_request_object
530
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
531
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
532
- command.params['resource'] = resource unless resource.nil?
533
- command.query['fields'] = fields unless fields.nil?
451
+ def delete_lien(name, quota_user: nil, fields: nil, options: nil, &block)
452
+ command = make_simple_command(:delete, 'v1/{+name}', options)
453
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
454
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
455
+ command.params['name'] = name unless name.nil?
534
456
  command.query['quotaUser'] = quota_user unless quota_user.nil?
457
+ command.query['fields'] = fields unless fields.nil?
535
458
  execute_or_queue_command(command, &block)
536
459
  end
537
460
 
538
- # Gets a `Policy` on a resource.
539
- # If no `Policy` is set on the resource, a `Policy` is returned with default
540
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
541
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
542
- # `Policy` during read-modify-write.
543
- # @param [String] resource
544
- # Name of the resource the `Policy` is set on.
545
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
546
- # @param [String] fields
547
- # Selector specifying which fields to include in a partial response.
461
+ # List all Liens applied to the `parent` resource.
462
+ # Callers of this method will require permission on the `parent` resource.
463
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
464
+ # `resourcemanager.projects.get`.
465
+ # @param [String] parent
466
+ # The name of the resource to list all attached Liens.
467
+ # For example, `projects/1234`.
468
+ # @param [String] page_token
469
+ # The `next_page_token` value returned from a previous List request, if any.
470
+ # @param [Fixnum] page_size
471
+ # The maximum number of items to return. This is a suggestion for the server.
548
472
  # @param [String] quota_user
549
473
  # Available to use for quota purposes for server-side applications. Can be any
550
474
  # arbitrary string assigned to a user, but should not exceed 40 characters.
475
+ # @param [String] fields
476
+ # Selector specifying which fields to include in a partial response.
551
477
  # @param [Google::Apis::RequestOptions] options
552
478
  # Request-specific options
553
479
  #
554
480
  # @yield [result, err] Result & error if block supplied
555
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
481
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] parsed result object
556
482
  # @yieldparam err [StandardError] error object if request failed
557
483
  #
558
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
484
+ # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
559
485
  #
560
486
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
561
487
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
562
488
  # @raise [Google::Apis::AuthorizationError] Authorization is required
563
- def get_project_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
564
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options)
565
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
566
- command.request_object = get_org_policy_request_object
567
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
568
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
569
- command.params['resource'] = resource unless resource.nil?
570
- command.query['fields'] = fields unless fields.nil?
489
+ def list_liens(parent: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
490
+ command = make_simple_command(:get, 'v1/liens', options)
491
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
492
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
493
+ command.query['parent'] = parent unless parent.nil?
494
+ command.query['pageToken'] = page_token unless page_token.nil?
495
+ command.query['pageSize'] = page_size unless page_size.nil?
571
496
  command.query['quotaUser'] = quota_user unless quota_user.nil?
497
+ command.query['fields'] = fields unless fields.nil?
572
498
  execute_or_queue_command(command, &block)
573
499
  end
574
500
 
575
- # Restores the Project identified by the specified
576
- # `project_id` (for example, `my-project-123`).
577
- # You can only use this method for a Project that has a lifecycle state of
578
- # DELETE_REQUESTED.
579
- # After deletion starts, the Project cannot be restored.
580
- # The caller must have modify permissions for this Project.
581
- # @param [String] project_id
582
- # The project ID (for example, `foo-bar-123`).
583
- # Required.
584
- # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
585
- # @param [String] fields
586
- # Selector specifying which fields to include in a partial response.
501
+ # Create a Lien which applies to the resource denoted by the `parent` field.
502
+ # Callers of this method will require permission on the `parent` resource.
503
+ # For example, applying to `projects/1234` requires permission
504
+ # `resourcemanager.projects.updateLiens`.
505
+ # NOTE: Some resources may limit the number of Liens which may be applied.
506
+ # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_object
587
507
  # @param [String] quota_user
588
508
  # Available to use for quota purposes for server-side applications. Can be any
589
509
  # arbitrary string assigned to a user, but should not exceed 40 characters.
510
+ # @param [String] fields
511
+ # Selector specifying which fields to include in a partial response.
590
512
  # @param [Google::Apis::RequestOptions] options
591
513
  # Request-specific options
592
514
  #
593
515
  # @yield [result, err] Result & error if block supplied
594
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
516
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Lien] parsed result object
595
517
  # @yieldparam err [StandardError] error object if request failed
596
518
  #
597
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
519
+ # @return [Google::Apis::CloudresourcemanagerV1::Lien]
598
520
  #
599
521
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
522
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
523
  # @raise [Google::Apis::AuthorizationError] Authorization is required
602
- def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
603
- command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
604
- command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
605
- command.request_object = undelete_project_request_object
606
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
607
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
608
- command.params['projectId'] = project_id unless project_id.nil?
609
- command.query['fields'] = fields unless fields.nil?
524
+ def create_lien(lien_object = nil, quota_user: nil, fields: nil, options: nil, &block)
525
+ command = make_simple_command(:post, 'v1/liens', options)
526
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
527
+ command.request_object = lien_object
528
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
529
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
610
530
  command.query['quotaUser'] = quota_user unless quota_user.nil?
531
+ command.query['fields'] = fields unless fields.nil?
611
532
  execute_or_queue_command(command, &block)
612
533
  end
613
534
 
614
- # Updates the attributes of the Project identified by the specified
615
- # `project_id` (for example, `my-project-123`).
616
- # The caller must have modify permissions for this Project.
617
- # @param [String] project_id
618
- # The project ID (for example, `my-project-123`).
619
- # Required.
620
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
535
+ # Gets the latest state of a long-running operation. Clients can use this
536
+ # method to poll the operation result at intervals as recommended by the API
537
+ # service.
538
+ # @param [String] name
539
+ # The name of the operation resource.
540
+ # @param [String] quota_user
541
+ # Available to use for quota purposes for server-side applications. Can be any
542
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
621
543
  # @param [String] fields
622
544
  # Selector specifying which fields to include in a partial response.
545
+ # @param [Google::Apis::RequestOptions] options
546
+ # Request-specific options
547
+ #
548
+ # @yield [result, err] Result & error if block supplied
549
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
550
+ # @yieldparam err [StandardError] error object if request failed
551
+ #
552
+ # @return [Google::Apis::CloudresourcemanagerV1::Operation]
553
+ #
554
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
555
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
556
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
557
+ def get_operation(name, quota_user: nil, fields: nil, options: nil, &block)
558
+ command = make_simple_command(:get, 'v1/{+name}', options)
559
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
560
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
561
+ command.params['name'] = name unless name.nil?
562
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
563
+ command.query['fields'] = fields unless fields.nil?
564
+ execute_or_queue_command(command, &block)
565
+ end
566
+
567
+ # Clears a `Policy` from a resource.
568
+ # @param [String] resource
569
+ # Name of the resource for the `Policy` to clear.
570
+ # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
623
571
  # @param [String] quota_user
624
572
  # Available to use for quota purposes for server-side applications. Can be any
625
573
  # arbitrary string assigned to a user, but should not exceed 40 characters.
574
+ # @param [String] fields
575
+ # Selector specifying which fields to include in a partial response.
626
576
  # @param [Google::Apis::RequestOptions] options
627
577
  # Request-specific options
628
578
  #
629
579
  # @yield [result, err] Result & error if block supplied
630
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
580
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
631
581
  # @yieldparam err [StandardError] error object if request failed
632
582
  #
633
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
583
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
634
584
  #
635
585
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
636
586
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
637
587
  # @raise [Google::Apis::AuthorizationError] Authorization is required
638
- def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
639
- command = make_simple_command(:put, 'v1/projects/{projectId}', options)
640
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
641
- command.request_object = project_object
642
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
643
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
644
- command.params['projectId'] = project_id unless project_id.nil?
645
- command.query['fields'] = fields unless fields.nil?
588
+ def clear_folder_org_policy(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
589
+ command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
590
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
591
+ command.request_object = clear_org_policy_request_object
592
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
593
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
594
+ command.params['resource'] = resource unless resource.nil?
646
595
  command.query['quotaUser'] = quota_user unless quota_user.nil?
596
+ command.query['fields'] = fields unless fields.nil?
647
597
  execute_or_queue_command(command, &block)
648
598
  end
649
599
 
@@ -654,11 +604,11 @@ module Google
654
604
  # @param [String] resource
655
605
  # Resource name of the resource to attach the `Policy`.
656
606
  # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
657
- # @param [String] fields
658
- # Selector specifying which fields to include in a partial response.
659
607
  # @param [String] quota_user
660
608
  # Available to use for quota purposes for server-side applications. Can be any
661
609
  # arbitrary string assigned to a user, but should not exceed 40 characters.
610
+ # @param [String] fields
611
+ # Selector specifying which fields to include in a partial response.
662
612
  # @param [Google::Apis::RequestOptions] options
663
613
  # Request-specific options
664
614
  #
@@ -671,245 +621,153 @@ module Google
671
621
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
672
622
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
673
623
  # @raise [Google::Apis::AuthorizationError] Authorization is required
674
- def set_project_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
675
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options)
624
+ def set_folder_org_policy(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
625
+ command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
676
626
  command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
677
627
  command.request_object = set_org_policy_request_object
678
628
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
679
629
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
680
630
  command.params['resource'] = resource unless resource.nil?
681
- command.query['fields'] = fields unless fields.nil?
682
631
  command.query['quotaUser'] = quota_user unless quota_user.nil?
632
+ command.query['fields'] = fields unless fields.nil?
683
633
  execute_or_queue_command(command, &block)
684
634
  end
685
635
 
686
- # Lists Projects that are visible to the user and satisfy the
687
- # specified filter. This method returns Projects in an unspecified order.
688
- # New Projects do not necessarily appear at the end of the list.
689
- # @param [String] page_token
690
- # A pagination token returned from a previous call to ListProjects
691
- # that indicates from where listing should continue.
692
- # Optional.
693
- # @param [Fixnum] page_size
694
- # The maximum number of Projects to return in the response.
695
- # The server can return fewer Projects than requested.
696
- # If unspecified, server picks an appropriate default.
697
- # Optional.
698
- # @param [String] filter
699
- # An expression for filtering the results of the request. Filter rules are
700
- # case insensitive. The fields eligible for filtering are:
701
- # + `name`
702
- # + `id`
703
- # + <code>labels.<em>key</em></code> where *key* is the name of a label
704
- # Some examples of using labels as filters:
705
- # |Filter|Description|
706
- # |------|-----------|
707
- # |name:*|The project has a name.|
708
- # |name:Howl|The project's name is `Howl` or `howl`.|
709
- # |name:HOWL|Equivalent to above.|
710
- # |NAME:howl|Equivalent to above.|
711
- # |labels.color:*|The project has the label `color`.|
712
- # |labels.color:red|The project's label `color` has the value `red`.|
713
- # |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
714
- # value `red` and its label `size` has the value `big`.
715
- # Optional.
716
- # @param [String] fields
717
- # Selector specifying which fields to include in a partial response.
636
+ # Lists `Constraints` that could be applied on the specified resource.
637
+ # @param [String] resource
638
+ # Name of the resource to list `Constraints` for.
639
+ # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
718
640
  # @param [String] quota_user
719
641
  # Available to use for quota purposes for server-side applications. Can be any
720
642
  # arbitrary string assigned to a user, but should not exceed 40 characters.
643
+ # @param [String] fields
644
+ # Selector specifying which fields to include in a partial response.
721
645
  # @param [Google::Apis::RequestOptions] options
722
646
  # Request-specific options
723
647
  #
724
648
  # @yield [result, err] Result & error if block supplied
725
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
649
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
726
650
  # @yieldparam err [StandardError] error object if request failed
727
651
  #
728
- # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
652
+ # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
729
653
  #
730
654
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
731
655
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
732
656
  # @raise [Google::Apis::AuthorizationError] Authorization is required
733
- def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
734
- command = make_simple_command(:get, 'v1/projects', options)
735
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
736
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
737
- command.query['pageToken'] = page_token unless page_token.nil?
738
- command.query['pageSize'] = page_size unless page_size.nil?
739
- command.query['filter'] = filter unless filter.nil?
740
- command.query['fields'] = fields unless fields.nil?
657
+ def list_folder_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
658
+ command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
659
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
660
+ command.request_object = list_available_org_policy_constraints_request_object
661
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
662
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
663
+ command.params['resource'] = resource unless resource.nil?
741
664
  command.query['quotaUser'] = quota_user unless quota_user.nil?
665
+ command.query['fields'] = fields unless fields.nil?
742
666
  execute_or_queue_command(command, &block)
743
667
  end
744
668
 
745
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
746
- # that `Constraint` on the resource if one does not exist.
747
- # Not supplying an `etag` on the request `Policy` results in an unconditional
748
- # write of the `Policy`.
669
+ # Lists all the `Policies` set for a particular resource.
749
670
  # @param [String] resource
750
- # Resource name of the resource to attach the `Policy`.
751
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
752
- # @param [String] fields
753
- # Selector specifying which fields to include in a partial response.
671
+ # Name of the resource to list Policies for.
672
+ # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
754
673
  # @param [String] quota_user
755
674
  # Available to use for quota purposes for server-side applications. Can be any
756
675
  # arbitrary string assigned to a user, but should not exceed 40 characters.
676
+ # @param [String] fields
677
+ # Selector specifying which fields to include in a partial response.
757
678
  # @param [Google::Apis::RequestOptions] options
758
679
  # Request-specific options
759
680
  #
760
681
  # @yield [result, err] Result & error if block supplied
761
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
682
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
762
683
  # @yieldparam err [StandardError] error object if request failed
763
684
  #
764
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
685
+ # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
765
686
  #
766
687
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
767
688
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
768
689
  # @raise [Google::Apis::AuthorizationError] Authorization is required
769
- def set_project_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
770
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
771
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
772
- command.request_object = set_org_policy_request_object
773
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
774
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
690
+ def list_folder_org_policies(resource, list_org_policies_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
691
+ command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
692
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
693
+ command.request_object = list_org_policies_request_object
694
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
695
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
775
696
  command.params['resource'] = resource unless resource.nil?
776
- command.query['fields'] = fields unless fields.nil?
777
697
  command.query['quotaUser'] = quota_user unless quota_user.nil?
698
+ command.query['fields'] = fields unless fields.nil?
778
699
  execute_or_queue_command(command, &block)
779
700
  end
780
701
 
781
- # Clears a `Policy` from a resource.
702
+ # Gets a `Policy` on a resource.
703
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
704
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
705
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
706
+ # `Policy` during read-modify-write.
782
707
  # @param [String] resource
783
- # Name of the resource for the `Policy` to clear.
784
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
785
- # @param [String] fields
786
- # Selector specifying which fields to include in a partial response.
708
+ # Name of the resource the `Policy` is set on.
709
+ # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
787
710
  # @param [String] quota_user
788
711
  # Available to use for quota purposes for server-side applications. Can be any
789
712
  # arbitrary string assigned to a user, but should not exceed 40 characters.
790
- # @param [Google::Apis::RequestOptions] options
791
- # Request-specific options
792
- #
793
- # @yield [result, err] Result & error if block supplied
794
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
795
- # @yieldparam err [StandardError] error object if request failed
796
- #
797
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
798
- #
799
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
800
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
801
- # @raise [Google::Apis::AuthorizationError] Authorization is required
802
- def clear_project_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
803
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options)
804
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
805
- command.request_object = clear_org_policy_request_object
806
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
807
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
808
- command.params['resource'] = resource unless resource.nil?
809
- command.query['fields'] = fields unless fields.nil?
810
- command.query['quotaUser'] = quota_user unless quota_user.nil?
811
- execute_or_queue_command(command, &block)
812
- end
813
-
814
- # Request that a new Project be created. The result is an Operation which
815
- # can be used to track the creation process. It is automatically deleted
816
- # after a few hours, so there is no need to call DeleteOperation.
817
- # Our SLO permits Project creation to take up to 30 seconds at the 90th
818
- # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
819
- # latency. 95th percentile latency is around 11 seconds. We recommend
820
- # polling at the 5th second with an exponential backoff.
821
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
822
713
  # @param [String] fields
823
714
  # Selector specifying which fields to include in a partial response.
824
- # @param [String] quota_user
825
- # Available to use for quota purposes for server-side applications. Can be any
826
- # arbitrary string assigned to a user, but should not exceed 40 characters.
827
715
  # @param [Google::Apis::RequestOptions] options
828
716
  # Request-specific options
829
717
  #
830
718
  # @yield [result, err] Result & error if block supplied
831
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
719
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
832
720
  # @yieldparam err [StandardError] error object if request failed
833
721
  #
834
- # @return [Google::Apis::CloudresourcemanagerV1::Operation]
722
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
835
723
  #
836
724
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
837
725
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
838
726
  # @raise [Google::Apis::AuthorizationError] Authorization is required
839
- def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
840
- command = make_simple_command(:post, 'v1/projects', options)
841
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
842
- command.request_object = project_object
843
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
844
- command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
845
- command.query['fields'] = fields unless fields.nil?
727
+ def get_folder_org_policy(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
728
+ command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
729
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
730
+ command.request_object = get_org_policy_request_object
731
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
732
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
733
+ command.params['resource'] = resource unless resource.nil?
846
734
  command.query['quotaUser'] = quota_user unless quota_user.nil?
735
+ command.query['fields'] = fields unless fields.nil?
847
736
  execute_or_queue_command(command, &block)
848
737
  end
849
738
 
850
- # Lists all the `Policies` set for a particular resource.
739
+ # Gets the effective `Policy` on a resource. This is the result of merging
740
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
741
+ # an `etag`set because it is a computed `Policy` across multiple resources.
851
742
  # @param [String] resource
852
- # Name of the resource to list Policies for.
853
- # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
854
- # @param [String] fields
855
- # Selector specifying which fields to include in a partial response.
743
+ # The name of the resource to start computing the effective `Policy`.
744
+ # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
856
745
  # @param [String] quota_user
857
746
  # Available to use for quota purposes for server-side applications. Can be any
858
747
  # arbitrary string assigned to a user, but should not exceed 40 characters.
859
- # @param [Google::Apis::RequestOptions] options
860
- # Request-specific options
861
- #
862
- # @yield [result, err] Result & error if block supplied
863
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
864
- # @yieldparam err [StandardError] error object if request failed
865
- #
866
- # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
867
- #
868
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
869
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
870
- # @raise [Google::Apis::AuthorizationError] Authorization is required
871
- def list_project_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
872
- command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
873
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
874
- command.request_object = list_org_policies_request_object
875
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
876
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
877
- command.params['resource'] = resource unless resource.nil?
878
- command.query['fields'] = fields unless fields.nil?
879
- command.query['quotaUser'] = quota_user unless quota_user.nil?
880
- execute_or_queue_command(command, &block)
881
- end
882
-
883
- # Retrieves the Project identified by the specified
884
- # `project_id` (for example, `my-project-123`).
885
- # The caller must have read permissions for this Project.
886
- # @param [String] project_id
887
- # The Project ID (for example, `my-project-123`).
888
- # Required.
889
748
  # @param [String] fields
890
749
  # Selector specifying which fields to include in a partial response.
891
- # @param [String] quota_user
892
- # Available to use for quota purposes for server-side applications. Can be any
893
- # arbitrary string assigned to a user, but should not exceed 40 characters.
894
750
  # @param [Google::Apis::RequestOptions] options
895
751
  # Request-specific options
896
752
  #
897
753
  # @yield [result, err] Result & error if block supplied
898
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
754
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
899
755
  # @yieldparam err [StandardError] error object if request failed
900
756
  #
901
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
757
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
902
758
  #
903
759
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
904
760
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
905
761
  # @raise [Google::Apis::AuthorizationError] Authorization is required
906
- def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
907
- command = make_simple_command(:get, 'v1/projects/{projectId}', options)
908
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
909
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
910
- command.params['projectId'] = project_id unless project_id.nil?
911
- command.query['fields'] = fields unless fields.nil?
762
+ def get_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
763
+ command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
764
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
765
+ command.request_object = get_effective_org_policy_request_object
766
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
767
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
768
+ command.params['resource'] = resource unless resource.nil?
912
769
  command.query['quotaUser'] = quota_user unless quota_user.nil?
770
+ command.query['fields'] = fields unless fields.nil?
913
771
  execute_or_queue_command(command, &block)
914
772
  end
915
773
 
@@ -920,11 +778,11 @@ module Google
920
778
  # The Project ID (for example, `my-project-123`).
921
779
  # Required.
922
780
  # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object
923
- # @param [String] fields
924
- # Selector specifying which fields to include in a partial response.
925
781
  # @param [String] quota_user
926
782
  # Available to use for quota purposes for server-side applications. Can be any
927
783
  # arbitrary string assigned to a user, but should not exceed 40 characters.
784
+ # @param [String] fields
785
+ # Selector specifying which fields to include in a partial response.
928
786
  # @param [Google::Apis::RequestOptions] options
929
787
  # Request-specific options
930
788
  #
@@ -937,15 +795,15 @@ module Google
937
795
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
796
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
797
  # @raise [Google::Apis::AuthorizationError] Authorization is required
940
- def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
798
+ def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
941
799
  command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
942
800
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
943
801
  command.request_object = get_ancestry_request_object
944
802
  command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
945
803
  command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
946
804
  command.params['projectId'] = project_id unless project_id.nil?
947
- command.query['fields'] = fields unless fields.nil?
948
805
  command.query['quotaUser'] = quota_user unless quota_user.nil?
806
+ command.query['fields'] = fields unless fields.nil?
949
807
  execute_or_queue_command(command, &block)
950
808
  end
951
809
 
@@ -954,11 +812,11 @@ module Google
954
812
  # REQUIRED: The resource for which the policy detail is being requested.
955
813
  # See the operation documentation for the appropriate value for this field.
956
814
  # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
957
- # @param [String] fields
958
- # Selector specifying which fields to include in a partial response.
959
815
  # @param [String] quota_user
960
816
  # Available to use for quota purposes for server-side applications. Can be any
961
817
  # arbitrary string assigned to a user, but should not exceed 40 characters.
818
+ # @param [String] fields
819
+ # Selector specifying which fields to include in a partial response.
962
820
  # @param [Google::Apis::RequestOptions] options
963
821
  # Request-specific options
964
822
  #
@@ -971,50 +829,15 @@ module Google
971
829
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
972
830
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
973
831
  # @raise [Google::Apis::AuthorizationError] Authorization is required
974
- def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
832
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
975
833
  command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
976
834
  command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
977
835
  command.request_object = test_iam_permissions_request_object
978
836
  command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
979
837
  command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
980
838
  command.params['resource'] = resource unless resource.nil?
981
- command.query['fields'] = fields unless fields.nil?
982
839
  command.query['quotaUser'] = quota_user unless quota_user.nil?
983
- execute_or_queue_command(command, &block)
984
- end
985
-
986
- # Gets the effective `Policy` on a resource. This is the result of merging
987
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
988
- # an `etag`set because it is a computed `Policy` across multiple resources.
989
- # @param [String] resource
990
- # The name of the resource to start computing the effective `Policy`.
991
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
992
- # @param [String] fields
993
- # Selector specifying which fields to include in a partial response.
994
- # @param [String] quota_user
995
- # Available to use for quota purposes for server-side applications. Can be any
996
- # arbitrary string assigned to a user, but should not exceed 40 characters.
997
- # @param [Google::Apis::RequestOptions] options
998
- # Request-specific options
999
- #
1000
- # @yield [result, err] Result & error if block supplied
1001
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1002
- # @yieldparam err [StandardError] error object if request failed
1003
- #
1004
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1005
- #
1006
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1007
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1008
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1009
- def get_project_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1010
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options)
1011
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
1012
- command.request_object = get_effective_org_policy_request_object
1013
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1014
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1015
- command.params['resource'] = resource unless resource.nil?
1016
840
  command.query['fields'] = fields unless fields.nil?
1017
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1018
841
  execute_or_queue_command(command, &block)
1019
842
  end
1020
843
 
@@ -1040,11 +863,11 @@ module Google
1040
863
  # @param [String] project_id
1041
864
  # The Project ID (for example, `foo-bar-123`).
1042
865
  # Required.
1043
- # @param [String] fields
1044
- # Selector specifying which fields to include in a partial response.
1045
866
  # @param [String] quota_user
1046
867
  # Available to use for quota purposes for server-side applications. Can be any
1047
868
  # arbitrary string assigned to a user, but should not exceed 40 characters.
869
+ # @param [String] fields
870
+ # Selector specifying which fields to include in a partial response.
1048
871
  # @param [Google::Apis::RequestOptions] options
1049
872
  # Request-specific options
1050
873
  #
@@ -1057,13 +880,13 @@ module Google
1057
880
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1058
881
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1059
882
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1060
- def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
883
+ def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
1061
884
  command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
1062
885
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1063
886
  command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1064
887
  command.params['projectId'] = project_id unless project_id.nil?
1065
- command.query['fields'] = fields unless fields.nil?
1066
888
  command.query['quotaUser'] = quota_user unless quota_user.nil?
889
+ command.query['fields'] = fields unless fields.nil?
1067
890
  execute_or_queue_command(command, &block)
1068
891
  end
1069
892
 
@@ -1071,11 +894,11 @@ module Google
1071
894
  # @param [String] resource
1072
895
  # Name of the resource for the `Policy` to clear.
1073
896
  # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
1074
- # @param [String] fields
1075
- # Selector specifying which fields to include in a partial response.
1076
897
  # @param [String] quota_user
1077
898
  # Available to use for quota purposes for server-side applications. Can be any
1078
899
  # arbitrary string assigned to a user, but should not exceed 40 characters.
900
+ # @param [String] fields
901
+ # Selector specifying which fields to include in a partial response.
1079
902
  # @param [Google::Apis::RequestOptions] options
1080
903
  # Request-specific options
1081
904
  #
@@ -1088,15 +911,15 @@ module Google
1088
911
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1089
912
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1090
913
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1091
- def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
914
+ def clear_project_org_policy(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1092
915
  command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
1093
916
  command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
1094
917
  command.request_object = clear_org_policy_request_object
1095
918
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1096
919
  command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1097
920
  command.params['resource'] = resource unless resource.nil?
1098
- command.query['fields'] = fields unless fields.nil?
1099
921
  command.query['quotaUser'] = quota_user unless quota_user.nil?
922
+ command.query['fields'] = fields unless fields.nil?
1100
923
  execute_or_queue_command(command, &block)
1101
924
  end
1102
925
 
@@ -1132,11 +955,11 @@ module Google
1132
955
  # REQUIRED: The resource for which the policy is being specified.
1133
956
  # See the operation documentation for the appropriate value for this field.
1134
957
  # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
1135
- # @param [String] fields
1136
- # Selector specifying which fields to include in a partial response.
1137
958
  # @param [String] quota_user
1138
959
  # Available to use for quota purposes for server-side applications. Can be any
1139
960
  # arbitrary string assigned to a user, but should not exceed 40 characters.
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
1140
963
  # @param [Google::Apis::RequestOptions] options
1141
964
  # Request-specific options
1142
965
  #
@@ -1149,111 +972,120 @@ module Google
1149
972
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1150
973
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1151
974
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1152
- def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
975
+ def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1153
976
  command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options)
1154
977
  command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
1155
978
  command.request_object = set_iam_policy_request_object
1156
979
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1157
980
  command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
1158
981
  command.params['resource'] = resource unless resource.nil?
1159
- command.query['fields'] = fields unless fields.nil?
1160
982
  command.query['quotaUser'] = quota_user unless quota_user.nil?
983
+ command.query['fields'] = fields unless fields.nil?
1161
984
  execute_or_queue_command(command, &block)
1162
985
  end
1163
986
 
1164
- # Lists all the `Policies` set for a particular resource.
987
+ # Lists `Constraints` that could be applied on the specified resource.
1165
988
  # @param [String] resource
1166
- # Name of the resource to list Policies for.
1167
- # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
1168
- # @param [String] fields
1169
- # Selector specifying which fields to include in a partial response.
989
+ # Name of the resource to list `Constraints` for.
990
+ # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
1170
991
  # @param [String] quota_user
1171
992
  # Available to use for quota purposes for server-side applications. Can be any
1172
993
  # arbitrary string assigned to a user, but should not exceed 40 characters.
994
+ # @param [String] fields
995
+ # Selector specifying which fields to include in a partial response.
1173
996
  # @param [Google::Apis::RequestOptions] options
1174
997
  # Request-specific options
1175
998
  #
1176
999
  # @yield [result, err] Result & error if block supplied
1177
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
1000
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
1178
1001
  # @yieldparam err [StandardError] error object if request failed
1179
1002
  #
1180
- # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
1003
+ # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
1181
1004
  #
1182
1005
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1183
1006
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1184
1007
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1185
- def list_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1186
- command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
1187
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
1188
- command.request_object = list_org_policies_request_object
1189
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
1190
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
1008
+ def list_project_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1009
+ command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
1010
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
1011
+ command.request_object = list_available_org_policy_constraints_request_object
1012
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
1013
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
1191
1014
  command.params['resource'] = resource unless resource.nil?
1192
- command.query['fields'] = fields unless fields.nil?
1193
1015
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1016
+ command.query['fields'] = fields unless fields.nil?
1194
1017
  execute_or_queue_command(command, &block)
1195
1018
  end
1196
1019
 
1197
- # Searches Organization resources that are visible to the user and satisfy
1198
- # the specified filter. This method returns Organizations in an unspecified
1199
- # order. New Organizations do not necessarily appear at the end of the
1200
- # results.
1201
- # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
1202
- # @param [String] fields
1203
- # Selector specifying which fields to include in a partial response.
1020
+ # Returns the IAM access control policy for the specified Project.
1021
+ # Permission is denied if the policy or the resource does not exist.
1022
+ # @param [String] resource
1023
+ # REQUIRED: The resource for which the policy is being requested.
1024
+ # See the operation documentation for the appropriate value for this field.
1025
+ # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
1204
1026
  # @param [String] quota_user
1205
1027
  # Available to use for quota purposes for server-side applications. Can be any
1206
1028
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1029
+ # @param [String] fields
1030
+ # Selector specifying which fields to include in a partial response.
1207
1031
  # @param [Google::Apis::RequestOptions] options
1208
1032
  # Request-specific options
1209
1033
  #
1210
1034
  # @yield [result, err] Result & error if block supplied
1211
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
1035
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
1212
1036
  # @yieldparam err [StandardError] error object if request failed
1213
1037
  #
1214
- # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
1038
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
1215
1039
  #
1216
1040
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1217
1041
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1218
1042
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1219
- def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1220
- command = make_simple_command(:post, 'v1/organizations:search', options)
1221
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
1222
- command.request_object = search_organizations_request_object
1223
- command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
1224
- command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
1225
- command.query['fields'] = fields unless fields.nil?
1043
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1044
+ command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
1045
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
1046
+ command.request_object = get_iam_policy_request_object
1047
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1048
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
1049
+ command.params['resource'] = resource unless resource.nil?
1226
1050
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1051
+ command.query['fields'] = fields unless fields.nil?
1227
1052
  execute_or_queue_command(command, &block)
1228
1053
  end
1229
1054
 
1230
- # Fetches an Organization resource identified by the specified resource name.
1231
- # @param [String] name
1232
- # The resource name of the Organization to fetch, e.g. "organizations/1234".
1233
- # @param [String] fields
1234
- # Selector specifying which fields to include in a partial response.
1055
+ # Gets a `Policy` on a resource.
1056
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
1057
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1058
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
1059
+ # `Policy` during read-modify-write.
1060
+ # @param [String] resource
1061
+ # Name of the resource the `Policy` is set on.
1062
+ # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
1235
1063
  # @param [String] quota_user
1236
1064
  # Available to use for quota purposes for server-side applications. Can be any
1237
1065
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1066
+ # @param [String] fields
1067
+ # Selector specifying which fields to include in a partial response.
1238
1068
  # @param [Google::Apis::RequestOptions] options
1239
1069
  # Request-specific options
1240
1070
  #
1241
1071
  # @yield [result, err] Result & error if block supplied
1242
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
1072
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1243
1073
  # @yieldparam err [StandardError] error object if request failed
1244
1074
  #
1245
- # @return [Google::Apis::CloudresourcemanagerV1::Organization]
1075
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1246
1076
  #
1247
1077
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1248
1078
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1249
1079
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1250
- def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
1251
- command = make_simple_command(:get, 'v1/{+name}', options)
1252
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
1253
- command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
1254
- command.params['name'] = name unless name.nil?
1255
- command.query['fields'] = fields unless fields.nil?
1080
+ def get_project_org_policy(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1081
+ command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
1082
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
1083
+ command.request_object = get_org_policy_request_object
1084
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1085
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1086
+ command.params['resource'] = resource unless resource.nil?
1256
1087
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1088
+ command.query['fields'] = fields unless fields.nil?
1257
1089
  execute_or_queue_command(command, &block)
1258
1090
  end
1259
1091
 
@@ -1263,11 +1095,11 @@ module Google
1263
1095
  # @param [String] resource
1264
1096
  # The name of the resource to start computing the effective `Policy`.
1265
1097
  # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
1266
- # @param [String] fields
1267
- # Selector specifying which fields to include in a partial response.
1268
1098
  # @param [String] quota_user
1269
1099
  # Available to use for quota purposes for server-side applications. Can be any
1270
1100
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1101
+ # @param [String] fields
1102
+ # Selector specifying which fields to include in a partial response.
1271
1103
  # @param [Google::Apis::RequestOptions] options
1272
1104
  # Request-specific options
1273
1105
  #
@@ -1280,550 +1112,295 @@ module Google
1280
1112
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1281
1113
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1282
1114
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1283
- def get_organization_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1284
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options)
1115
+ def get_project_effective_org_policy(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1116
+ command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
1285
1117
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
1286
1118
  command.request_object = get_effective_org_policy_request_object
1287
1119
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1288
1120
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1289
1121
  command.params['resource'] = resource unless resource.nil?
1290
- command.query['fields'] = fields unless fields.nil?
1291
1122
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1123
+ command.query['fields'] = fields unless fields.nil?
1292
1124
  execute_or_queue_command(command, &block)
1293
1125
  end
1294
1126
 
1295
- # Returns permissions that a caller has on the specified Organization.
1296
- # The `resource` field should be the organization's resource name,
1297
- # e.g. "organizations/123".
1298
- # @param [String] resource
1299
- # REQUIRED: The resource for which the policy detail is being requested.
1300
- # See the operation documentation for the appropriate value for this field.
1301
- # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1302
- # @param [String] fields
1303
- # Selector specifying which fields to include in a partial response.
1127
+ # Restores the Project identified by the specified
1128
+ # `project_id` (for example, `my-project-123`).
1129
+ # You can only use this method for a Project that has a lifecycle state of
1130
+ # DELETE_REQUESTED.
1131
+ # After deletion starts, the Project cannot be restored.
1132
+ # The caller must have modify permissions for this Project.
1133
+ # @param [String] project_id
1134
+ # The project ID (for example, `foo-bar-123`).
1135
+ # Required.
1136
+ # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
1304
1137
  # @param [String] quota_user
1305
1138
  # Available to use for quota purposes for server-side applications. Can be any
1306
1139
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1140
+ # @param [String] fields
1141
+ # Selector specifying which fields to include in a partial response.
1307
1142
  # @param [Google::Apis::RequestOptions] options
1308
1143
  # Request-specific options
1309
1144
  #
1310
1145
  # @yield [result, err] Result & error if block supplied
1311
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
1146
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1312
1147
  # @yieldparam err [StandardError] error object if request failed
1313
1148
  #
1314
- # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
1149
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1315
1150
  #
1316
1151
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1317
1152
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1318
1153
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1319
- def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1320
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1321
- command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
1322
- command.request_object = test_iam_permissions_request_object
1323
- command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
1324
- command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
1325
- command.params['resource'] = resource unless resource.nil?
1326
- command.query['fields'] = fields unless fields.nil?
1154
+ def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1155
+ command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
1156
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
1157
+ command.request_object = undelete_project_request_object
1158
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1159
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1160
+ command.params['projectId'] = project_id unless project_id.nil?
1327
1161
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1162
+ command.query['fields'] = fields unless fields.nil?
1328
1163
  execute_or_queue_command(command, &block)
1329
1164
  end
1330
1165
 
1331
- # Clears a `Policy` from a resource.
1332
- # @param [String] resource
1333
- # Name of the resource for the `Policy` to clear.
1334
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
1335
- # @param [String] fields
1336
- # Selector specifying which fields to include in a partial response.
1166
+ # Updates the attributes of the Project identified by the specified
1167
+ # `project_id` (for example, `my-project-123`).
1168
+ # The caller must have modify permissions for this Project.
1169
+ # @param [String] project_id
1170
+ # The project ID (for example, `my-project-123`).
1171
+ # Required.
1172
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
1337
1173
  # @param [String] quota_user
1338
1174
  # Available to use for quota purposes for server-side applications. Can be any
1339
1175
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1176
+ # @param [String] fields
1177
+ # Selector specifying which fields to include in a partial response.
1340
1178
  # @param [Google::Apis::RequestOptions] options
1341
1179
  # Request-specific options
1342
1180
  #
1343
1181
  # @yield [result, err] Result & error if block supplied
1344
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1182
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
1345
1183
  # @yieldparam err [StandardError] error object if request failed
1346
1184
  #
1347
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1185
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
1348
1186
  #
1349
1187
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1350
1188
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1351
1189
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1352
- def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1353
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
1354
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
1355
- command.request_object = clear_org_policy_request_object
1356
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1357
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1358
- command.params['resource'] = resource unless resource.nil?
1359
- command.query['fields'] = fields unless fields.nil?
1190
+ def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1191
+ command = make_simple_command(:put, 'v1/projects/{projectId}', options)
1192
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1193
+ command.request_object = project_object
1194
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1195
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
1196
+ command.params['projectId'] = project_id unless project_id.nil?
1360
1197
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1198
+ command.query['fields'] = fields unless fields.nil?
1361
1199
  execute_or_queue_command(command, &block)
1362
1200
  end
1363
1201
 
1364
- # Sets the access control policy on an Organization resource. Replaces any
1365
- # existing policy. The `resource` field should be the organization's resource
1366
- # name, e.g. "organizations/123".
1367
- # @param [String] resource
1368
- # REQUIRED: The resource for which the policy is being specified.
1369
- # See the operation documentation for the appropriate value for this field.
1370
- # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
1371
- # @param [String] fields
1372
- # Selector specifying which fields to include in a partial response.
1202
+ # Lists Projects that are visible to the user and satisfy the
1203
+ # specified filter. This method returns Projects in an unspecified order.
1204
+ # New Projects do not necessarily appear at the end of the list.
1205
+ # @param [String] filter
1206
+ # An expression for filtering the results of the request. Filter rules are
1207
+ # case insensitive. The fields eligible for filtering are:
1208
+ # + `name`
1209
+ # + `id`
1210
+ # + <code>labels.<em>key</em></code> where *key* is the name of a label
1211
+ # Some examples of using labels as filters:
1212
+ # |Filter|Description|
1213
+ # |------|-----------|
1214
+ # |name:*|The project has a name.|
1215
+ # |name:Howl|The project's name is `Howl` or `howl`.|
1216
+ # |name:HOWL|Equivalent to above.|
1217
+ # |NAME:howl|Equivalent to above.|
1218
+ # |labels.color:*|The project has the label `color`.|
1219
+ # |labels.color:red|The project's label `color` has the value `red`.|
1220
+ # |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
1221
+ # value `red` and its label `size` has the value `big`.
1222
+ # Optional.
1223
+ # @param [String] page_token
1224
+ # A pagination token returned from a previous call to ListProjects
1225
+ # that indicates from where listing should continue.
1226
+ # Optional.
1227
+ # @param [Fixnum] page_size
1228
+ # The maximum number of Projects to return in the response.
1229
+ # The server can return fewer Projects than requested.
1230
+ # If unspecified, server picks an appropriate default.
1231
+ # Optional.
1373
1232
  # @param [String] quota_user
1374
1233
  # Available to use for quota purposes for server-side applications. Can be any
1375
1234
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1235
+ # @param [String] fields
1236
+ # Selector specifying which fields to include in a partial response.
1376
1237
  # @param [Google::Apis::RequestOptions] options
1377
1238
  # Request-specific options
1378
1239
  #
1379
1240
  # @yield [result, err] Result & error if block supplied
1380
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
1241
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
1381
1242
  # @yieldparam err [StandardError] error object if request failed
1382
1243
  #
1383
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
1244
+ # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
1384
1245
  #
1385
1246
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1386
1247
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1387
1248
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1388
- def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1389
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1390
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
1391
- command.request_object = set_iam_policy_request_object
1392
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1393
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
1394
- command.params['resource'] = resource unless resource.nil?
1395
- command.query['fields'] = fields unless fields.nil?
1249
+ def list_projects(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
1250
+ command = make_simple_command(:get, 'v1/projects', options)
1251
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
1252
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
1253
+ command.query['filter'] = filter unless filter.nil?
1254
+ command.query['pageToken'] = page_token unless page_token.nil?
1255
+ command.query['pageSize'] = page_size unless page_size.nil?
1396
1256
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1257
+ command.query['fields'] = fields unless fields.nil?
1397
1258
  execute_or_queue_command(command, &block)
1398
1259
  end
1399
1260
 
1400
- # Lists `Constraints` that could be applied on the specified resource.
1261
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
1262
+ # that `Constraint` on the resource if one does not exist.
1263
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
1264
+ # write of the `Policy`.
1401
1265
  # @param [String] resource
1402
- # Name of the resource to list `Constraints` for.
1403
- # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
1404
- # @param [String] fields
1405
- # Selector specifying which fields to include in a partial response.
1266
+ # Resource name of the resource to attach the `Policy`.
1267
+ # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
1406
1268
  # @param [String] quota_user
1407
1269
  # Available to use for quota purposes for server-side applications. Can be any
1408
1270
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1271
+ # @param [String] fields
1272
+ # Selector specifying which fields to include in a partial response.
1409
1273
  # @param [Google::Apis::RequestOptions] options
1410
1274
  # Request-specific options
1411
1275
  #
1412
1276
  # @yield [result, err] Result & error if block supplied
1413
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
1277
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1414
1278
  # @yieldparam err [StandardError] error object if request failed
1415
1279
  #
1416
- # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
1280
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1417
1281
  #
1418
1282
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1419
1283
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1420
1284
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1421
- def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1422
- command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
1423
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
1424
- command.request_object = list_available_org_policy_constraints_request_object
1425
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
1426
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
1285
+ def set_project_org_policy(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1286
+ command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
1287
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
1288
+ command.request_object = set_org_policy_request_object
1289
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1290
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1427
1291
  command.params['resource'] = resource unless resource.nil?
1428
- command.query['fields'] = fields unless fields.nil?
1429
1292
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1293
+ command.query['fields'] = fields unless fields.nil?
1430
1294
  execute_or_queue_command(command, &block)
1431
1295
  end
1432
1296
 
1433
- # Gets the access control policy for an Organization resource. May be empty
1434
- # if no such policy or resource exists. The `resource` field should be the
1435
- # organization's resource name, e.g. "organizations/123".
1436
- # @param [String] resource
1437
- # REQUIRED: The resource for which the policy is being requested.
1438
- # See the operation documentation for the appropriate value for this field.
1439
- # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
1440
- # @param [String] fields
1441
- # Selector specifying which fields to include in a partial response.
1297
+ # Request that a new Project be created. The result is an Operation which
1298
+ # can be used to track the creation process. It is automatically deleted
1299
+ # after a few hours, so there is no need to call DeleteOperation.
1300
+ # Our SLO permits Project creation to take up to 30 seconds at the 90th
1301
+ # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
1302
+ # latency. 95th percentile latency is around 11 seconds. We recommend
1303
+ # polling at the 5th second with an exponential backoff.
1304
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
1442
1305
  # @param [String] quota_user
1443
1306
  # Available to use for quota purposes for server-side applications. Can be any
1444
1307
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1308
+ # @param [String] fields
1309
+ # Selector specifying which fields to include in a partial response.
1445
1310
  # @param [Google::Apis::RequestOptions] options
1446
1311
  # Request-specific options
1447
1312
  #
1448
1313
  # @yield [result, err] Result & error if block supplied
1449
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
1314
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
1450
1315
  # @yieldparam err [StandardError] error object if request failed
1451
1316
  #
1452
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
1317
+ # @return [Google::Apis::CloudresourcemanagerV1::Operation]
1453
1318
  #
1454
1319
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1455
1320
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1456
1321
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1457
- def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1458
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
1459
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
1460
- command.request_object = get_iam_policy_request_object
1461
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1462
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
1463
- command.params['resource'] = resource unless resource.nil?
1464
- command.query['fields'] = fields unless fields.nil?
1465
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1466
- execute_or_queue_command(command, &block)
1467
- end
1468
-
1469
- # Gets a `Policy` on a resource.
1470
- # If no `Policy` is set on the resource, a `Policy` is returned with default
1471
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1472
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
1473
- # `Policy` during read-modify-write.
1474
- # @param [String] resource
1475
- # Name of the resource the `Policy` is set on.
1476
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
1477
- # @param [String] fields
1478
- # Selector specifying which fields to include in a partial response.
1479
- # @param [String] quota_user
1480
- # Available to use for quota purposes for server-side applications. Can be any
1481
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1482
- # @param [Google::Apis::RequestOptions] options
1483
- # Request-specific options
1484
- #
1485
- # @yield [result, err] Result & error if block supplied
1486
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1487
- # @yieldparam err [StandardError] error object if request failed
1488
- #
1489
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1490
- #
1491
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1492
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1493
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1494
- def get_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1495
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
1496
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
1497
- command.request_object = get_org_policy_request_object
1498
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1499
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1500
- command.params['resource'] = resource unless resource.nil?
1501
- command.query['fields'] = fields unless fields.nil?
1502
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1503
- execute_or_queue_command(command, &block)
1504
- end
1505
-
1506
- # Gets the effective `Policy` on a resource. This is the result of merging
1507
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
1508
- # an `etag`set because it is a computed `Policy` across multiple resources.
1509
- # @param [String] resource
1510
- # The name of the resource to start computing the effective `Policy`.
1511
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
1512
- # @param [String] fields
1513
- # Selector specifying which fields to include in a partial response.
1514
- # @param [String] quota_user
1515
- # Available to use for quota purposes for server-side applications. Can be any
1516
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1517
- # @param [Google::Apis::RequestOptions] options
1518
- # Request-specific options
1519
- #
1520
- # @yield [result, err] Result & error if block supplied
1521
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1522
- # @yieldparam err [StandardError] error object if request failed
1523
- #
1524
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1525
- #
1526
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1527
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1528
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1529
- def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1530
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
1531
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
1532
- command.request_object = get_effective_org_policy_request_object
1533
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1534
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1535
- command.params['resource'] = resource unless resource.nil?
1536
- command.query['fields'] = fields unless fields.nil?
1322
+ def create_project(project_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1323
+ command = make_simple_command(:post, 'v1/projects', options)
1324
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1325
+ command.request_object = project_object
1326
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
1327
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
1537
1328
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1538
- execute_or_queue_command(command, &block)
1539
- end
1540
-
1541
- # Gets a `Policy` on a resource.
1542
- # If no `Policy` is set on the resource, a `Policy` is returned with default
1543
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1544
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
1545
- # `Policy` during read-modify-write.
1546
- # @param [String] resource
1547
- # Name of the resource the `Policy` is set on.
1548
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
1549
- # @param [String] fields
1550
- # Selector specifying which fields to include in a partial response.
1551
- # @param [String] quota_user
1552
- # Available to use for quota purposes for server-side applications. Can be any
1553
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1554
- # @param [Google::Apis::RequestOptions] options
1555
- # Request-specific options
1556
- #
1557
- # @yield [result, err] Result & error if block supplied
1558
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1559
- # @yieldparam err [StandardError] error object if request failed
1560
- #
1561
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1562
- #
1563
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1564
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1565
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1566
- def get_organization_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1567
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options)
1568
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
1569
- command.request_object = get_org_policy_request_object
1570
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1571
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1572
- command.params['resource'] = resource unless resource.nil?
1573
1329
  command.query['fields'] = fields unless fields.nil?
1574
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1575
1330
  execute_or_queue_command(command, &block)
1576
1331
  end
1577
1332
 
1578
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
1579
- # that `Constraint` on the resource if one does not exist.
1580
- # Not supplying an `etag` on the request `Policy` results in an unconditional
1581
- # write of the `Policy`.
1333
+ # Lists all the `Policies` set for a particular resource.
1582
1334
  # @param [String] resource
1583
- # Resource name of the resource to attach the `Policy`.
1584
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
1585
- # @param [String] fields
1586
- # Selector specifying which fields to include in a partial response.
1335
+ # Name of the resource to list Policies for.
1336
+ # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
1587
1337
  # @param [String] quota_user
1588
1338
  # Available to use for quota purposes for server-side applications. Can be any
1589
1339
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1590
- # @param [Google::Apis::RequestOptions] options
1591
- # Request-specific options
1592
- #
1593
- # @yield [result, err] Result & error if block supplied
1594
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1595
- # @yieldparam err [StandardError] error object if request failed
1596
- #
1597
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1598
- #
1599
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1600
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1601
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1602
- def set_organization_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1603
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options)
1604
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
1605
- command.request_object = set_org_policy_request_object
1606
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1607
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1608
- command.params['resource'] = resource unless resource.nil?
1609
- command.query['fields'] = fields unless fields.nil?
1610
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1611
- execute_or_queue_command(command, &block)
1612
- end
1613
-
1614
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
1615
- # that `Constraint` on the resource if one does not exist.
1616
- # Not supplying an `etag` on the request `Policy` results in an unconditional
1617
- # write of the `Policy`.
1618
- # @param [String] resource
1619
- # Resource name of the resource to attach the `Policy`.
1620
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
1621
1340
  # @param [String] fields
1622
1341
  # Selector specifying which fields to include in a partial response.
1623
- # @param [String] quota_user
1624
- # Available to use for quota purposes for server-side applications. Can be any
1625
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1626
1342
  # @param [Google::Apis::RequestOptions] options
1627
1343
  # Request-specific options
1628
1344
  #
1629
1345
  # @yield [result, err] Result & error if block supplied
1630
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1631
- # @yieldparam err [StandardError] error object if request failed
1632
- #
1633
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1634
- #
1635
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1636
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1637
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1638
- def set_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1639
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
1640
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
1641
- command.request_object = set_org_policy_request_object
1642
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1643
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1644
- command.params['resource'] = resource unless resource.nil?
1645
- command.query['fields'] = fields unless fields.nil?
1646
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1647
- execute_or_queue_command(command, &block)
1648
- end
1649
-
1650
- # Clears a `Policy` from a resource.
1651
- # @param [String] resource
1652
- # Name of the resource for the `Policy` to clear.
1653
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
1654
- # @param [String] fields
1655
- # Selector specifying which fields to include in a partial response.
1656
- # @param [String] quota_user
1657
- # Available to use for quota purposes for server-side applications. Can be any
1658
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1659
- # @param [Google::Apis::RequestOptions] options
1660
- # Request-specific options
1661
- #
1662
- # @yield [result, err] Result & error if block supplied
1663
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1346
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
1664
1347
  # @yieldparam err [StandardError] error object if request failed
1665
1348
  #
1666
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1349
+ # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
1667
1350
  #
1668
1351
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1669
1352
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1670
1353
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1671
- def clear_organization_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1672
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options)
1673
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
1674
- command.request_object = clear_org_policy_request_object
1675
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1676
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1354
+ def list_project_org_policies(resource, list_org_policies_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
1355
+ command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
1356
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
1357
+ command.request_object = list_org_policies_request_object
1358
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
1359
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
1677
1360
  command.params['resource'] = resource unless resource.nil?
1678
- command.query['fields'] = fields unless fields.nil?
1679
1361
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1680
- execute_or_queue_command(command, &block)
1681
- end
1682
-
1683
- # Create a Lien which applies to the resource denoted by the `parent` field.
1684
- # Callers of this method will require permission on the `parent` resource.
1685
- # For example, applying to `projects/1234` requires permission
1686
- # `resourcemanager.projects.updateLiens`.
1687
- # NOTE: Some resources may limit the number of Liens which may be applied.
1688
- # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_object
1689
- # @param [String] fields
1690
- # Selector specifying which fields to include in a partial response.
1691
- # @param [String] quota_user
1692
- # Available to use for quota purposes for server-side applications. Can be any
1693
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1694
- # @param [Google::Apis::RequestOptions] options
1695
- # Request-specific options
1696
- #
1697
- # @yield [result, err] Result & error if block supplied
1698
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Lien] parsed result object
1699
- # @yieldparam err [StandardError] error object if request failed
1700
- #
1701
- # @return [Google::Apis::CloudresourcemanagerV1::Lien]
1702
- #
1703
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1704
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1705
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1706
- def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1707
- command = make_simple_command(:post, 'v1/liens', options)
1708
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
1709
- command.request_object = lien_object
1710
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
1711
- command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
1712
1362
  command.query['fields'] = fields unless fields.nil?
1713
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1714
1363
  execute_or_queue_command(command, &block)
1715
1364
  end
1716
1365
 
1717
- # Delete a Lien by `name`.
1718
- # Callers of this method will require permission on the `parent` resource.
1719
- # For example, a Lien with a `parent` of `projects/1234` requires permission
1720
- # `resourcemanager.projects.updateLiens`.
1721
- # @param [String] name
1722
- # The name/identifier of the Lien to delete.
1723
- # @param [String] fields
1724
- # Selector specifying which fields to include in a partial response.
1366
+ # Retrieves the Project identified by the specified
1367
+ # `project_id` (for example, `my-project-123`).
1368
+ # The caller must have read permissions for this Project.
1369
+ # @param [String] project_id
1370
+ # The Project ID (for example, `my-project-123`).
1371
+ # Required.
1725
1372
  # @param [String] quota_user
1726
1373
  # Available to use for quota purposes for server-side applications. Can be any
1727
1374
  # arbitrary string assigned to a user, but should not exceed 40 characters.
1728
- # @param [Google::Apis::RequestOptions] options
1729
- # Request-specific options
1730
- #
1731
- # @yield [result, err] Result & error if block supplied
1732
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1733
- # @yieldparam err [StandardError] error object if request failed
1734
- #
1735
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1736
- #
1737
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1738
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1739
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1740
- def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
1741
- command = make_simple_command(:delete, 'v1/{+name}', options)
1742
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1743
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1744
- command.params['name'] = name unless name.nil?
1745
- command.query['fields'] = fields unless fields.nil?
1746
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1747
- execute_or_queue_command(command, &block)
1748
- end
1749
-
1750
- # List all Liens applied to the `parent` resource.
1751
- # Callers of this method will require permission on the `parent` resource.
1752
- # For example, a Lien with a `parent` of `projects/1234` requires permission
1753
- # `resourcemanager.projects.get`.
1754
- # @param [String] parent
1755
- # The name of the resource to list all attached Liens.
1756
- # For example, `projects/1234`.
1757
- # @param [String] page_token
1758
- # The `next_page_token` value returned from a previous List request, if any.
1759
- # @param [Fixnum] page_size
1760
- # The maximum number of items to return. This is a suggestion for the server.
1761
1375
  # @param [String] fields
1762
1376
  # Selector specifying which fields to include in a partial response.
1763
- # @param [String] quota_user
1764
- # Available to use for quota purposes for server-side applications. Can be any
1765
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1766
1377
  # @param [Google::Apis::RequestOptions] options
1767
1378
  # Request-specific options
1768
1379
  #
1769
1380
  # @yield [result, err] Result & error if block supplied
1770
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] parsed result object
1381
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
1771
1382
  # @yieldparam err [StandardError] error object if request failed
1772
1383
  #
1773
- # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
1384
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
1774
1385
  #
1775
1386
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1776
1387
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1777
1388
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1778
- def list_liens(parent: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1779
- command = make_simple_command(:get, 'v1/liens', options)
1780
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
1781
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
1782
- command.query['parent'] = parent unless parent.nil?
1783
- command.query['pageToken'] = page_token unless page_token.nil?
1784
- command.query['pageSize'] = page_size unless page_size.nil?
1785
- command.query['fields'] = fields unless fields.nil?
1389
+ def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
1390
+ command = make_simple_command(:get, 'v1/projects/{projectId}', options)
1391
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1392
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
1393
+ command.params['projectId'] = project_id unless project_id.nil?
1786
1394
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1787
- execute_or_queue_command(command, &block)
1788
- end
1789
-
1790
- # Gets the latest state of a long-running operation. Clients can use this
1791
- # method to poll the operation result at intervals as recommended by the API
1792
- # service.
1793
- # @param [String] name
1794
- # The name of the operation resource.
1795
- # @param [String] fields
1796
- # Selector specifying which fields to include in a partial response.
1797
- # @param [String] quota_user
1798
- # Available to use for quota purposes for server-side applications. Can be any
1799
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1800
- # @param [Google::Apis::RequestOptions] options
1801
- # Request-specific options
1802
- #
1803
- # @yield [result, err] Result & error if block supplied
1804
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
1805
- # @yieldparam err [StandardError] error object if request failed
1806
- #
1807
- # @return [Google::Apis::CloudresourcemanagerV1::Operation]
1808
- #
1809
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1810
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1811
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1812
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1813
- command = make_simple_command(:get, 'v1/{+name}', options)
1814
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
1815
- command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
1816
- command.params['name'] = name unless name.nil?
1817
1395
  command.query['fields'] = fields unless fields.nil?
1818
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1819
1396
  execute_or_queue_command(command, &block)
1820
1397
  end
1821
1398
 
1822
1399
  protected
1823
1400
 
1824
1401
  def apply_command_defaults(command)
1825
- command.query['key'] = key unless key.nil?
1826
1402
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1403
+ command.query['key'] = key unless key.nil?
1827
1404
  end
1828
1405
  end
1829
1406
  end