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