google-api-client 0.11.1 → 0.11.2

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 (252) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/api_names.yaml +42335 -1
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +28 -28
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +12 -12
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +2 -2
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +757 -757
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +162 -162
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +48 -48
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +75 -7
  14. data/generated/google/apis/admin_directory_v1/representations.rb +20 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +61 -61
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +403 -403
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +36 -11
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +2 -0
  24. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  25. data/generated/google/apis/appengine_v1.rb +6 -5
  26. data/generated/google/apis/appengine_v1/classes.rb +1429 -1421
  27. data/generated/google/apis/appengine_v1/representations.rb +331 -331
  28. data/generated/google/apis/appengine_v1/service.rb +173 -168
  29. data/generated/google/apis/appstate_v1.rb +1 -1
  30. data/generated/google/apis/bigquery_v2.rb +1 -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/cloudbilling_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +624 -618
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +126 -125
  37. data/generated/google/apis/cloudbuild_v1/service.rb +87 -87
  38. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  39. data/generated/google/apis/clouddebugger_v2/classes.rb +267 -267
  40. data/generated/google/apis/clouddebugger_v2/representations.rb +83 -83
  41. data/generated/google/apis/clouddebugger_v2/service.rb +137 -137
  42. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  43. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +131 -131
  44. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +28 -28
  45. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +17 -17
  46. data/generated/google/apis/cloudfunctions_v1.rb +1 -4
  47. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -47
  48. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -17
  49. data/generated/google/apis/cloudfunctions_v1/service.rb +0 -30
  50. data/generated/google/apis/cloudkms_v1.rb +1 -1
  51. data/generated/google/apis/cloudkms_v1/classes.rb +625 -625
  52. data/generated/google/apis/cloudkms_v1/representations.rb +132 -132
  53. data/generated/google/apis/cloudkms_v1/service.rb +272 -272
  54. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +242 -242
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +43 -43
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +505 -505
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +172 -172
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +39 -39
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +310 -310
  63. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +96 -69
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +16 -16
  66. data/generated/google/apis/cloudtrace_v1/service.rb +42 -15
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +194 -25
  69. data/generated/google/apis/compute_beta/representations.rb +42 -0
  70. data/generated/google/apis/compute_beta/service.rb +196 -100
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +69 -18
  73. data/generated/google/apis/compute_v1/representations.rb +16 -0
  74. data/generated/google/apis/compute_v1/service.rb +84 -26
  75. data/generated/google/apis/container_v1.rb +3 -3
  76. data/generated/google/apis/container_v1/classes.rb +794 -586
  77. data/generated/google/apis/container_v1/representations.rb +202 -118
  78. data/generated/google/apis/container_v1/service.rb +396 -167
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +4 -4
  81. data/generated/google/apis/dataproc_v1.rb +1 -1
  82. data/generated/google/apis/dataproc_v1/classes.rb +487 -484
  83. data/generated/google/apis/dataproc_v1/representations.rb +83 -83
  84. data/generated/google/apis/dataproc_v1/service.rb +299 -297
  85. data/generated/google/apis/datastore_v1.rb +1 -1
  86. data/generated/google/apis/datastore_v1/classes.rb +703 -703
  87. data/generated/google/apis/datastore_v1/representations.rb +148 -148
  88. data/generated/google/apis/datastore_v1/service.rb +62 -62
  89. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  90. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -5
  91. data/generated/google/apis/dfareporting_v2_6.rb +1 -1
  92. data/generated/google/apis/dfareporting_v2_6/classes.rb +66 -53
  93. data/generated/google/apis/dfareporting_v2_6/service.rb +30 -30
  94. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  95. data/generated/google/apis/dfareporting_v2_7/classes.rb +69 -55
  96. data/generated/google/apis/dfareporting_v2_7/service.rb +38 -37
  97. data/generated/google/apis/dfareporting_v2_8.rb +40 -0
  98. data/generated/google/apis/dfareporting_v2_8/classes.rb +12046 -0
  99. data/generated/google/apis/dfareporting_v2_8/representations.rb +4310 -0
  100. data/generated/google/apis/dfareporting_v2_8/service.rb +9135 -0
  101. data/generated/google/apis/dns_v1.rb +1 -1
  102. data/generated/google/apis/dns_v2beta1.rb +1 -1
  103. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2.rb +1 -1
  105. data/generated/google/apis/drive_v2/classes.rb +15 -0
  106. data/generated/google/apis/drive_v2/representations.rb +2 -0
  107. data/generated/google/apis/drive_v2/service.rb +2 -1
  108. data/generated/google/apis/drive_v3.rb +1 -1
  109. data/generated/google/apis/drive_v3/classes.rb +16 -0
  110. data/generated/google/apis/drive_v3/representations.rb +2 -0
  111. data/generated/google/apis/drive_v3/service.rb +2 -1
  112. data/generated/google/apis/firebasedynamiclinks_v1.rb +2 -3
  113. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +159 -159
  114. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +55 -55
  115. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +5 -6
  116. data/generated/google/apis/firebaserules_v1.rb +1 -1
  117. data/generated/google/apis/firebaserules_v1/classes.rb +73 -73
  118. data/generated/google/apis/firebaserules_v1/representations.rb +25 -25
  119. data/generated/google/apis/firebaserules_v1/service.rb +118 -118
  120. data/generated/google/apis/fusiontables_v2.rb +1 -1
  121. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  122. data/generated/google/apis/games_management_v1management.rb +1 -1
  123. data/generated/google/apis/games_v1.rb +1 -1
  124. data/generated/google/apis/genomics_v1.rb +1 -1
  125. data/generated/google/apis/genomics_v1/classes.rb +920 -920
  126. data/generated/google/apis/genomics_v1/representations.rb +202 -202
  127. data/generated/google/apis/genomics_v1/service.rb +1092 -1092
  128. data/generated/google/apis/gmail_v1.rb +1 -1
  129. data/generated/google/apis/iam_v1.rb +1 -1
  130. data/generated/google/apis/iam_v1/classes.rb +455 -435
  131. data/generated/google/apis/iam_v1/representations.rb +96 -93
  132. data/generated/google/apis/iam_v1/service.rb +157 -157
  133. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  134. data/generated/google/apis/identitytoolkit_v3/classes.rb +12 -0
  135. data/generated/google/apis/identitytoolkit_v3/representations.rb +2 -0
  136. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  137. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  138. data/generated/google/apis/kgsearch_v1/service.rb +9 -9
  139. data/generated/google/apis/language_v1.rb +1 -1
  140. data/generated/google/apis/language_v1/classes.rb +455 -455
  141. data/generated/google/apis/language_v1/representations.rb +102 -102
  142. data/generated/google/apis/language_v1/service.rb +42 -42
  143. data/generated/google/apis/language_v1beta1.rb +1 -1
  144. data/generated/google/apis/language_v1beta1/classes.rb +216 -215
  145. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  146. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  147. data/generated/google/apis/logging_v2.rb +1 -1
  148. data/generated/google/apis/logging_v2/classes.rb +908 -895
  149. data/generated/google/apis/logging_v2/representations.rb +121 -120
  150. data/generated/google/apis/logging_v2/service.rb +489 -489
  151. data/generated/google/apis/logging_v2beta1.rb +4 -4
  152. data/generated/google/apis/logging_v2beta1/classes.rb +928 -915
  153. data/generated/google/apis/logging_v2beta1/representations.rb +121 -120
  154. data/generated/google/apis/logging_v2beta1/service.rb +249 -249
  155. data/generated/google/apis/manufacturers_v1.rb +1 -1
  156. data/generated/google/apis/manufacturers_v1/classes.rb +294 -294
  157. data/generated/google/apis/manufacturers_v1/representations.rb +84 -84
  158. data/generated/google/apis/manufacturers_v1/service.rb +8 -8
  159. data/generated/google/apis/mirror_v1.rb +1 -1
  160. data/generated/google/apis/ml_v1.rb +1 -1
  161. data/generated/google/apis/ml_v1/classes.rb +1186 -1183
  162. data/generated/google/apis/ml_v1/representations.rb +177 -177
  163. data/generated/google/apis/ml_v1/service.rb +244 -244
  164. data/generated/google/apis/monitoring_v3.rb +1 -1
  165. data/generated/google/apis/monitoring_v3/classes.rb +866 -866
  166. data/generated/google/apis/monitoring_v3/representations.rb +163 -163
  167. data/generated/google/apis/monitoring_v3/service.rb +355 -316
  168. data/generated/google/apis/oauth2_v2.rb +1 -1
  169. data/generated/google/apis/partners_v2.rb +1 -1
  170. data/generated/google/apis/partners_v2/classes.rb +1499 -1499
  171. data/generated/google/apis/partners_v2/representations.rb +368 -368
  172. data/generated/google/apis/partners_v2/service.rb +512 -512
  173. data/generated/google/apis/people_v1.rb +10 -10
  174. data/generated/google/apis/people_v1/classes.rb +544 -423
  175. data/generated/google/apis/people_v1/representations.rb +127 -109
  176. data/generated/google/apis/people_v1/service.rb +8 -8
  177. data/generated/google/apis/plus_domains_v1.rb +1 -1
  178. data/generated/google/apis/plus_v1.rb +1 -1
  179. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  180. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +200 -200
  181. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +41 -41
  182. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +80 -80
  183. data/generated/google/apis/pubsub_v1.rb +1 -1
  184. data/generated/google/apis/pubsub_v1/classes.rb +377 -377
  185. data/generated/google/apis/pubsub_v1/representations.rb +82 -82
  186. data/generated/google/apis/pubsub_v1/service.rb +93 -93
  187. data/generated/google/apis/runtimeconfig_v1.rb +6 -4
  188. data/generated/google/apis/runtimeconfig_v1/classes.rb +22 -22
  189. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  190. data/generated/google/apis/runtimeconfig_v1/service.rb +57 -55
  191. data/generated/google/apis/script_v1.rb +14 -14
  192. data/generated/google/apis/script_v1/classes.rb +113 -58
  193. data/generated/google/apis/script_v1/representations.rb +43 -14
  194. data/generated/google/apis/script_v1/service.rb +6 -6
  195. data/generated/google/apis/searchconsole_v1.rb +1 -1
  196. data/generated/google/apis/searchconsole_v1/classes.rb +67 -67
  197. data/generated/google/apis/searchconsole_v1/representations.rb +29 -29
  198. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  199. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +1125 -1125
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +213 -213
  202. data/generated/google/apis/servicecontrol_v1/service.rb +92 -92
  203. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  204. data/generated/google/apis/servicemanagement_v1/classes.rb +3364 -3622
  205. data/generated/google/apis/servicemanagement_v1/representations.rb +546 -530
  206. data/generated/google/apis/servicemanagement_v1/service.rb +262 -152
  207. data/generated/google/apis/serviceuser_v1.rb +4 -4
  208. data/generated/google/apis/serviceuser_v1/classes.rb +2616 -2874
  209. data/generated/google/apis/serviceuser_v1/representations.rb +294 -278
  210. data/generated/google/apis/serviceuser_v1/service.rb +19 -19
  211. data/generated/google/apis/sheets_v4.rb +4 -1
  212. data/generated/google/apis/sheets_v4/classes.rb +4315 -4313
  213. data/generated/google/apis/sheets_v4/representations.rb +858 -858
  214. data/generated/google/apis/sheets_v4/service.rb +115 -115
  215. data/generated/google/apis/slides_v1.rb +1 -1
  216. data/generated/google/apis/slides_v1/classes.rb +2890 -2890
  217. data/generated/google/apis/slides_v1/representations.rb +638 -638
  218. data/generated/google/apis/slides_v1/service.rb +36 -36
  219. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  220. data/generated/google/apis/sourcerepo_v1/classes.rb +283 -283
  221. data/generated/google/apis/sourcerepo_v1/representations.rb +67 -67
  222. data/generated/google/apis/sourcerepo_v1/service.rb +88 -88
  223. data/generated/google/apis/spanner_v1.rb +1 -1
  224. data/generated/google/apis/spanner_v1/classes.rb +2258 -2233
  225. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  226. data/generated/google/apis/spanner_v1/service.rb +466 -466
  227. data/generated/google/apis/speech_v1beta1.rb +2 -2
  228. data/generated/google/apis/speech_v1beta1/classes.rb +97 -97
  229. data/generated/google/apis/speech_v1beta1/representations.rb +29 -29
  230. data/generated/google/apis/speech_v1beta1/service.rb +49 -49
  231. data/generated/google/apis/storage_v1.rb +1 -1
  232. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  233. data/generated/google/apis/storagetransfer_v1/classes.rb +786 -786
  234. data/generated/google/apis/storagetransfer_v1/representations.rb +133 -133
  235. data/generated/google/apis/storagetransfer_v1/service.rb +30 -30
  236. data/generated/google/apis/surveys_v2.rb +1 -1
  237. data/generated/google/apis/surveys_v2/classes.rb +0 -12
  238. data/generated/google/apis/surveys_v2/representations.rb +0 -4
  239. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  240. data/generated/google/apis/vision_v1.rb +1 -1
  241. data/generated/google/apis/vision_v1/classes.rb +1301 -1302
  242. data/generated/google/apis/vision_v1/representations.rb +183 -183
  243. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_partner_v1/classes.rb +10 -0
  246. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -0
  247. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  248. data/generated/google/apis/youtubereporting_v1/classes.rb +64 -64
  249. data/generated/google/apis/youtubereporting_v1/representations.rb +12 -12
  250. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  251. data/lib/google/apis/version.rb +1 -1
  252. metadata +7 -3
@@ -22,6 +22,42 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2
24
24
 
25
+ class RequestLog
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class ListMonitoredResourceDescriptorsResponse
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class SourceReference
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class LogMetric
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class LogEntryOperation
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class WriteLogEntriesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
25
61
  class MonitoredResource
26
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
63
 
@@ -119,39 +155,86 @@ module Google
119
155
  end
120
156
 
121
157
  class RequestLog
122
- class Representation < Google::Apis::Core::JsonRepresentation; end
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ property :start_time, as: 'startTime'
161
+ property :latency, as: 'latency'
162
+ property :ip, as: 'ip'
163
+ property :app_id, as: 'appId'
164
+ property :app_engine_release, as: 'appEngineRelease'
165
+ property :method_prop, as: 'method'
166
+ property :cost, as: 'cost'
167
+ property :instance_id, as: 'instanceId'
168
+ property :mega_cycles, :numeric_string => true, as: 'megaCycles'
169
+ property :first, as: 'first'
170
+ property :version_id, as: 'versionId'
171
+ property :module_id, as: 'moduleId'
172
+ property :end_time, as: 'endTime'
173
+ property :user_agent, as: 'userAgent'
174
+ property :was_loading_request, as: 'wasLoadingRequest'
175
+ collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2::SourceReference, decorator: Google::Apis::LoggingV2::SourceReference::Representation
123
176
 
124
- include Google::Apis::Core::JsonObjectSupport
177
+ property :response_size, :numeric_string => true, as: 'responseSize'
178
+ property :trace_id, as: 'traceId'
179
+ collection :line, as: 'line', class: Google::Apis::LoggingV2::LogLine, decorator: Google::Apis::LoggingV2::LogLine::Representation
180
+
181
+ property :referrer, as: 'referrer'
182
+ property :task_queue_name, as: 'taskQueueName'
183
+ property :request_id, as: 'requestId'
184
+ property :nickname, as: 'nickname'
185
+ property :pending_time, as: 'pendingTime'
186
+ property :resource, as: 'resource'
187
+ property :status, as: 'status'
188
+ property :task_name, as: 'taskName'
189
+ property :url_map_entry, as: 'urlMapEntry'
190
+ property :instance_index, as: 'instanceIndex'
191
+ property :finished, as: 'finished'
192
+ property :host, as: 'host'
193
+ property :http_version, as: 'httpVersion'
194
+ end
125
195
  end
126
196
 
127
197
  class ListMonitoredResourceDescriptorsResponse
128
- class Representation < Google::Apis::Core::JsonRepresentation; end
198
+ # @private
199
+ class Representation < Google::Apis::Core::JsonRepresentation
200
+ property :next_page_token, as: 'nextPageToken'
201
+ collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2::MonitoredResourceDescriptor::Representation
129
202
 
130
- include Google::Apis::Core::JsonObjectSupport
203
+ end
131
204
  end
132
205
 
133
206
  class SourceReference
134
- class Representation < Google::Apis::Core::JsonRepresentation; end
135
-
136
- include Google::Apis::Core::JsonObjectSupport
137
- end
138
-
139
- class WriteLogEntriesResponse
140
- class Representation < Google::Apis::Core::JsonRepresentation; end
141
-
142
- include Google::Apis::Core::JsonObjectSupport
207
+ # @private
208
+ class Representation < Google::Apis::Core::JsonRepresentation
209
+ property :revision_id, as: 'revisionId'
210
+ property :repository, as: 'repository'
211
+ end
143
212
  end
144
213
 
145
214
  class LogMetric
146
- class Representation < Google::Apis::Core::JsonRepresentation; end
147
-
148
- include Google::Apis::Core::JsonObjectSupport
215
+ # @private
216
+ class Representation < Google::Apis::Core::JsonRepresentation
217
+ property :version, as: 'version'
218
+ property :filter, as: 'filter'
219
+ property :name, as: 'name'
220
+ property :description, as: 'description'
221
+ end
149
222
  end
150
223
 
151
224
  class LogEntryOperation
152
- class Representation < Google::Apis::Core::JsonRepresentation; end
225
+ # @private
226
+ class Representation < Google::Apis::Core::JsonRepresentation
227
+ property :last, as: 'last'
228
+ property :id, as: 'id'
229
+ property :producer, as: 'producer'
230
+ property :first, as: 'first'
231
+ end
232
+ end
153
233
 
154
- include Google::Apis::Core::JsonObjectSupport
234
+ class WriteLogEntriesResponse
235
+ # @private
236
+ class Representation < Google::Apis::Core::JsonRepresentation
237
+ end
155
238
  end
156
239
 
157
240
  class MonitoredResource
@@ -165,34 +248,35 @@ module Google
165
248
  class WriteLogEntriesRequest
166
249
  # @private
167
250
  class Representation < Google::Apis::Core::JsonRepresentation
251
+ property :partial_success, as: 'partialSuccess'
168
252
  hash :labels, as: 'labels'
169
253
  property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation
170
254
 
171
255
  property :log_name, as: 'logName'
172
256
  collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation
173
257
 
174
- property :partial_success, as: 'partialSuccess'
175
258
  end
176
259
  end
177
260
 
178
261
  class LogSink
179
262
  # @private
180
263
  class Representation < Google::Apis::Core::JsonRepresentation
181
- property :name, as: 'name'
182
- property :filter, as: 'filter'
183
- property :destination, as: 'destination'
184
264
  property :end_time, as: 'endTime'
185
- property :start_time, as: 'startTime'
186
265
  property :writer_identity, as: 'writerIdentity'
266
+ property :start_time, as: 'startTime'
187
267
  property :output_version_format, as: 'outputVersionFormat'
268
+ property :name, as: 'name'
269
+ property :include_children, as: 'includeChildren'
270
+ property :destination, as: 'destination'
271
+ property :filter, as: 'filter'
188
272
  end
189
273
  end
190
274
 
191
275
  class ListLogsResponse
192
276
  # @private
193
277
  class Representation < Google::Apis::Core::JsonRepresentation
194
- property :next_page_token, as: 'nextPageToken'
195
278
  collection :log_names, as: 'logNames'
279
+ property :next_page_token, as: 'nextPageToken'
196
280
  end
197
281
  end
198
282
 
@@ -219,59 +303,59 @@ module Google
219
303
  class ListSinksResponse
220
304
  # @private
221
305
  class Representation < Google::Apis::Core::JsonRepresentation
306
+ property :next_page_token, as: 'nextPageToken'
222
307
  collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2::LogSink, decorator: Google::Apis::LoggingV2::LogSink::Representation
223
308
 
224
- property :next_page_token, as: 'nextPageToken'
225
309
  end
226
310
  end
227
311
 
228
312
  class LabelDescriptor
229
313
  # @private
230
314
  class Representation < Google::Apis::Core::JsonRepresentation
315
+ property :value_type, as: 'valueType'
231
316
  property :key, as: 'key'
232
317
  property :description, as: 'description'
233
- property :value_type, as: 'valueType'
234
318
  end
235
319
  end
236
320
 
237
321
  class MonitoredResourceDescriptor
238
322
  # @private
239
323
  class Representation < Google::Apis::Core::JsonRepresentation
240
- collection :labels, as: 'labels', class: Google::Apis::LoggingV2::LabelDescriptor, decorator: Google::Apis::LoggingV2::LabelDescriptor::Representation
241
-
242
- property :name, as: 'name'
243
324
  property :display_name, as: 'displayName'
244
325
  property :description, as: 'description'
245
326
  property :type, as: 'type'
327
+ collection :labels, as: 'labels', class: Google::Apis::LoggingV2::LabelDescriptor, decorator: Google::Apis::LoggingV2::LabelDescriptor::Representation
328
+
329
+ property :name, as: 'name'
246
330
  end
247
331
  end
248
332
 
249
333
  class LogEntrySourceLocation
250
334
  # @private
251
335
  class Representation < Google::Apis::Core::JsonRepresentation
336
+ property :file, as: 'file'
252
337
  property :function, as: 'function'
253
338
  property :line, :numeric_string => true, as: 'line'
254
- property :file, as: 'file'
255
339
  end
256
340
  end
257
341
 
258
342
  class ListLogEntriesResponse
259
343
  # @private
260
344
  class Representation < Google::Apis::Core::JsonRepresentation
345
+ property :next_page_token, as: 'nextPageToken'
261
346
  collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation
262
347
 
263
- property :next_page_token, as: 'nextPageToken'
264
348
  end
265
349
  end
266
350
 
267
351
  class LogLine
268
352
  # @private
269
353
  class Representation < Google::Apis::Core::JsonRepresentation
270
- property :time, as: 'time'
271
354
  property :severity, as: 'severity'
272
355
  property :log_message, as: 'logMessage'
273
356
  property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::SourceLocation, decorator: Google::Apis::LoggingV2::SourceLocation::Representation
274
357
 
358
+ property :time, as: 'time'
275
359
  end
276
360
  end
277
361
 
@@ -293,6 +377,8 @@ module Google
293
377
  class LogEntry
294
378
  # @private
295
379
  class Representation < Google::Apis::Core::JsonRepresentation
380
+ property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation
381
+
296
382
  property :timestamp, as: 'timestamp'
297
383
  property :log_name, as: 'logName'
298
384
  property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation
@@ -300,25 +386,23 @@ module Google
300
386
  property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2::HttpRequest, decorator: Google::Apis::LoggingV2::HttpRequest::Representation
301
387
 
302
388
  hash :json_payload, as: 'jsonPayload'
389
+ property :insert_id, as: 'insertId'
303
390
  property :operation, as: 'operation', class: Google::Apis::LoggingV2::LogEntryOperation, decorator: Google::Apis::LoggingV2::LogEntryOperation::Representation
304
391
 
305
- property :insert_id, as: 'insertId'
306
392
  property :text_payload, as: 'textPayload'
307
393
  hash :proto_payload, as: 'protoPayload'
308
394
  hash :labels, as: 'labels'
309
395
  property :trace, as: 'trace'
310
396
  property :severity, as: 'severity'
311
- property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation
312
-
313
397
  end
314
398
  end
315
399
 
316
400
  class SourceLocation
317
401
  # @private
318
402
  class Representation < Google::Apis::Core::JsonRepresentation
319
- property :function_name, as: 'functionName'
320
403
  property :line, :numeric_string => true, as: 'line'
321
404
  property :file, as: 'file'
405
+ property :function_name, as: 'functionName'
322
406
  end
323
407
  end
324
408
 
@@ -329,91 +413,8 @@ module Google
329
413
  property :page_size, as: 'pageSize'
330
414
  property :order_by, as: 'orderBy'
331
415
  collection :resource_names, as: 'resourceNames'
332
- collection :project_ids, as: 'projectIds'
333
- property :filter, as: 'filter'
334
- end
335
- end
336
-
337
- class RequestLog
338
- # @private
339
- class Representation < Google::Apis::Core::JsonRepresentation
340
- property :version_id, as: 'versionId'
341
- property :module_id, as: 'moduleId'
342
- property :end_time, as: 'endTime'
343
- property :user_agent, as: 'userAgent'
344
- property :was_loading_request, as: 'wasLoadingRequest'
345
- collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2::SourceReference, decorator: Google::Apis::LoggingV2::SourceReference::Representation
346
-
347
- property :response_size, :numeric_string => true, as: 'responseSize'
348
- property :trace_id, as: 'traceId'
349
- collection :line, as: 'line', class: Google::Apis::LoggingV2::LogLine, decorator: Google::Apis::LoggingV2::LogLine::Representation
350
-
351
- property :task_queue_name, as: 'taskQueueName'
352
- property :referrer, as: 'referrer'
353
- property :request_id, as: 'requestId'
354
- property :nickname, as: 'nickname'
355
- property :pending_time, as: 'pendingTime'
356
- property :resource, as: 'resource'
357
- property :status, as: 'status'
358
- property :task_name, as: 'taskName'
359
- property :url_map_entry, as: 'urlMapEntry'
360
- property :instance_index, as: 'instanceIndex'
361
- property :finished, as: 'finished'
362
- property :host, as: 'host'
363
- property :http_version, as: 'httpVersion'
364
- property :start_time, as: 'startTime'
365
- property :latency, as: 'latency'
366
- property :ip, as: 'ip'
367
- property :app_id, as: 'appId'
368
- property :app_engine_release, as: 'appEngineRelease'
369
- property :method_prop, as: 'method'
370
- property :cost, as: 'cost'
371
- property :instance_id, as: 'instanceId'
372
- property :mega_cycles, :numeric_string => true, as: 'megaCycles'
373
- property :first, as: 'first'
374
- end
375
- end
376
-
377
- class ListMonitoredResourceDescriptorsResponse
378
- # @private
379
- class Representation < Google::Apis::Core::JsonRepresentation
380
- collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2::MonitoredResourceDescriptor::Representation
381
-
382
- property :next_page_token, as: 'nextPageToken'
383
- end
384
- end
385
-
386
- class SourceReference
387
- # @private
388
- class Representation < Google::Apis::Core::JsonRepresentation
389
- property :revision_id, as: 'revisionId'
390
- property :repository, as: 'repository'
391
- end
392
- end
393
-
394
- class WriteLogEntriesResponse
395
- # @private
396
- class Representation < Google::Apis::Core::JsonRepresentation
397
- end
398
- end
399
-
400
- class LogMetric
401
- # @private
402
- class Representation < Google::Apis::Core::JsonRepresentation
403
- property :name, as: 'name'
404
- property :description, as: 'description'
405
- property :version, as: 'version'
406
416
  property :filter, as: 'filter'
407
- end
408
- end
409
-
410
- class LogEntryOperation
411
- # @private
412
- class Representation < Google::Apis::Core::JsonRepresentation
413
- property :last, as: 'last'
414
- property :id, as: 'id'
415
- property :producer, as: 'producer'
416
- property :first, as: 'first'
417
+ collection :project_ids, as: 'projectIds'
417
418
  end
418
419
  end
419
420
  end
@@ -47,18 +47,19 @@ module Google
47
47
  @batch_path = 'batch'
48
48
  end
49
49
 
50
- # Deletes all the log entries in a log. The log reappears if it receives new
51
- # entries. Log entries written shortly before the delete operation might not be
52
- # deleted.
53
- # @param [String] log_name
54
- # Required. The resource name of the log to delete:
55
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
56
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
57
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
58
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
59
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
60
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
61
- # 2Factivity". For more information about log names, see LogEntry.
50
+ # Lists logs-based metrics.
51
+ # @param [String] parent
52
+ # Required. The name of the project containing the metrics:
53
+ # "projects/[PROJECT_ID]"
54
+ # @param [Fixnum] page_size
55
+ # Optional. The maximum number of results to return from this request. Non-
56
+ # positive values are ignored. The presence of nextPageToken in the response
57
+ # indicates that more results might be available.
58
+ # @param [String] page_token
59
+ # Optional. If present, then retrieve the next batch of results from the
60
+ # preceding call to this method. pageToken must be the value of nextPageToken
61
+ # from the previous response. The values of other method parameters should be
62
+ # identical to those in the previous call.
62
63
  # @param [String] fields
63
64
  # Selector specifying which fields to include in a partial response.
64
65
  # @param [String] quota_user
@@ -68,41 +69,100 @@ module Google
68
69
  # Request-specific options
69
70
  #
70
71
  # @yield [result, err] Result & error if block supplied
71
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
72
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
72
73
  # @yieldparam err [StandardError] error object if request failed
73
74
  #
74
- # @return [Google::Apis::LoggingV2::Empty]
75
+ # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
75
76
  #
76
77
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
78
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
79
  # @raise [Google::Apis::AuthorizationError] Authorization is required
79
- def delete_folder_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
80
- command = make_simple_command(:delete, 'v2/{+logName}', options)
81
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
82
- command.response_class = Google::Apis::LoggingV2::Empty
83
- command.params['logName'] = log_name unless log_name.nil?
80
+ def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
82
+ command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
83
+ command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
84
+ command.params['parent'] = parent unless parent.nil?
85
+ command.query['pageSize'] = page_size unless page_size.nil?
86
+ command.query['pageToken'] = page_token unless page_token.nil?
84
87
  command.query['fields'] = fields unless fields.nil?
85
88
  command.query['quotaUser'] = quota_user unless quota_user.nil?
86
89
  execute_or_queue_command(command, &block)
87
90
  end
88
91
 
89
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
90
- # logs that have entries are listed.
92
+ # Gets a logs-based metric.
93
+ # @param [String] metric_name
94
+ # The resource name of the desired metric:
95
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::LoggingV2::LogMetric]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:get, 'v2/{+metricName}', options)
115
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
116
+ command.response_class = Google::Apis::LoggingV2::LogMetric
117
+ command.params['metricName'] = metric_name unless metric_name.nil?
118
+ command.query['fields'] = fields unless fields.nil?
119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
120
+ execute_or_queue_command(command, &block)
121
+ end
122
+
123
+ # Creates or updates a logs-based metric.
124
+ # @param [String] metric_name
125
+ # The resource name of the metric to update:
126
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
127
+ # The updated metric must be provided in the request and it's name field must be
128
+ # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
129
+ # new metric is created.
130
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::LoggingV2::LogMetric]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:put, 'v2/{+metricName}', options)
150
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
151
+ command.request_object = log_metric_object
152
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
153
+ command.response_class = Google::Apis::LoggingV2::LogMetric
154
+ command.params['metricName'] = metric_name unless metric_name.nil?
155
+ command.query['fields'] = fields unless fields.nil?
156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
157
+ execute_or_queue_command(command, &block)
158
+ end
159
+
160
+ # Creates a logs-based metric.
91
161
  # @param [String] parent
92
- # Required. The resource name that owns the logs:
162
+ # The resource name of the project in which to create the metric:
93
163
  # "projects/[PROJECT_ID]"
94
- # "organizations/[ORGANIZATION_ID]"
95
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
96
- # "folders/[FOLDER_ID]"
97
- # @param [String] page_token
98
- # Optional. If present, then retrieve the next batch of results from the
99
- # preceding call to this method. pageToken must be the value of nextPageToken
100
- # from the previous response. The values of other method parameters should be
101
- # identical to those in the previous call.
102
- # @param [Fixnum] page_size
103
- # Optional. The maximum number of results to return from this request. Non-
104
- # positive values are ignored. The presence of nextPageToken in the response
105
- # indicates that more results might be available.
164
+ # The new metric must be provided in the request.
165
+ # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
106
166
  # @param [String] fields
107
167
  # Selector specifying which fields to include in a partial response.
108
168
  # @param [String] quota_user
@@ -112,36 +172,30 @@ module Google
112
172
  # Request-specific options
113
173
  #
114
174
  # @yield [result, err] Result & error if block supplied
115
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
175
+ # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
116
176
  # @yieldparam err [StandardError] error object if request failed
117
177
  #
118
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
178
+ # @return [Google::Apis::LoggingV2::LogMetric]
119
179
  #
120
180
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
121
181
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
122
182
  # @raise [Google::Apis::AuthorizationError] Authorization is required
123
- def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
124
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
125
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
126
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
183
+ def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
184
+ command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
185
+ command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
186
+ command.request_object = log_metric_object
187
+ command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
188
+ command.response_class = Google::Apis::LoggingV2::LogMetric
127
189
  command.params['parent'] = parent unless parent.nil?
128
- command.query['pageToken'] = page_token unless page_token.nil?
129
- command.query['pageSize'] = page_size unless page_size.nil?
130
190
  command.query['fields'] = fields unless fields.nil?
131
191
  command.query['quotaUser'] = quota_user unless quota_user.nil?
132
192
  execute_or_queue_command(command, &block)
133
193
  end
134
194
 
135
- # Deletes a sink. If the sink has a unique writer_identity, then that service
136
- # account is also deleted.
137
- # @param [String] sink_name
138
- # Required. The full resource name of the sink to delete, including the parent
139
- # resource and the sink identifier:
140
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
141
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
142
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
143
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
144
- # Example: "projects/my-project-id/sinks/my-sink-id".
195
+ # Deletes a logs-based metric.
196
+ # @param [String] metric_name
197
+ # The resource name of the metric to delete:
198
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
145
199
  # @param [String] fields
146
200
  # Selector specifying which fields to include in a partial response.
147
201
  # @param [String] quota_user
@@ -159,19 +213,20 @@ module Google
159
213
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
160
214
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
161
215
  # @raise [Google::Apis::AuthorizationError] Authorization is required
162
- def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
163
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
216
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
217
+ command = make_simple_command(:delete, 'v2/{+metricName}', options)
164
218
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
165
219
  command.response_class = Google::Apis::LoggingV2::Empty
166
- command.params['sinkName'] = sink_name unless sink_name.nil?
220
+ command.params['metricName'] = metric_name unless metric_name.nil?
167
221
  command.query['fields'] = fields unless fields.nil?
168
222
  command.query['quotaUser'] = quota_user unless quota_user.nil?
169
223
  execute_or_queue_command(command, &block)
170
224
  end
171
225
 
172
- # Lists sinks.
226
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
227
+ # logs that have entries are listed.
173
228
  # @param [String] parent
174
- # Required. The parent resource whose sinks are to be listed:
229
+ # Required. The resource name that owns the logs:
175
230
  # "projects/[PROJECT_ID]"
176
231
  # "organizations/[ORGANIZATION_ID]"
177
232
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
@@ -194,18 +249,18 @@ module Google
194
249
  # Request-specific options
195
250
  #
196
251
  # @yield [result, err] Result & error if block supplied
197
- # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
252
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
198
253
  # @yieldparam err [StandardError] error object if request failed
199
254
  #
200
- # @return [Google::Apis::LoggingV2::ListSinksResponse]
255
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
201
256
  #
202
257
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
203
258
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
204
259
  # @raise [Google::Apis::AuthorizationError] Authorization is required
205
- def list_folder_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
206
- command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
207
- command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
208
- command.response_class = Google::Apis::LoggingV2::ListSinksResponse
260
+ def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
261
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
262
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
263
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
209
264
  command.params['parent'] = parent unless parent.nil?
210
265
  command.query['pageToken'] = page_token unless page_token.nil?
211
266
  command.query['pageSize'] = page_size unless page_size.nil?
@@ -214,14 +269,18 @@ module Google
214
269
  execute_or_queue_command(command, &block)
215
270
  end
216
271
 
217
- # Gets a sink.
218
- # @param [String] sink_name
219
- # Required. The resource name of the sink:
220
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
221
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
222
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
223
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
224
- # Example: "projects/my-project-id/sinks/my-sink-id".
272
+ # Deletes all the log entries in a log. The log reappears if it receives new
273
+ # entries. Log entries written shortly before the delete operation might not be
274
+ # deleted.
275
+ # @param [String] log_name
276
+ # Required. The resource name of the log to delete:
277
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
278
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
279
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
280
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
281
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
282
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
283
+ # 2Factivity". For more information about log names, see LogEntry.
225
284
  # @param [String] fields
226
285
  # Selector specifying which fields to include in a partial response.
227
286
  # @param [String] quota_user
@@ -231,19 +290,19 @@ module Google
231
290
  # Request-specific options
232
291
  #
233
292
  # @yield [result, err] Result & error if block supplied
234
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
293
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
235
294
  # @yieldparam err [StandardError] error object if request failed
236
295
  #
237
- # @return [Google::Apis::LoggingV2::LogSink]
296
+ # @return [Google::Apis::LoggingV2::Empty]
238
297
  #
239
298
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
240
299
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
241
300
  # @raise [Google::Apis::AuthorizationError] Authorization is required
242
- def get_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
243
- command = make_simple_command(:get, 'v2/{+sinkName}', options)
244
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
245
- command.response_class = Google::Apis::LoggingV2::LogSink
246
- command.params['sinkName'] = sink_name unless sink_name.nil?
301
+ def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
302
+ command = make_simple_command(:delete, 'v2/{+logName}', options)
303
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
304
+ command.response_class = Google::Apis::LoggingV2::Empty
305
+ command.params['logName'] = log_name unless log_name.nil?
247
306
  command.query['fields'] = fields unless fields.nil?
248
307
  command.query['quotaUser'] = quota_user unless quota_user.nil?
249
308
  execute_or_queue_command(command, &block)
@@ -290,7 +349,7 @@ module Google
290
349
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
291
350
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
292
351
  # @raise [Google::Apis::AuthorizationError] Authorization is required
293
- def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
352
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
294
353
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
295
354
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
296
355
  command.request_object = log_sink_object
@@ -343,7 +402,7 @@ module Google
343
402
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
344
403
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
345
404
  # @raise [Google::Apis::AuthorizationError] Authorization is required
346
- def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
405
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
347
406
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
348
407
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
349
408
  command.request_object = log_sink_object
@@ -356,56 +415,16 @@ module Google
356
415
  execute_or_queue_command(command, &block)
357
416
  end
358
417
 
359
- # Lists the descriptors for monitored resource types used by Stackdriver Logging.
360
- # @param [String] page_token
361
- # Optional. If present, then retrieve the next batch of results from the
362
- # preceding call to this method. pageToken must be the value of nextPageToken
363
- # from the previous response. The values of other method parameters should be
364
- # identical to those in the previous call.
365
- # @param [Fixnum] page_size
366
- # Optional. The maximum number of results to return from this request. Non-
367
- # positive values are ignored. The presence of nextPageToken in the response
368
- # indicates that more results might be available.
369
- # @param [String] fields
370
- # Selector specifying which fields to include in a partial response.
371
- # @param [String] quota_user
372
- # Available to use for quota purposes for server-side applications. Can be any
373
- # arbitrary string assigned to a user, but should not exceed 40 characters.
374
- # @param [Google::Apis::RequestOptions] options
375
- # Request-specific options
376
- #
377
- # @yield [result, err] Result & error if block supplied
378
- # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
379
- # @yieldparam err [StandardError] error object if request failed
380
- #
381
- # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
382
- #
383
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
384
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
385
- # @raise [Google::Apis::AuthorizationError] Authorization is required
386
- def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
387
- command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
388
- command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
389
- command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
390
- command.query['pageToken'] = page_token unless page_token.nil?
391
- command.query['pageSize'] = page_size unless page_size.nil?
392
- command.query['fields'] = fields unless fields.nil?
393
- command.query['quotaUser'] = quota_user unless quota_user.nil?
394
- execute_or_queue_command(command, &block)
395
- end
396
-
397
- # Deletes all the log entries in a log. The log reappears if it receives new
398
- # entries. Log entries written shortly before the delete operation might not be
399
- # deleted.
400
- # @param [String] log_name
401
- # Required. The resource name of the log to delete:
402
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
403
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
404
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
405
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
406
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
407
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
408
- # 2Factivity". For more information about log names, see LogEntry.
418
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
419
+ # account is also deleted.
420
+ # @param [String] sink_name
421
+ # Required. The full resource name of the sink to delete, including the parent
422
+ # resource and the sink identifier:
423
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
424
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
425
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
426
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
427
+ # Example: "projects/my-project-id/sinks/my-sink-id".
409
428
  # @param [String] fields
410
429
  # Selector specifying which fields to include in a partial response.
411
430
  # @param [String] quota_user
@@ -423,20 +442,19 @@ module Google
423
442
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
424
443
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
425
444
  # @raise [Google::Apis::AuthorizationError] Authorization is required
426
- def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
427
- command = make_simple_command(:delete, 'v2/{+logName}', options)
445
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
446
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
428
447
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
429
448
  command.response_class = Google::Apis::LoggingV2::Empty
430
- command.params['logName'] = log_name unless log_name.nil?
449
+ command.params['sinkName'] = sink_name unless sink_name.nil?
431
450
  command.query['fields'] = fields unless fields.nil?
432
451
  command.query['quotaUser'] = quota_user unless quota_user.nil?
433
452
  execute_or_queue_command(command, &block)
434
453
  end
435
454
 
436
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
437
- # logs that have entries are listed.
455
+ # Lists sinks.
438
456
  # @param [String] parent
439
- # Required. The resource name that owns the logs:
457
+ # Required. The parent resource whose sinks are to be listed:
440
458
  # "projects/[PROJECT_ID]"
441
459
  # "organizations/[ORGANIZATION_ID]"
442
460
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
@@ -459,18 +477,18 @@ module Google
459
477
  # Request-specific options
460
478
  #
461
479
  # @yield [result, err] Result & error if block supplied
462
- # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
480
+ # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
463
481
  # @yieldparam err [StandardError] error object if request failed
464
482
  #
465
- # @return [Google::Apis::LoggingV2::ListLogsResponse]
483
+ # @return [Google::Apis::LoggingV2::ListSinksResponse]
466
484
  #
467
485
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
486
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
487
  # @raise [Google::Apis::AuthorizationError] Authorization is required
470
- def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
471
- command = make_simple_command(:get, 'v2/{+parent}/logs', options)
472
- command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
473
- command.response_class = Google::Apis::LoggingV2::ListLogsResponse
488
+ def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
489
+ command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
490
+ command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
491
+ command.response_class = Google::Apis::LoggingV2::ListSinksResponse
474
492
  command.params['parent'] = parent unless parent.nil?
475
493
  command.query['pageToken'] = page_token unless page_token.nil?
476
494
  command.query['pageSize'] = page_size unless page_size.nil?
@@ -479,30 +497,14 @@ module Google
479
497
  execute_or_queue_command(command, &block)
480
498
  end
481
499
 
482
- # Updates a sink. If the named sink doesn't exist, then this method is identical
483
- # to sinks.create. If the named sink does exist, then this method replaces the
484
- # following fields in the existing sink with values from the new sink:
485
- # destination, filter, output_version_format, start_time, and end_time. The
486
- # updated filter might also have a new writer_identity; see the
487
- # unique_writer_identity field.
500
+ # Gets a sink.
488
501
  # @param [String] sink_name
489
- # Required. The full resource name of the sink to update, including the parent
490
- # resource and the sink identifier:
502
+ # Required. The resource name of the sink:
491
503
  # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
492
504
  # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
493
505
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
494
506
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
495
507
  # Example: "projects/my-project-id/sinks/my-sink-id".
496
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
497
- # @param [Boolean] unique_writer_identity
498
- # Optional. See sinks.create for a description of this field. When updating a
499
- # sink, the effect of this field on the value of writer_identity in the updated
500
- # sink depends on both the old and new values of this field:
501
- # If the old and new values of this field are both false or both true, then
502
- # there is no change to the sink's writer_identity.
503
- # If the old value is false and the new value is true, then writer_identity is
504
- # changed to a unique service account.
505
- # It is an error if the old value is true and the new value is false.
506
508
  # @param [String] fields
507
509
  # Selector specifying which fields to include in a partial response.
508
510
  # @param [String] quota_user
@@ -520,42 +522,28 @@ module Google
520
522
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
521
523
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
522
524
  # @raise [Google::Apis::AuthorizationError] Authorization is required
523
- def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
524
- command = make_simple_command(:put, 'v2/{+sinkName}', options)
525
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
526
- command.request_object = log_sink_object
525
+ def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
526
+ command = make_simple_command(:get, 'v2/{+sinkName}', options)
527
527
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
528
528
  command.response_class = Google::Apis::LoggingV2::LogSink
529
529
  command.params['sinkName'] = sink_name unless sink_name.nil?
530
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
531
530
  command.query['fields'] = fields unless fields.nil?
532
531
  command.query['quotaUser'] = quota_user unless quota_user.nil?
533
532
  execute_or_queue_command(command, &block)
534
533
  end
535
534
 
536
- # Creates a sink that exports specified log entries to a destination. The export
537
- # of newly-ingested log entries begins immediately, unless the current time is
538
- # outside the sink's start and end times or the sink's writer_identity is not
539
- # permitted to write to the destination. A sink can export log entries only from
540
- # the resource owning the sink.
541
- # @param [String] parent
542
- # Required. The resource in which to create the sink:
543
- # "projects/[PROJECT_ID]"
544
- # "organizations/[ORGANIZATION_ID]"
545
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
546
- # "folders/[FOLDER_ID]"
547
- # Examples: "projects/my-logging-project", "organizations/123456789".
548
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
549
- # @param [Boolean] unique_writer_identity
550
- # Optional. Determines the kind of IAM identity returned as writer_identity in
551
- # the new sink. If this value is omitted or set to false, and if the sink's
552
- # parent is a project, then the value returned as writer_identity is the same
553
- # group or service account used by Stackdriver Logging before the addition of
554
- # writer identities to this API. The sink's destination must be in the same
555
- # project as the sink itself.If this field is set to true, or if the sink is
556
- # owned by a non-project resource such as an organization, then the value of
557
- # writer_identity will be a unique service account used only for exports from
558
- # the new sink. For more information, see writer_identity in LogSink.
535
+ # Deletes all the log entries in a log. The log reappears if it receives new
536
+ # entries. Log entries written shortly before the delete operation might not be
537
+ # deleted.
538
+ # @param [String] log_name
539
+ # Required. The resource name of the log to delete:
540
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
541
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
542
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
543
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
544
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
545
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
546
+ # 2Factivity". For more information about log names, see LogEntry.
559
547
  # @param [String] fields
560
548
  # Selector specifying which fields to include in a partial response.
561
549
  # @param [String] quota_user
@@ -565,37 +553,41 @@ module Google
565
553
  # Request-specific options
566
554
  #
567
555
  # @yield [result, err] Result & error if block supplied
568
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
556
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
569
557
  # @yieldparam err [StandardError] error object if request failed
570
558
  #
571
- # @return [Google::Apis::LoggingV2::LogSink]
559
+ # @return [Google::Apis::LoggingV2::Empty]
572
560
  #
573
561
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
574
562
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
575
563
  # @raise [Google::Apis::AuthorizationError] Authorization is required
576
- def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
577
- command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
578
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
579
- command.request_object = log_sink_object
580
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
581
- command.response_class = Google::Apis::LoggingV2::LogSink
582
- command.params['parent'] = parent unless parent.nil?
583
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
564
+ def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
565
+ command = make_simple_command(:delete, 'v2/{+logName}', options)
566
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
567
+ command.response_class = Google::Apis::LoggingV2::Empty
568
+ command.params['logName'] = log_name unless log_name.nil?
584
569
  command.query['fields'] = fields unless fields.nil?
585
570
  command.query['quotaUser'] = quota_user unless quota_user.nil?
586
571
  execute_or_queue_command(command, &block)
587
572
  end
588
573
 
589
- # Deletes a sink. If the sink has a unique writer_identity, then that service
590
- # account is also deleted.
591
- # @param [String] sink_name
592
- # Required. The full resource name of the sink to delete, including the parent
593
- # resource and the sink identifier:
594
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
595
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
596
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
597
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
598
- # Example: "projects/my-project-id/sinks/my-sink-id".
574
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
575
+ # logs that have entries are listed.
576
+ # @param [String] parent
577
+ # Required. The resource name that owns the logs:
578
+ # "projects/[PROJECT_ID]"
579
+ # "organizations/[ORGANIZATION_ID]"
580
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
581
+ # "folders/[FOLDER_ID]"
582
+ # @param [String] page_token
583
+ # Optional. If present, then retrieve the next batch of results from the
584
+ # preceding call to this method. pageToken must be the value of nextPageToken
585
+ # from the previous response. The values of other method parameters should be
586
+ # identical to those in the previous call.
587
+ # @param [Fixnum] page_size
588
+ # Optional. The maximum number of results to return from this request. Non-
589
+ # positive values are ignored. The presence of nextPageToken in the response
590
+ # indicates that more results might be available.
599
591
  # @param [String] fields
600
592
  # Selector specifying which fields to include in a partial response.
601
593
  # @param [String] quota_user
@@ -605,19 +597,21 @@ module Google
605
597
  # Request-specific options
606
598
  #
607
599
  # @yield [result, err] Result & error if block supplied
608
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
600
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object
609
601
  # @yieldparam err [StandardError] error object if request failed
610
602
  #
611
- # @return [Google::Apis::LoggingV2::Empty]
603
+ # @return [Google::Apis::LoggingV2::ListLogsResponse]
612
604
  #
613
605
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
614
606
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
615
607
  # @raise [Google::Apis::AuthorizationError] Authorization is required
616
- def delete_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
617
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
618
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
619
- command.response_class = Google::Apis::LoggingV2::Empty
620
- command.params['sinkName'] = sink_name unless sink_name.nil?
608
+ def list_billing_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
609
+ command = make_simple_command(:get, 'v2/{+parent}/logs', options)
610
+ command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
611
+ command.response_class = Google::Apis::LoggingV2::ListLogsResponse
612
+ command.params['parent'] = parent unless parent.nil?
613
+ command.query['pageToken'] = page_token unless page_token.nil?
614
+ command.query['pageSize'] = page_size unless page_size.nil?
621
615
  command.query['fields'] = fields unless fields.nil?
622
616
  command.query['quotaUser'] = quota_user unless quota_user.nil?
623
617
  execute_or_queue_command(command, &block)
@@ -630,15 +624,15 @@ module Google
630
624
  # "organizations/[ORGANIZATION_ID]"
631
625
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
632
626
  # "folders/[FOLDER_ID]"
633
- # @param [Fixnum] page_size
634
- # Optional. The maximum number of results to return from this request. Non-
635
- # positive values are ignored. The presence of nextPageToken in the response
636
- # indicates that more results might be available.
637
627
  # @param [String] page_token
638
628
  # Optional. If present, then retrieve the next batch of results from the
639
629
  # preceding call to this method. pageToken must be the value of nextPageToken
640
630
  # from the previous response. The values of other method parameters should be
641
631
  # identical to those in the previous call.
632
+ # @param [Fixnum] page_size
633
+ # Optional. The maximum number of results to return from this request. Non-
634
+ # positive values are ignored. The presence of nextPageToken in the response
635
+ # indicates that more results might be available.
642
636
  # @param [String] fields
643
637
  # Selector specifying which fields to include in a partial response.
644
638
  # @param [String] quota_user
@@ -656,26 +650,77 @@ module Google
656
650
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
657
651
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
658
652
  # @raise [Google::Apis::AuthorizationError] Authorization is required
659
- def list_organization_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
653
+ def list_billing_account_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
660
654
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
661
655
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
662
656
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
663
657
  command.params['parent'] = parent unless parent.nil?
664
- command.query['pageSize'] = page_size unless page_size.nil?
665
658
  command.query['pageToken'] = page_token unless page_token.nil?
659
+ command.query['pageSize'] = page_size unless page_size.nil?
660
+ command.query['fields'] = fields unless fields.nil?
661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
662
+ execute_or_queue_command(command, &block)
663
+ end
664
+
665
+ # Gets a sink.
666
+ # @param [String] sink_name
667
+ # Required. The resource name of the sink:
668
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
669
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
670
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
671
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
672
+ # Example: "projects/my-project-id/sinks/my-sink-id".
673
+ # @param [String] fields
674
+ # Selector specifying which fields to include in a partial response.
675
+ # @param [String] quota_user
676
+ # Available to use for quota purposes for server-side applications. Can be any
677
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
678
+ # @param [Google::Apis::RequestOptions] options
679
+ # Request-specific options
680
+ #
681
+ # @yield [result, err] Result & error if block supplied
682
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
683
+ # @yieldparam err [StandardError] error object if request failed
684
+ #
685
+ # @return [Google::Apis::LoggingV2::LogSink]
686
+ #
687
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
688
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
689
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
690
+ def get_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
691
+ command = make_simple_command(:get, 'v2/{+sinkName}', options)
692
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
693
+ command.response_class = Google::Apis::LoggingV2::LogSink
694
+ command.params['sinkName'] = sink_name unless sink_name.nil?
666
695
  command.query['fields'] = fields unless fields.nil?
667
696
  command.query['quotaUser'] = quota_user unless quota_user.nil?
668
697
  execute_or_queue_command(command, &block)
669
698
  end
670
699
 
671
- # Gets a sink.
700
+ # Updates a sink. If the named sink doesn't exist, then this method is identical
701
+ # to sinks.create. If the named sink does exist, then this method replaces the
702
+ # following fields in the existing sink with values from the new sink:
703
+ # destination, filter, output_version_format, start_time, and end_time. The
704
+ # updated filter might also have a new writer_identity; see the
705
+ # unique_writer_identity field.
672
706
  # @param [String] sink_name
673
- # Required. The resource name of the sink:
707
+ # Required. The full resource name of the sink to update, including the parent
708
+ # resource and the sink identifier:
674
709
  # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
675
710
  # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
676
711
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
677
712
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
678
713
  # Example: "projects/my-project-id/sinks/my-sink-id".
714
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
715
+ # @param [Boolean] unique_writer_identity
716
+ # Optional. See sinks.create for a description of this field. When updating a
717
+ # sink, the effect of this field on the value of writer_identity in the updated
718
+ # sink depends on both the old and new values of this field:
719
+ # If the old and new values of this field are both false or both true, then
720
+ # there is no change to the sink's writer_identity.
721
+ # If the old value is false and the new value is true, then writer_identity is
722
+ # changed to a unique service account.
723
+ # It is an error if the old value is true and the new value is false.
679
724
  # @param [String] fields
680
725
  # Selector specifying which fields to include in a partial response.
681
726
  # @param [String] quota_user
@@ -693,19 +738,42 @@ module Google
693
738
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
694
739
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
695
740
  # @raise [Google::Apis::AuthorizationError] Authorization is required
696
- def get_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
697
- command = make_simple_command(:get, 'v2/{+sinkName}', options)
741
+ def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
742
+ command = make_simple_command(:put, 'v2/{+sinkName}', options)
743
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
744
+ command.request_object = log_sink_object
698
745
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
699
746
  command.response_class = Google::Apis::LoggingV2::LogSink
700
747
  command.params['sinkName'] = sink_name unless sink_name.nil?
748
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
701
749
  command.query['fields'] = fields unless fields.nil?
702
750
  command.query['quotaUser'] = quota_user unless quota_user.nil?
703
751
  execute_or_queue_command(command, &block)
704
752
  end
705
753
 
706
- # Lists log entries. Use this method to retrieve log entries from Stackdriver
707
- # Logging. For ways to export log entries, see Exporting Logs.
708
- # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
754
+ # Creates a sink that exports specified log entries to a destination. The export
755
+ # of newly-ingested log entries begins immediately, unless the current time is
756
+ # outside the sink's start and end times or the sink's writer_identity is not
757
+ # permitted to write to the destination. A sink can export log entries only from
758
+ # the resource owning the sink.
759
+ # @param [String] parent
760
+ # Required. The resource in which to create the sink:
761
+ # "projects/[PROJECT_ID]"
762
+ # "organizations/[ORGANIZATION_ID]"
763
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
764
+ # "folders/[FOLDER_ID]"
765
+ # Examples: "projects/my-logging-project", "organizations/123456789".
766
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
767
+ # @param [Boolean] unique_writer_identity
768
+ # Optional. Determines the kind of IAM identity returned as writer_identity in
769
+ # the new sink. If this value is omitted or set to false, and if the sink's
770
+ # parent is a project, then the value returned as writer_identity is the same
771
+ # group or service account used by Stackdriver Logging before the addition of
772
+ # writer identities to this API. The sink's destination must be in the same
773
+ # project as the sink itself.If this field is set to true, or if the sink is
774
+ # owned by a non-project resource such as an organization, then the value of
775
+ # writer_identity will be a unique service account used only for exports from
776
+ # the new sink. For more information, see writer_identity in LogSink.
709
777
  # @param [String] fields
710
778
  # Selector specifying which fields to include in a partial response.
711
779
  # @param [String] quota_user
@@ -715,27 +783,37 @@ module Google
715
783
  # Request-specific options
716
784
  #
717
785
  # @yield [result, err] Result & error if block supplied
718
- # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
786
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
719
787
  # @yieldparam err [StandardError] error object if request failed
720
788
  #
721
- # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
789
+ # @return [Google::Apis::LoggingV2::LogSink]
722
790
  #
723
791
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
724
792
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
725
793
  # @raise [Google::Apis::AuthorizationError] Authorization is required
726
- def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
727
- command = make_simple_command(:post, 'v2/entries:list', options)
728
- command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
729
- command.request_object = list_log_entries_request_object
730
- command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
731
- command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
794
+ def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
795
+ command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
796
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
797
+ command.request_object = log_sink_object
798
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
799
+ command.response_class = Google::Apis::LoggingV2::LogSink
800
+ command.params['parent'] = parent unless parent.nil?
801
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
732
802
  command.query['fields'] = fields unless fields.nil?
733
803
  command.query['quotaUser'] = quota_user unless quota_user.nil?
734
804
  execute_or_queue_command(command, &block)
735
805
  end
736
806
 
737
- # Writes log entries to Stackdriver Logging.
738
- # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
807
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
808
+ # account is also deleted.
809
+ # @param [String] sink_name
810
+ # Required. The full resource name of the sink to delete, including the parent
811
+ # resource and the sink identifier:
812
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
813
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
814
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
815
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
816
+ # Example: "projects/my-project-id/sinks/my-sink-id".
739
817
  # @param [String] fields
740
818
  # Selector specifying which fields to include in a partial response.
741
819
  # @param [String] quota_user
@@ -745,20 +823,19 @@ module Google
745
823
  # Request-specific options
746
824
  #
747
825
  # @yield [result, err] Result & error if block supplied
748
- # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
826
+ # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
749
827
  # @yieldparam err [StandardError] error object if request failed
750
828
  #
751
- # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
829
+ # @return [Google::Apis::LoggingV2::Empty]
752
830
  #
753
831
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
754
832
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
755
833
  # @raise [Google::Apis::AuthorizationError] Authorization is required
756
- def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
757
- command = make_simple_command(:post, 'v2/entries:write', options)
758
- command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
759
- command.request_object = write_log_entries_request_object
760
- command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
761
- command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
834
+ def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
835
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
836
+ command.response_representation = Google::Apis::LoggingV2::Empty::Representation
837
+ command.response_class = Google::Apis::LoggingV2::Empty
838
+ command.params['sinkName'] = sink_name unless sink_name.nil?
762
839
  command.query['fields'] = fields unless fields.nil?
763
840
  command.query['quotaUser'] = quota_user unless quota_user.nil?
764
841
  execute_or_queue_command(command, &block)
@@ -793,7 +870,7 @@ module Google
793
870
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
794
871
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
795
872
  # @raise [Google::Apis::AuthorizationError] Authorization is required
796
- def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
873
+ def delete_folder_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
797
874
  command = make_simple_command(:delete, 'v2/{+logName}', options)
798
875
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
799
876
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -837,7 +914,7 @@ module Google
837
914
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
838
915
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
839
916
  # @raise [Google::Apis::AuthorizationError] Authorization is required
840
- def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
917
+ def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
841
918
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
842
919
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
843
920
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
@@ -849,123 +926,6 @@ module Google
849
926
  execute_or_queue_command(command, &block)
850
927
  end
851
928
 
852
- # Deletes a sink. If the sink has a unique writer_identity, then that service
853
- # account is also deleted.
854
- # @param [String] sink_name
855
- # Required. The full resource name of the sink to delete, including the parent
856
- # resource and the sink identifier:
857
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
858
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
859
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
860
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
861
- # Example: "projects/my-project-id/sinks/my-sink-id".
862
- # @param [String] fields
863
- # Selector specifying which fields to include in a partial response.
864
- # @param [String] quota_user
865
- # Available to use for quota purposes for server-side applications. Can be any
866
- # arbitrary string assigned to a user, but should not exceed 40 characters.
867
- # @param [Google::Apis::RequestOptions] options
868
- # Request-specific options
869
- #
870
- # @yield [result, err] Result & error if block supplied
871
- # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object
872
- # @yieldparam err [StandardError] error object if request failed
873
- #
874
- # @return [Google::Apis::LoggingV2::Empty]
875
- #
876
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
877
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
878
- # @raise [Google::Apis::AuthorizationError] Authorization is required
879
- def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
880
- command = make_simple_command(:delete, 'v2/{+sinkName}', options)
881
- command.response_representation = Google::Apis::LoggingV2::Empty::Representation
882
- command.response_class = Google::Apis::LoggingV2::Empty
883
- command.params['sinkName'] = sink_name unless sink_name.nil?
884
- command.query['fields'] = fields unless fields.nil?
885
- command.query['quotaUser'] = quota_user unless quota_user.nil?
886
- execute_or_queue_command(command, &block)
887
- end
888
-
889
- # Lists sinks.
890
- # @param [String] parent
891
- # Required. The parent resource whose sinks are to be listed:
892
- # "projects/[PROJECT_ID]"
893
- # "organizations/[ORGANIZATION_ID]"
894
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
895
- # "folders/[FOLDER_ID]"
896
- # @param [String] page_token
897
- # Optional. If present, then retrieve the next batch of results from the
898
- # preceding call to this method. pageToken must be the value of nextPageToken
899
- # from the previous response. The values of other method parameters should be
900
- # identical to those in the previous call.
901
- # @param [Fixnum] page_size
902
- # Optional. The maximum number of results to return from this request. Non-
903
- # positive values are ignored. The presence of nextPageToken in the response
904
- # indicates that more results might be available.
905
- # @param [String] fields
906
- # Selector specifying which fields to include in a partial response.
907
- # @param [String] quota_user
908
- # Available to use for quota purposes for server-side applications. Can be any
909
- # arbitrary string assigned to a user, but should not exceed 40 characters.
910
- # @param [Google::Apis::RequestOptions] options
911
- # Request-specific options
912
- #
913
- # @yield [result, err] Result & error if block supplied
914
- # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
915
- # @yieldparam err [StandardError] error object if request failed
916
- #
917
- # @return [Google::Apis::LoggingV2::ListSinksResponse]
918
- #
919
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
920
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
921
- # @raise [Google::Apis::AuthorizationError] Authorization is required
922
- def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
923
- command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
924
- command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
925
- command.response_class = Google::Apis::LoggingV2::ListSinksResponse
926
- command.params['parent'] = parent unless parent.nil?
927
- command.query['pageToken'] = page_token unless page_token.nil?
928
- command.query['pageSize'] = page_size unless page_size.nil?
929
- command.query['fields'] = fields unless fields.nil?
930
- command.query['quotaUser'] = quota_user unless quota_user.nil?
931
- execute_or_queue_command(command, &block)
932
- end
933
-
934
- # Gets a sink.
935
- # @param [String] sink_name
936
- # Required. The resource name of the sink:
937
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
938
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
939
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
940
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
941
- # Example: "projects/my-project-id/sinks/my-sink-id".
942
- # @param [String] fields
943
- # Selector specifying which fields to include in a partial response.
944
- # @param [String] quota_user
945
- # Available to use for quota purposes for server-side applications. Can be any
946
- # arbitrary string assigned to a user, but should not exceed 40 characters.
947
- # @param [Google::Apis::RequestOptions] options
948
- # Request-specific options
949
- #
950
- # @yield [result, err] Result & error if block supplied
951
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
952
- # @yieldparam err [StandardError] error object if request failed
953
- #
954
- # @return [Google::Apis::LoggingV2::LogSink]
955
- #
956
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
957
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
958
- # @raise [Google::Apis::AuthorizationError] Authorization is required
959
- def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
960
- command = make_simple_command(:get, 'v2/{+sinkName}', options)
961
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
962
- command.response_class = Google::Apis::LoggingV2::LogSink
963
- command.params['sinkName'] = sink_name unless sink_name.nil?
964
- command.query['fields'] = fields unless fields.nil?
965
- command.query['quotaUser'] = quota_user unless quota_user.nil?
966
- execute_or_queue_command(command, &block)
967
- end
968
-
969
929
  # Updates a sink. If the named sink doesn't exist, then this method is identical
970
930
  # to sinks.create. If the named sink does exist, then this method replaces the
971
931
  # following fields in the existing sink with values from the new sink:
@@ -1007,7 +967,7 @@ module Google
1007
967
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1008
968
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1009
969
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1010
- def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
970
+ def update_folder_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1011
971
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
1012
972
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1013
973
  command.request_object = log_sink_object
@@ -1060,7 +1020,7 @@ module Google
1060
1020
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1061
1021
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1062
1022
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1063
- def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1023
+ def create_folder_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1064
1024
  command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1065
1025
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1066
1026
  command.request_object = log_sink_object
@@ -1073,10 +1033,16 @@ module Google
1073
1033
  execute_or_queue_command(command, &block)
1074
1034
  end
1075
1035
 
1076
- # Deletes a logs-based metric.
1077
- # @param [String] metric_name
1078
- # The resource name of the metric to delete:
1079
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1036
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
1037
+ # account is also deleted.
1038
+ # @param [String] sink_name
1039
+ # Required. The full resource name of the sink to delete, including the parent
1040
+ # resource and the sink identifier:
1041
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1042
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1043
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1044
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1045
+ # Example: "projects/my-project-id/sinks/my-sink-id".
1080
1046
  # @param [String] fields
1081
1047
  # Selector specifying which fields to include in a partial response.
1082
1048
  # @param [String] quota_user
@@ -1094,20 +1060,23 @@ module Google
1094
1060
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1095
1061
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1096
1062
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1097
- def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
1098
- command = make_simple_command(:delete, 'v2/{+metricName}', options)
1063
+ def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1064
+ command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1099
1065
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1100
1066
  command.response_class = Google::Apis::LoggingV2::Empty
1101
- command.params['metricName'] = metric_name unless metric_name.nil?
1067
+ command.params['sinkName'] = sink_name unless sink_name.nil?
1102
1068
  command.query['fields'] = fields unless fields.nil?
1103
1069
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1104
1070
  execute_or_queue_command(command, &block)
1105
1071
  end
1106
1072
 
1107
- # Lists logs-based metrics.
1073
+ # Lists sinks.
1108
1074
  # @param [String] parent
1109
- # Required. The name of the project containing the metrics:
1075
+ # Required. The parent resource whose sinks are to be listed:
1110
1076
  # "projects/[PROJECT_ID]"
1077
+ # "organizations/[ORGANIZATION_ID]"
1078
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
1079
+ # "folders/[FOLDER_ID]"
1111
1080
  # @param [String] page_token
1112
1081
  # Optional. If present, then retrieve the next batch of results from the
1113
1082
  # preceding call to this method. pageToken must be the value of nextPageToken
@@ -1126,18 +1095,18 @@ module Google
1126
1095
  # Request-specific options
1127
1096
  #
1128
1097
  # @yield [result, err] Result & error if block supplied
1129
- # @yieldparam result [Google::Apis::LoggingV2::ListLogMetricsResponse] parsed result object
1098
+ # @yieldparam result [Google::Apis::LoggingV2::ListSinksResponse] parsed result object
1130
1099
  # @yieldparam err [StandardError] error object if request failed
1131
1100
  #
1132
- # @return [Google::Apis::LoggingV2::ListLogMetricsResponse]
1101
+ # @return [Google::Apis::LoggingV2::ListSinksResponse]
1133
1102
  #
1134
1103
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1135
1104
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1136
1105
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1137
- def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1138
- command = make_simple_command(:get, 'v2/{+parent}/metrics', options)
1139
- command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation
1140
- command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse
1106
+ def list_folder_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1107
+ command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1108
+ command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1109
+ command.response_class = Google::Apis::LoggingV2::ListSinksResponse
1141
1110
  command.params['parent'] = parent unless parent.nil?
1142
1111
  command.query['pageToken'] = page_token unless page_token.nil?
1143
1112
  command.query['pageSize'] = page_size unless page_size.nil?
@@ -1146,45 +1115,14 @@ module Google
1146
1115
  execute_or_queue_command(command, &block)
1147
1116
  end
1148
1117
 
1149
- # Gets a logs-based metric.
1150
- # @param [String] metric_name
1151
- # The resource name of the desired metric:
1152
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1153
- # @param [String] fields
1154
- # Selector specifying which fields to include in a partial response.
1155
- # @param [String] quota_user
1156
- # Available to use for quota purposes for server-side applications. Can be any
1157
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1158
- # @param [Google::Apis::RequestOptions] options
1159
- # Request-specific options
1160
- #
1161
- # @yield [result, err] Result & error if block supplied
1162
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1163
- # @yieldparam err [StandardError] error object if request failed
1164
- #
1165
- # @return [Google::Apis::LoggingV2::LogMetric]
1166
- #
1167
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1168
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1169
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1170
- def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
1171
- command = make_simple_command(:get, 'v2/{+metricName}', options)
1172
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1173
- command.response_class = Google::Apis::LoggingV2::LogMetric
1174
- command.params['metricName'] = metric_name unless metric_name.nil?
1175
- command.query['fields'] = fields unless fields.nil?
1176
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1177
- execute_or_queue_command(command, &block)
1178
- end
1179
-
1180
- # Creates or updates a logs-based metric.
1181
- # @param [String] metric_name
1182
- # The resource name of the metric to update:
1183
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
1184
- # The updated metric must be provided in the request and it's name field must be
1185
- # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
1186
- # new metric is created.
1187
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1118
+ # Gets a sink.
1119
+ # @param [String] sink_name
1120
+ # Required. The resource name of the sink:
1121
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
1122
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
1123
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
1124
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
1125
+ # Example: "projects/my-project-id/sinks/my-sink-id".
1188
1126
  # @param [String] fields
1189
1127
  # Selector specifying which fields to include in a partial response.
1190
1128
  # @param [String] quota_user
@@ -1194,32 +1132,34 @@ module Google
1194
1132
  # Request-specific options
1195
1133
  #
1196
1134
  # @yield [result, err] Result & error if block supplied
1197
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1135
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1198
1136
  # @yieldparam err [StandardError] error object if request failed
1199
1137
  #
1200
- # @return [Google::Apis::LoggingV2::LogMetric]
1138
+ # @return [Google::Apis::LoggingV2::LogSink]
1201
1139
  #
1202
1140
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1203
1141
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1204
1142
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1205
- def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1206
- command = make_simple_command(:put, 'v2/{+metricName}', options)
1207
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1208
- command.request_object = log_metric_object
1209
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1210
- command.response_class = Google::Apis::LoggingV2::LogMetric
1211
- command.params['metricName'] = metric_name unless metric_name.nil?
1143
+ def get_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1144
+ command = make_simple_command(:get, 'v2/{+sinkName}', options)
1145
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1146
+ command.response_class = Google::Apis::LoggingV2::LogSink
1147
+ command.params['sinkName'] = sink_name unless sink_name.nil?
1212
1148
  command.query['fields'] = fields unless fields.nil?
1213
1149
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1214
1150
  execute_or_queue_command(command, &block)
1215
1151
  end
1216
1152
 
1217
- # Creates a logs-based metric.
1218
- # @param [String] parent
1219
- # The resource name of the project in which to create the metric:
1220
- # "projects/[PROJECT_ID]"
1221
- # The new metric must be provided in the request.
1222
- # @param [Google::Apis::LoggingV2::LogMetric] log_metric_object
1153
+ # Lists the descriptors for monitored resource types used by Stackdriver Logging.
1154
+ # @param [String] page_token
1155
+ # Optional. If present, then retrieve the next batch of results from the
1156
+ # preceding call to this method. pageToken must be the value of nextPageToken
1157
+ # from the previous response. The values of other method parameters should be
1158
+ # identical to those in the previous call.
1159
+ # @param [Fixnum] page_size
1160
+ # Optional. The maximum number of results to return from this request. Non-
1161
+ # positive values are ignored. The presence of nextPageToken in the response
1162
+ # indicates that more results might be available.
1223
1163
  # @param [String] fields
1224
1164
  # Selector specifying which fields to include in a partial response.
1225
1165
  # @param [String] quota_user
@@ -1229,21 +1169,20 @@ module Google
1229
1169
  # Request-specific options
1230
1170
  #
1231
1171
  # @yield [result, err] Result & error if block supplied
1232
- # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object
1172
+ # @yieldparam result [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse] parsed result object
1233
1173
  # @yieldparam err [StandardError] error object if request failed
1234
1174
  #
1235
- # @return [Google::Apis::LoggingV2::LogMetric]
1175
+ # @return [Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse]
1236
1176
  #
1237
1177
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1238
1178
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1239
1179
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1240
- def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1241
- command = make_simple_command(:post, 'v2/{+parent}/metrics', options)
1242
- command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation
1243
- command.request_object = log_metric_object
1244
- command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation
1245
- command.response_class = Google::Apis::LoggingV2::LogMetric
1246
- command.params['parent'] = parent unless parent.nil?
1180
+ def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1181
+ command = make_simple_command(:get, 'v2/monitoredResourceDescriptors', options)
1182
+ command.response_representation = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse::Representation
1183
+ command.response_class = Google::Apis::LoggingV2::ListMonitoredResourceDescriptorsResponse
1184
+ command.query['pageToken'] = page_token unless page_token.nil?
1185
+ command.query['pageSize'] = page_size unless page_size.nil?
1247
1186
  command.query['fields'] = fields unless fields.nil?
1248
1187
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1249
1188
  execute_or_queue_command(command, &block)
@@ -1278,7 +1217,7 @@ module Google
1278
1217
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1279
1218
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1280
1219
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1281
- def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
1220
+ def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
1282
1221
  command = make_simple_command(:delete, 'v2/{+logName}', options)
1283
1222
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1284
1223
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -1296,15 +1235,15 @@ module Google
1296
1235
  # "organizations/[ORGANIZATION_ID]"
1297
1236
  # "billingAccounts/[BILLING_ACCOUNT_ID]"
1298
1237
  # "folders/[FOLDER_ID]"
1299
- # @param [Fixnum] page_size
1300
- # Optional. The maximum number of results to return from this request. Non-
1301
- # positive values are ignored. The presence of nextPageToken in the response
1302
- # indicates that more results might be available.
1303
1238
  # @param [String] page_token
1304
1239
  # Optional. If present, then retrieve the next batch of results from the
1305
1240
  # preceding call to this method. pageToken must be the value of nextPageToken
1306
1241
  # from the previous response. The values of other method parameters should be
1307
1242
  # identical to those in the previous call.
1243
+ # @param [Fixnum] page_size
1244
+ # Optional. The maximum number of results to return from this request. Non-
1245
+ # positive values are ignored. The presence of nextPageToken in the response
1246
+ # indicates that more results might be available.
1308
1247
  # @param [String] fields
1309
1248
  # Selector specifying which fields to include in a partial response.
1310
1249
  # @param [String] quota_user
@@ -1322,13 +1261,66 @@ module Google
1322
1261
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1323
1262
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1324
1263
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1325
- def list_billing_account_logs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1264
+ def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1326
1265
  command = make_simple_command(:get, 'v2/{+parent}/logs', options)
1327
1266
  command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation
1328
1267
  command.response_class = Google::Apis::LoggingV2::ListLogsResponse
1329
1268
  command.params['parent'] = parent unless parent.nil?
1330
- command.query['pageSize'] = page_size unless page_size.nil?
1331
1269
  command.query['pageToken'] = page_token unless page_token.nil?
1270
+ command.query['pageSize'] = page_size unless page_size.nil?
1271
+ command.query['fields'] = fields unless fields.nil?
1272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
+ execute_or_queue_command(command, &block)
1274
+ end
1275
+
1276
+ # Creates a sink that exports specified log entries to a destination. The export
1277
+ # of newly-ingested log entries begins immediately, unless the current time is
1278
+ # outside the sink's start and end times or the sink's writer_identity is not
1279
+ # permitted to write to the destination. A sink can export log entries only from
1280
+ # the resource owning the sink.
1281
+ # @param [String] parent
1282
+ # Required. The resource in which to create the sink:
1283
+ # "projects/[PROJECT_ID]"
1284
+ # "organizations/[ORGANIZATION_ID]"
1285
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
1286
+ # "folders/[FOLDER_ID]"
1287
+ # Examples: "projects/my-logging-project", "organizations/123456789".
1288
+ # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
1289
+ # @param [Boolean] unique_writer_identity
1290
+ # Optional. Determines the kind of IAM identity returned as writer_identity in
1291
+ # the new sink. If this value is omitted or set to false, and if the sink's
1292
+ # parent is a project, then the value returned as writer_identity is the same
1293
+ # group or service account used by Stackdriver Logging before the addition of
1294
+ # writer identities to this API. The sink's destination must be in the same
1295
+ # project as the sink itself.If this field is set to true, or if the sink is
1296
+ # owned by a non-project resource such as an organization, then the value of
1297
+ # writer_identity will be a unique service account used only for exports from
1298
+ # the new sink. For more information, see writer_identity in LogSink.
1299
+ # @param [String] fields
1300
+ # Selector specifying which fields to include in a partial response.
1301
+ # @param [String] quota_user
1302
+ # Available to use for quota purposes for server-side applications. Can be any
1303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1304
+ # @param [Google::Apis::RequestOptions] options
1305
+ # Request-specific options
1306
+ #
1307
+ # @yield [result, err] Result & error if block supplied
1308
+ # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1309
+ # @yieldparam err [StandardError] error object if request failed
1310
+ #
1311
+ # @return [Google::Apis::LoggingV2::LogSink]
1312
+ #
1313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1316
+ def create_organization_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1317
+ command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1318
+ command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1319
+ command.request_object = log_sink_object
1320
+ command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1321
+ command.response_class = Google::Apis::LoggingV2::LogSink
1322
+ command.params['parent'] = parent unless parent.nil?
1323
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1332
1324
  command.query['fields'] = fields unless fields.nil?
1333
1325
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1334
1326
  execute_or_queue_command(command, &block)
@@ -1361,7 +1353,7 @@ module Google
1361
1353
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1362
1354
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1363
1355
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1364
- def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1356
+ def delete_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1365
1357
  command = make_simple_command(:delete, 'v2/{+sinkName}', options)
1366
1358
  command.response_representation = Google::Apis::LoggingV2::Empty::Representation
1367
1359
  command.response_class = Google::Apis::LoggingV2::Empty
@@ -1404,7 +1396,7 @@ module Google
1404
1396
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1405
1397
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1406
1398
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1407
- def list_billing_account_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1399
+ def list_organization_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1408
1400
  command = make_simple_command(:get, 'v2/{+parent}/sinks', options)
1409
1401
  command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation
1410
1402
  command.response_class = Google::Apis::LoggingV2::ListSinksResponse
@@ -1441,7 +1433,7 @@ module Google
1441
1433
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1442
1434
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1443
1435
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1444
- def get_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1436
+ def get_organization_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
1445
1437
  command = make_simple_command(:get, 'v2/{+sinkName}', options)
1446
1438
  command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1447
1439
  command.response_class = Google::Apis::LoggingV2::LogSink
@@ -1492,7 +1484,7 @@ module Google
1492
1484
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1493
1485
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1494
1486
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1495
- def update_billing_account_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1487
+ def update_organization_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1496
1488
  command = make_simple_command(:put, 'v2/{+sinkName}', options)
1497
1489
  command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1498
1490
  command.request_object = log_sink_object
@@ -1505,29 +1497,9 @@ module Google
1505
1497
  execute_or_queue_command(command, &block)
1506
1498
  end
1507
1499
 
1508
- # Creates a sink that exports specified log entries to a destination. The export
1509
- # of newly-ingested log entries begins immediately, unless the current time is
1510
- # outside the sink's start and end times or the sink's writer_identity is not
1511
- # permitted to write to the destination. A sink can export log entries only from
1512
- # the resource owning the sink.
1513
- # @param [String] parent
1514
- # Required. The resource in which to create the sink:
1515
- # "projects/[PROJECT_ID]"
1516
- # "organizations/[ORGANIZATION_ID]"
1517
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
1518
- # "folders/[FOLDER_ID]"
1519
- # Examples: "projects/my-logging-project", "organizations/123456789".
1520
- # @param [Google::Apis::LoggingV2::LogSink] log_sink_object
1521
- # @param [Boolean] unique_writer_identity
1522
- # Optional. Determines the kind of IAM identity returned as writer_identity in
1523
- # the new sink. If this value is omitted or set to false, and if the sink's
1524
- # parent is a project, then the value returned as writer_identity is the same
1525
- # group or service account used by Stackdriver Logging before the addition of
1526
- # writer identities to this API. The sink's destination must be in the same
1527
- # project as the sink itself.If this field is set to true, or if the sink is
1528
- # owned by a non-project resource such as an organization, then the value of
1529
- # writer_identity will be a unique service account used only for exports from
1530
- # the new sink. For more information, see writer_identity in LogSink.
1500
+ # Lists log entries. Use this method to retrieve log entries from Stackdriver
1501
+ # Logging. For ways to export log entries, see Exporting Logs.
1502
+ # @param [Google::Apis::LoggingV2::ListLogEntriesRequest] list_log_entries_request_object
1531
1503
  # @param [String] fields
1532
1504
  # Selector specifying which fields to include in a partial response.
1533
1505
  # @param [String] quota_user
@@ -1537,22 +1509,50 @@ module Google
1537
1509
  # Request-specific options
1538
1510
  #
1539
1511
  # @yield [result, err] Result & error if block supplied
1540
- # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object
1512
+ # @yieldparam result [Google::Apis::LoggingV2::ListLogEntriesResponse] parsed result object
1541
1513
  # @yieldparam err [StandardError] error object if request failed
1542
1514
  #
1543
- # @return [Google::Apis::LoggingV2::LogSink]
1515
+ # @return [Google::Apis::LoggingV2::ListLogEntriesResponse]
1544
1516
  #
1545
1517
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1546
1518
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1547
1519
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1548
- def create_billing_account_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
1549
- command = make_simple_command(:post, 'v2/{+parent}/sinks', options)
1550
- command.request_representation = Google::Apis::LoggingV2::LogSink::Representation
1551
- command.request_object = log_sink_object
1552
- command.response_representation = Google::Apis::LoggingV2::LogSink::Representation
1553
- command.response_class = Google::Apis::LoggingV2::LogSink
1554
- command.params['parent'] = parent unless parent.nil?
1555
- command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
1520
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1521
+ command = make_simple_command(:post, 'v2/entries:list', options)
1522
+ command.request_representation = Google::Apis::LoggingV2::ListLogEntriesRequest::Representation
1523
+ command.request_object = list_log_entries_request_object
1524
+ command.response_representation = Google::Apis::LoggingV2::ListLogEntriesResponse::Representation
1525
+ command.response_class = Google::Apis::LoggingV2::ListLogEntriesResponse
1526
+ command.query['fields'] = fields unless fields.nil?
1527
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1528
+ execute_or_queue_command(command, &block)
1529
+ end
1530
+
1531
+ # Writes log entries to Stackdriver Logging.
1532
+ # @param [Google::Apis::LoggingV2::WriteLogEntriesRequest] write_log_entries_request_object
1533
+ # @param [String] fields
1534
+ # Selector specifying which fields to include in a partial response.
1535
+ # @param [String] quota_user
1536
+ # Available to use for quota purposes for server-side applications. Can be any
1537
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1538
+ # @param [Google::Apis::RequestOptions] options
1539
+ # Request-specific options
1540
+ #
1541
+ # @yield [result, err] Result & error if block supplied
1542
+ # @yieldparam result [Google::Apis::LoggingV2::WriteLogEntriesResponse] parsed result object
1543
+ # @yieldparam err [StandardError] error object if request failed
1544
+ #
1545
+ # @return [Google::Apis::LoggingV2::WriteLogEntriesResponse]
1546
+ #
1547
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1548
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1549
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1550
+ def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1551
+ command = make_simple_command(:post, 'v2/entries:write', options)
1552
+ command.request_representation = Google::Apis::LoggingV2::WriteLogEntriesRequest::Representation
1553
+ command.request_object = write_log_entries_request_object
1554
+ command.response_representation = Google::Apis::LoggingV2::WriteLogEntriesResponse::Representation
1555
+ command.response_class = Google::Apis::LoggingV2::WriteLogEntriesResponse
1556
1556
  command.query['fields'] = fields unless fields.nil?
1557
1557
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1558
1558
  execute_or_queue_command(command, &block)