google-cloud-pubsub 0.35.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/google/cloud/pubsub/project.rb +7 -2
- data/lib/google/cloud/pubsub/service.rb +4 -3
- data/lib/google/cloud/pubsub/topic.rb +50 -0
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +21 -53
- data/lib/google/cloud/pubsub/v1/doc/google/type/expr.rb +19 -0
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +32 -21
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +42 -68
- data/lib/google/cloud/pubsub/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +2 -0
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +6 -29
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6bdfb3062337b8aaf70394ea5f2c35054ac9cbe83836631b188456b8801c39e
|
4
|
+
data.tar.gz: 6f51848602a6702095214030780ddeae82e715b364541d2c1b8014232610c6b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693140e1add6261c55b61d3a9514db9c10afcf4dd04f0e0d1dd369aabd915aa8dce15eda2408e1d9be6cc9f54d9f546c638eb7d8aa66ca63319dd014e2382536
|
7
|
+
data.tar.gz: 8872761deb3b50239a4bee8d8ef9259492e5e60259e6a6508f632134e0521443910dc54dd4536c0dc4242a2d40c0fc9e4cb911109a5754aace8c8596f2c36138
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 0.36.0 / 2019-05-21
|
4
|
+
|
5
|
+
* Add Topic#kms_key
|
6
|
+
* Add the Cloud KMS encryption key that will be used to
|
7
|
+
protect access to messages published on a topic.
|
8
|
+
* Updates to the low-level API:
|
9
|
+
* Add Topic#kms_key_name (experimental)
|
10
|
+
* Snapshots no longer marked beta.
|
11
|
+
* Update IAM documentation.
|
12
|
+
|
3
13
|
### 0.35.0 / 2019-04-25
|
4
14
|
|
5
15
|
* Add Subscription#push_config and Subscription::PushConfig
|
@@ -171,6 +171,9 @@ module Google
|
|
171
171
|
# optional. Label keys must start with a letter and each label in the
|
172
172
|
# list must have a different key. See [Creating and Managing
|
173
173
|
# Labels](https://cloud.google.com/pubsub/docs/labels).
|
174
|
+
# @param [String] kms_key The Cloud KMS encryption key that will be used
|
175
|
+
# to protect access to messages published on this topic. Optional.
|
176
|
+
# For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
|
174
177
|
# @param [Hash] async A hash of values to configure the topic's
|
175
178
|
# {AsyncPublisher} that is created when {Topic#publish_async}
|
176
179
|
# is called. Optional.
|
@@ -199,9 +202,11 @@ module Google
|
|
199
202
|
# pubsub = Google::Cloud::PubSub.new
|
200
203
|
# topic = pubsub.create_topic "my-topic"
|
201
204
|
#
|
202
|
-
def create_topic topic_name, labels: nil, async: nil
|
205
|
+
def create_topic topic_name, labels: nil, kms_key: nil, async: nil
|
203
206
|
ensure_service!
|
204
|
-
grpc = service.create_topic topic_name,
|
207
|
+
grpc = service.create_topic topic_name,
|
208
|
+
labels: labels,
|
209
|
+
kms_key_name: kms_key
|
205
210
|
Topic.from_grpc grpc, service, async: async
|
206
211
|
end
|
207
212
|
alias new_topic create_topic
|
@@ -125,11 +125,12 @@ module Google
|
|
125
125
|
|
126
126
|
##
|
127
127
|
# Creates the given topic with the given name.
|
128
|
-
def create_topic topic_name, labels: nil, options: {}
|
128
|
+
def create_topic topic_name, labels: nil, kms_key_name: nil, options: {}
|
129
129
|
execute do
|
130
130
|
publisher.create_topic topic_path(topic_name, options),
|
131
|
-
labels:
|
132
|
-
|
131
|
+
labels: labels,
|
132
|
+
kms_key_name: kms_key_name,
|
133
|
+
options: default_options
|
133
134
|
end
|
134
135
|
end
|
135
136
|
|
@@ -132,6 +132,56 @@ module Google
|
|
132
132
|
@resource_name = nil
|
133
133
|
end
|
134
134
|
|
135
|
+
##
|
136
|
+
# The Cloud KMS encryption key that will be used to protect access
|
137
|
+
# to messages published on this topic.
|
138
|
+
# For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
|
139
|
+
# The default value is `nil`, which means default encryption is used.
|
140
|
+
#
|
141
|
+
# Makes an API call to retrieve the KMS encryption key when called on a
|
142
|
+
# reference object. See {#reference?}.
|
143
|
+
#
|
144
|
+
# @return [String]
|
145
|
+
#
|
146
|
+
# @example
|
147
|
+
# require "google/cloud/pubsub"
|
148
|
+
#
|
149
|
+
# pubsub = Google::Cloud::PubSub.new
|
150
|
+
#
|
151
|
+
# topic = pubsub.topic "my-topic"
|
152
|
+
#
|
153
|
+
# topic.kms_key #=> "projects/a/locations/b/keyRings/c/cryptoKeys/d"
|
154
|
+
#
|
155
|
+
def kms_key
|
156
|
+
ensure_grpc!
|
157
|
+
@grpc.kms_key_name
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Set the Cloud KMS encryption key that will be used to protect access
|
162
|
+
# to messages published on this topic.
|
163
|
+
# For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
|
164
|
+
# The default value is `nil`, which means default encryption is used.
|
165
|
+
#
|
166
|
+
# @param [String] new_kms_key_name New Cloud KMS key name
|
167
|
+
#
|
168
|
+
# @example
|
169
|
+
# require "google/cloud/pubsub"
|
170
|
+
#
|
171
|
+
# pubsub = Google::Cloud::PubSub.new
|
172
|
+
#
|
173
|
+
# topic = pubsub.topic "my-topic"
|
174
|
+
#
|
175
|
+
# key_name = "projects/a/locations/b/keyRings/c/cryptoKeys/d"
|
176
|
+
# topic.kms_key = key_name
|
177
|
+
#
|
178
|
+
def kms_key= new_kms_key_name
|
179
|
+
update_grpc = Google::Cloud::PubSub::V1::Topic.new \
|
180
|
+
name: name, kms_key_name: new_kms_key_name
|
181
|
+
@grpc = service.update_topic update_grpc, :kms_key_name
|
182
|
+
@resource_name = nil
|
183
|
+
end
|
184
|
+
|
135
185
|
##
|
136
186
|
# Permanently deletes the topic.
|
137
187
|
#
|
@@ -48,6 +48,15 @@ module Google
|
|
48
48
|
# CreateTopic or to UpdateTopic. This field will be populated in the
|
49
49
|
# responses for GetTopic, CreateTopic, and UpdateTopic: if not present in the
|
50
50
|
# response, then no constraints are in effect.
|
51
|
+
# @!attribute [rw] kms_key_name
|
52
|
+
# @return [String]
|
53
|
+
# The resource name of the Cloud KMS CryptoKey to be used to protect access
|
54
|
+
# to messages published on this topic.
|
55
|
+
#
|
56
|
+
# The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
57
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
58
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
59
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
51
60
|
class Topic; end
|
52
61
|
|
53
62
|
# A message that is published by publishers and consumed by subscribers. The
|
@@ -176,10 +185,7 @@ module Google
|
|
176
185
|
# `ListTopicSubscriptionsRequest` to get more subscriptions.
|
177
186
|
class ListTopicSubscriptionsResponse; end
|
178
187
|
|
179
|
-
# Request for the `ListTopicSnapshots` method.
|
180
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
181
|
-
# changed in backward-incompatible ways and is not recommended for production
|
182
|
-
# use. It is not subject to any SLA or deprecation policy.
|
188
|
+
# Request for the `ListTopicSnapshots` method.
|
183
189
|
# @!attribute [rw] topic
|
184
190
|
# @return [String]
|
185
191
|
# The name of the topic that snapshots are attached to.
|
@@ -194,10 +200,7 @@ module Google
|
|
194
200
|
# that the system should return the next page of data.
|
195
201
|
class ListTopicSnapshotsRequest; end
|
196
202
|
|
197
|
-
# Response for the `ListTopicSnapshots` method
|
198
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
199
|
-
# changed in backward-incompatible ways and is not recommended for production
|
200
|
-
# use. It is not subject to any SLA or deprecation policy.
|
203
|
+
# Response for the `ListTopicSnapshots` method.
|
201
204
|
# @!attribute [rw] snapshots
|
202
205
|
# @return [Array<String>]
|
203
206
|
# The names of the snapshots that match the request.
|
@@ -266,10 +269,6 @@ module Google
|
|
266
269
|
# <a
|
267
270
|
# href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
|
268
271
|
# Seek to a timestamp</a>.
|
269
|
-
# <br><br>
|
270
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
271
|
-
# changed in backward-incompatible ways and is not recommended for production
|
272
|
-
# use. It is not subject to any SLA or deprecation policy.
|
273
272
|
# @!attribute [rw] message_retention_duration
|
274
273
|
# @return [Google::Protobuf::Duration]
|
275
274
|
# How long to retain unacknowledged messages in the subscription's backlog,
|
@@ -277,10 +276,7 @@ module Google
|
|
277
276
|
# If `retain_acked_messages` is true, then this also configures the retention
|
278
277
|
# of acknowledged messages, and thus configures how far back in time a `Seek`
|
279
278
|
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
280
|
-
# minutes
|
281
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
282
|
-
# changed in backward-incompatible ways and is not recommended for production
|
283
|
-
# use. It is not subject to any SLA or deprecation policy.
|
279
|
+
# minutes.
|
284
280
|
# @!attribute [rw] labels
|
285
281
|
# @return [Hash{String => String}]
|
286
282
|
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
@@ -302,9 +298,6 @@ module Google
|
|
302
298
|
# operations on the subscription. If `expiration_policy` is not set, a
|
303
299
|
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
304
300
|
# value for `expiration_policy.ttl` is 1 day.
|
305
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
306
|
-
# changed in backward-incompatible ways and is not recommended for production
|
307
|
-
# use. It is not subject to any SLA or deprecation policy.
|
308
301
|
class Subscription; end
|
309
302
|
|
310
303
|
# A policy that specifies the conditions for resource expiration (i.e.,
|
@@ -360,9 +353,8 @@ module Google
|
|
360
353
|
# [Service account
|
361
354
|
# email](https://cloud.google.com/iam/docs/service-accounts)
|
362
355
|
# to be used for generating the OIDC token. The caller (for
|
363
|
-
# CreateSubscription, UpdateSubscription, and ModifyPushConfig
|
356
|
+
# CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
|
364
357
|
# have the iam.serviceAccounts.actAs permission for the service account.
|
365
|
-
# See https://cloud.google.com/iam/docs/understanding-roles#service-accounts-roles.
|
366
358
|
# @!attribute [rw] audience
|
367
359
|
# @return [String]
|
368
360
|
# Audience to be used when generating OIDC token. The audience claim
|
@@ -556,10 +548,7 @@ module Google
|
|
556
548
|
# Received Pub/Sub messages. This will not be empty.
|
557
549
|
class StreamingPullResponse; end
|
558
550
|
|
559
|
-
# Request for the `CreateSnapshot` method
|
560
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
561
|
-
# changed in backward-incompatible ways and is not recommended for production
|
562
|
-
# use. It is not subject to any SLA or deprecation policy.
|
551
|
+
# Request for the `CreateSnapshot` method.
|
563
552
|
# @!attribute [rw] name
|
564
553
|
# @return [String]
|
565
554
|
# Optional user-provided name for this snapshot.
|
@@ -586,10 +575,7 @@ module Google
|
|
586
575
|
# managing labels</a>.
|
587
576
|
class CreateSnapshotRequest; end
|
588
577
|
|
589
|
-
# Request for the UpdateSnapshot method
|
590
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
591
|
-
# changed in backward-incompatible ways and is not recommended for production
|
592
|
-
# use. It is not subject to any SLA or deprecation policy.
|
578
|
+
# Request for the UpdateSnapshot method.
|
593
579
|
# @!attribute [rw] snapshot
|
594
580
|
# @return [Google::Cloud::PubSub::V1::Snapshot]
|
595
581
|
# The updated snapshot object.
|
@@ -604,10 +590,7 @@ module Google
|
|
604
590
|
# operations, which allow
|
605
591
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
606
592
|
# acknowledgment state of messages in an existing subscription to the state
|
607
|
-
# captured by a snapshot
|
608
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
609
|
-
# changed in backward-incompatible ways and is not recommended for production
|
610
|
-
# use. It is not subject to any SLA or deprecation policy.
|
593
|
+
# captured by a snapshot.
|
611
594
|
# @!attribute [rw] name
|
612
595
|
# @return [String]
|
613
596
|
# The name of the snapshot.
|
@@ -632,20 +615,14 @@ module Google
|
|
632
615
|
# managing labels</a>.
|
633
616
|
class Snapshot; end
|
634
617
|
|
635
|
-
# Request for the GetSnapshot method
|
636
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
637
|
-
# changed in backward-incompatible ways and is not recommended for production
|
638
|
-
# use. It is not subject to any SLA or deprecation policy.
|
618
|
+
# Request for the GetSnapshot method.
|
639
619
|
# @!attribute [rw] snapshot
|
640
620
|
# @return [String]
|
641
621
|
# The name of the snapshot to get.
|
642
622
|
# Format is `projects/{project}/snapshots/{snap}`.
|
643
623
|
class GetSnapshotRequest; end
|
644
624
|
|
645
|
-
# Request for the `ListSnapshots` method
|
646
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
647
|
-
# changed in backward-incompatible ways and is not recommended for production
|
648
|
-
# use. It is not subject to any SLA or deprecation policy.
|
625
|
+
# Request for the `ListSnapshots` method.
|
649
626
|
# @!attribute [rw] project
|
650
627
|
# @return [String]
|
651
628
|
# The name of the project in which to list snapshots.
|
@@ -660,10 +637,7 @@ module Google
|
|
660
637
|
# should return the next page of data.
|
661
638
|
class ListSnapshotsRequest; end
|
662
639
|
|
663
|
-
# Response for the `ListSnapshots` method
|
664
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
665
|
-
# changed in backward-incompatible ways and is not recommended for production
|
666
|
-
# use. It is not subject to any SLA or deprecation policy.
|
640
|
+
# Response for the `ListSnapshots` method.
|
667
641
|
# @!attribute [rw] snapshots
|
668
642
|
# @return [Array<Google::Cloud::PubSub::V1::Snapshot>]
|
669
643
|
# The resulting snapshots.
|
@@ -673,20 +647,14 @@ module Google
|
|
673
647
|
# request; this value should be passed in a new `ListSnapshotsRequest`.
|
674
648
|
class ListSnapshotsResponse; end
|
675
649
|
|
676
|
-
# Request for the `DeleteSnapshot` method
|
677
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
678
|
-
# changed in backward-incompatible ways and is not recommended for production
|
679
|
-
# use. It is not subject to any SLA or deprecation policy.
|
650
|
+
# Request for the `DeleteSnapshot` method.
|
680
651
|
# @!attribute [rw] snapshot
|
681
652
|
# @return [String]
|
682
653
|
# The name of the snapshot to delete.
|
683
654
|
# Format is `projects/{project}/snapshots/{snap}`.
|
684
655
|
class DeleteSnapshotRequest; end
|
685
656
|
|
686
|
-
# Request for the `Seek` method.
|
687
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
688
|
-
# changed in backward-incompatible ways and is not recommended for production
|
689
|
-
# use. It is not subject to any SLA or deprecation policy.
|
657
|
+
# Request for the `Seek` method.
|
690
658
|
# @!attribute [rw] subscription
|
691
659
|
# @return [String]
|
692
660
|
# The subscription to affect.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://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
|
+
|
16
|
+
module Google
|
17
|
+
module Type
|
18
|
+
end
|
19
|
+
end
|
@@ -87,17 +87,26 @@ module Google
|
|
87
87
|
].freeze
|
88
88
|
|
89
89
|
|
90
|
+
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
91
|
+
"projects/{project}"
|
92
|
+
)
|
93
|
+
|
94
|
+
private_constant :PROJECT_PATH_TEMPLATE
|
95
|
+
|
90
96
|
TOPIC_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
91
97
|
"projects/{project}/topics/{topic}"
|
92
98
|
)
|
93
99
|
|
94
100
|
private_constant :TOPIC_PATH_TEMPLATE
|
95
101
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
102
|
+
# Returns a fully-qualified project resource name string.
|
103
|
+
# @param project [String]
|
104
|
+
# @return [String]
|
105
|
+
def self.project_path project
|
106
|
+
PROJECT_PATH_TEMPLATE.render(
|
107
|
+
:"project" => project
|
108
|
+
)
|
109
|
+
end
|
101
110
|
|
102
111
|
# Returns a fully-qualified topic resource name string.
|
103
112
|
# @param project [String]
|
@@ -110,15 +119,6 @@ module Google
|
|
110
119
|
)
|
111
120
|
end
|
112
121
|
|
113
|
-
# Returns a fully-qualified project resource name string.
|
114
|
-
# @param project [String]
|
115
|
-
# @return [String]
|
116
|
-
def self.project_path project
|
117
|
-
PROJECT_PATH_TEMPLATE.render(
|
118
|
-
:"project" => project
|
119
|
-
)
|
120
|
-
end
|
121
|
-
|
122
122
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
123
123
|
# Provides the means for authenticating requests made by the client. This parameter can
|
124
124
|
# be many types.
|
@@ -341,6 +341,14 @@ module Google
|
|
341
341
|
# response, then no constraints are in effect.
|
342
342
|
# A hash of the same form as `Google::Cloud::PubSub::V1::MessageStoragePolicy`
|
343
343
|
# can also be provided.
|
344
|
+
# @param kms_key_name [String]
|
345
|
+
# The resource name of the Cloud KMS CryptoKey to be used to protect access
|
346
|
+
# to messages published on this topic.
|
347
|
+
#
|
348
|
+
# The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
349
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
350
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
351
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
344
352
|
# @param options [Google::Gax::CallOptions]
|
345
353
|
# Overrides the default settings for this call, e.g, timeout,
|
346
354
|
# retries, etc.
|
@@ -360,12 +368,14 @@ module Google
|
|
360
368
|
name,
|
361
369
|
labels: nil,
|
362
370
|
message_storage_policy: nil,
|
371
|
+
kms_key_name: nil,
|
363
372
|
options: nil,
|
364
373
|
&block
|
365
374
|
req = {
|
366
375
|
name: name,
|
367
376
|
labels: labels,
|
368
|
-
message_storage_policy: message_storage_policy
|
377
|
+
message_storage_policy: message_storage_policy,
|
378
|
+
kms_key_name: kms_key_name
|
369
379
|
}.delete_if { |_, v| v.nil? }
|
370
380
|
req = Google::Gax::to_proto(req, Google::Cloud::PubSub::V1::Topic)
|
371
381
|
@create_topic.call(req, options, &block)
|
@@ -641,8 +651,7 @@ module Google
|
|
641
651
|
#
|
642
652
|
# @param resource [String]
|
643
653
|
# REQUIRED: The resource for which the policy is being specified.
|
644
|
-
#
|
645
|
-
# resource is specified as `projects/{project}`.
|
654
|
+
# See the operation documentation for the appropriate value for this field.
|
646
655
|
# @param policy [Google::Iam::V1::Policy | Hash]
|
647
656
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
648
657
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
@@ -687,8 +696,7 @@ module Google
|
|
687
696
|
#
|
688
697
|
# @param resource [String]
|
689
698
|
# REQUIRED: The resource for which the policy is being requested.
|
690
|
-
#
|
691
|
-
# resource is specified as `projects/{project}`.
|
699
|
+
# See the operation documentation for the appropriate value for this field.
|
692
700
|
# @param options [Google::Gax::CallOptions]
|
693
701
|
# Overrides the default settings for this call, e.g, timeout,
|
694
702
|
# retries, etc.
|
@@ -719,10 +727,13 @@ module Google
|
|
719
727
|
# If the resource does not exist, this will return an empty set of
|
720
728
|
# permissions, not a NOT_FOUND error.
|
721
729
|
#
|
730
|
+
# Note: This operation is designed to be used for building permission-aware
|
731
|
+
# UIs and command-line tools, not for authorization checking. This operation
|
732
|
+
# may "fail open" without warning.
|
733
|
+
#
|
722
734
|
# @param resource [String]
|
723
735
|
# REQUIRED: The resource for which the policy detail is being requested.
|
724
|
-
#
|
725
|
-
# resource is specified as `projects/{project}`.
|
736
|
+
# See the operation documentation for the appropriate value for this field.
|
726
737
|
# @param permissions [Array<String>]
|
727
738
|
# The set of permissions to check for the `resource`. Permissions with
|
728
739
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
@@ -77,6 +77,18 @@ module Google
|
|
77
77
|
].freeze
|
78
78
|
|
79
79
|
|
80
|
+
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
81
|
+
"projects/{project}"
|
82
|
+
)
|
83
|
+
|
84
|
+
private_constant :PROJECT_PATH_TEMPLATE
|
85
|
+
|
86
|
+
SNAPSHOT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
87
|
+
"projects/{project}/snapshots/{snapshot}"
|
88
|
+
)
|
89
|
+
|
90
|
+
private_constant :SNAPSHOT_PATH_TEMPLATE
|
91
|
+
|
80
92
|
SUBSCRIPTION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
81
93
|
"projects/{project}/subscriptions/{subscription}"
|
82
94
|
)
|
@@ -89,17 +101,25 @@ module Google
|
|
89
101
|
|
90
102
|
private_constant :TOPIC_PATH_TEMPLATE
|
91
103
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
)
|
104
|
+
# Returns a fully-qualified project resource name string.
|
105
|
+
# @param project [String]
|
106
|
+
# @return [String]
|
107
|
+
def self.project_path project
|
108
|
+
PROJECT_PATH_TEMPLATE.render(
|
109
|
+
:"project" => project
|
110
|
+
)
|
111
|
+
end
|
101
112
|
|
102
|
-
|
113
|
+
# Returns a fully-qualified snapshot resource name string.
|
114
|
+
# @param project [String]
|
115
|
+
# @param snapshot [String]
|
116
|
+
# @return [String]
|
117
|
+
def self.snapshot_path project, snapshot
|
118
|
+
SNAPSHOT_PATH_TEMPLATE.render(
|
119
|
+
:"project" => project,
|
120
|
+
:"snapshot" => snapshot
|
121
|
+
)
|
122
|
+
end
|
103
123
|
|
104
124
|
# Returns a fully-qualified subscription resource name string.
|
105
125
|
# @param project [String]
|
@@ -123,26 +143,6 @@ module Google
|
|
123
143
|
)
|
124
144
|
end
|
125
145
|
|
126
|
-
# Returns a fully-qualified project resource name string.
|
127
|
-
# @param project [String]
|
128
|
-
# @return [String]
|
129
|
-
def self.project_path project
|
130
|
-
PROJECT_PATH_TEMPLATE.render(
|
131
|
-
:"project" => project
|
132
|
-
)
|
133
|
-
end
|
134
|
-
|
135
|
-
# Returns a fully-qualified snapshot resource name string.
|
136
|
-
# @param project [String]
|
137
|
-
# @param snapshot [String]
|
138
|
-
# @return [String]
|
139
|
-
def self.snapshot_path project, snapshot
|
140
|
-
SNAPSHOT_PATH_TEMPLATE.render(
|
141
|
-
:"project" => project,
|
142
|
-
:"snapshot" => snapshot
|
143
|
-
)
|
144
|
-
end
|
145
|
-
|
146
146
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
147
147
|
# Provides the means for authenticating requests made by the client. This parameter can
|
148
148
|
# be many types.
|
@@ -463,20 +463,13 @@ module Google
|
|
463
463
|
# <a
|
464
464
|
# href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
|
465
465
|
# Seek to a timestamp</a>.
|
466
|
-
# <br><br>
|
467
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
468
|
-
# changed in backward-incompatible ways and is not recommended for production
|
469
|
-
# use. It is not subject to any SLA or deprecation policy.
|
470
466
|
# @param message_retention_duration [Google::Protobuf::Duration | Hash]
|
471
467
|
# How long to retain unacknowledged messages in the subscription's backlog,
|
472
468
|
# from the moment a message is published.
|
473
469
|
# If `retain_acked_messages` is true, then this also configures the retention
|
474
470
|
# of acknowledged messages, and thus configures how far back in time a `Seek`
|
475
471
|
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
476
|
-
# minutes
|
477
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
478
|
-
# changed in backward-incompatible ways and is not recommended for production
|
479
|
-
# use. It is not subject to any SLA or deprecation policy.
|
472
|
+
# minutes.
|
480
473
|
# A hash of the same form as `Google::Protobuf::Duration`
|
481
474
|
# can also be provided.
|
482
475
|
# @param labels [Hash{String => String}]
|
@@ -497,9 +490,6 @@ module Google
|
|
497
490
|
# operations on the subscription. If `expiration_policy` is not set, a
|
498
491
|
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
499
492
|
# value for `expiration_policy.ttl` is 1 day.
|
500
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
501
|
-
# changed in backward-incompatible ways and is not recommended for production
|
502
|
-
# use. It is not subject to any SLA or deprecation policy.
|
503
493
|
# A hash of the same form as `Google::Cloud::PubSub::V1::ExpirationPolicy`
|
504
494
|
# can also be provided.
|
505
495
|
# @param options [Google::Gax::CallOptions]
|
@@ -958,10 +948,7 @@ module Google
|
|
958
948
|
# operations, which allow
|
959
949
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
960
950
|
# acknowledgment state of messages in an existing subscription to the state
|
961
|
-
# captured by a snapshot
|
962
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
963
|
-
# changed in backward-incompatible ways and is not recommended for production
|
964
|
-
# use. It is not subject to any SLA or deprecation policy.
|
951
|
+
# captured by a snapshot.
|
965
952
|
#
|
966
953
|
# @param project [String]
|
967
954
|
# The name of the project in which to list snapshots.
|
@@ -1022,11 +1009,7 @@ module Google
|
|
1022
1009
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
1023
1010
|
# acknowledgment state of messages in an existing subscription to the state
|
1024
1011
|
# captured by a snapshot.
|
1025
|
-
# <br><br>
|
1026
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
1027
|
-
# changed in backward-incompatible ways and is not recommended for production
|
1028
|
-
# use. It is not subject to any SLA or deprecation policy.<br><br>
|
1029
|
-
# If the snapshot already exists, returns `ALREADY_EXISTS`.
|
1012
|
+
# <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
|
1030
1013
|
# If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
1031
1014
|
# If the backlog in the subscription is too old -- and the resulting snapshot
|
1032
1015
|
# would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
@@ -1096,11 +1079,7 @@ module Google
|
|
1096
1079
|
# operations, which allow
|
1097
1080
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
1098
1081
|
# acknowledgment state of messages in an existing subscription to the state
|
1099
|
-
# captured by a snapshot
|
1100
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
1101
|
-
# changed in backward-incompatible ways and is not recommended for production
|
1102
|
-
# use. It is not subject to any SLA or deprecation policy.
|
1103
|
-
# Note that certain properties of a snapshot are not modifiable.
|
1082
|
+
# captured by a snapshot.
|
1104
1083
|
#
|
1105
1084
|
# @param snapshot [Google::Cloud::PubSub::V1::Snapshot | Hash]
|
1106
1085
|
# The updated snapshot object.
|
@@ -1150,9 +1129,6 @@ module Google
|
|
1150
1129
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
1151
1130
|
# acknowledgment state of messages in an existing subscription to the state
|
1152
1131
|
# captured by a snapshot.<br><br>
|
1153
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
1154
|
-
# changed in backward-incompatible ways and is not recommended for production
|
1155
|
-
# use. It is not subject to any SLA or deprecation policy.
|
1156
1132
|
# When the snapshot is deleted, all messages retained in the snapshot
|
1157
1133
|
# are immediately dropped. After a snapshot is deleted, a new one may be
|
1158
1134
|
# created with the same name, but the new one has no association with the old
|
@@ -1194,10 +1170,7 @@ module Google
|
|
1194
1170
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
1195
1171
|
# acknowledgment state of messages in an existing subscription to the state
|
1196
1172
|
# captured by a snapshot. Note that both the subscription and the snapshot
|
1197
|
-
# must be on the same topic
|
1198
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
1199
|
-
# changed in backward-incompatible ways and is not recommended for production
|
1200
|
-
# use. It is not subject to any SLA or deprecation policy.
|
1173
|
+
# must be on the same topic.
|
1201
1174
|
#
|
1202
1175
|
# @param subscription [String]
|
1203
1176
|
# The subscription to affect.
|
@@ -1254,8 +1227,7 @@ module Google
|
|
1254
1227
|
#
|
1255
1228
|
# @param resource [String]
|
1256
1229
|
# REQUIRED: The resource for which the policy is being specified.
|
1257
|
-
#
|
1258
|
-
# resource is specified as `projects/{project}`.
|
1230
|
+
# See the operation documentation for the appropriate value for this field.
|
1259
1231
|
# @param policy [Google::Iam::V1::Policy | Hash]
|
1260
1232
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
1261
1233
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
@@ -1300,8 +1272,7 @@ module Google
|
|
1300
1272
|
#
|
1301
1273
|
# @param resource [String]
|
1302
1274
|
# REQUIRED: The resource for which the policy is being requested.
|
1303
|
-
#
|
1304
|
-
# resource is specified as `projects/{project}`.
|
1275
|
+
# See the operation documentation for the appropriate value for this field.
|
1305
1276
|
# @param options [Google::Gax::CallOptions]
|
1306
1277
|
# Overrides the default settings for this call, e.g, timeout,
|
1307
1278
|
# retries, etc.
|
@@ -1332,10 +1303,13 @@ module Google
|
|
1332
1303
|
# If the resource does not exist, this will return an empty set of
|
1333
1304
|
# permissions, not a NOT_FOUND error.
|
1334
1305
|
#
|
1306
|
+
# Note: This operation is designed to be used for building permission-aware
|
1307
|
+
# UIs and command-line tools, not for authorization checking. This operation
|
1308
|
+
# may "fail open" without warning.
|
1309
|
+
#
|
1335
1310
|
# @param resource [String]
|
1336
1311
|
# REQUIRED: The resource for which the policy detail is being requested.
|
1337
|
-
#
|
1338
|
-
# resource is specified as `projects/{project}`.
|
1312
|
+
# See the operation documentation for the appropriate value for this field.
|
1339
1313
|
# @param permissions [Array<String>]
|
1340
1314
|
# The set of permissions to check for the `resource`. Permissions with
|
1341
1315
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/resource_pb'
|
8
9
|
require 'google/protobuf/duration_pb'
|
9
10
|
require 'google/protobuf/empty_pb'
|
10
11
|
require 'google/protobuf/field_mask_pb'
|
@@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
18
|
optional :name, :string, 1
|
18
19
|
map :labels, :string, :string, 2
|
19
20
|
optional :message_storage_policy, :message, 3, "google.pubsub.v1.MessageStoragePolicy"
|
21
|
+
optional :kms_key_name, :string, 5
|
20
22
|
end
|
21
23
|
add_message "google.pubsub.v1.PubsubMessage" do
|
22
24
|
optional :data, :bytes, 1
|
@@ -61,10 +61,7 @@ module Google::Cloud::PubSub::V1
|
|
61
61
|
# operations, which allow
|
62
62
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
63
63
|
# acknowledgment state of messages in an existing subscription to the state
|
64
|
-
# captured by a snapshot
|
65
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
66
|
-
# changed in backward-incompatible ways and is not recommended for production
|
67
|
-
# use. It is not subject to any SLA or deprecation policy.
|
64
|
+
# captured by a snapshot.
|
68
65
|
rpc :ListTopicSnapshots, ListTopicSnapshotsRequest, ListTopicSnapshotsResponse
|
69
66
|
# Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
|
70
67
|
# does not exist. After a topic is deleted, a new topic may be created with
|
@@ -152,20 +149,14 @@ module Google::Cloud::PubSub::V1
|
|
152
149
|
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
153
150
|
# operations, which allow you to manage message acknowledgments in bulk. That
|
154
151
|
# is, you can set the acknowledgment state of messages in an existing
|
155
|
-
# subscription to the state captured by a snapshot
|
156
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
157
|
-
# changed in backward-incompatible ways and is not recommended for production
|
158
|
-
# use. It is not subject to any SLA or deprecation policy.
|
152
|
+
# subscription to the state captured by a snapshot.
|
159
153
|
rpc :GetSnapshot, GetSnapshotRequest, Snapshot
|
160
154
|
# Lists the existing snapshots. Snapshots are used in
|
161
155
|
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
162
156
|
# operations, which allow
|
163
157
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
164
158
|
# acknowledgment state of messages in an existing subscription to the state
|
165
|
-
# captured by a snapshot
|
166
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
167
|
-
# changed in backward-incompatible ways and is not recommended for production
|
168
|
-
# use. It is not subject to any SLA or deprecation policy.
|
159
|
+
# captured by a snapshot.
|
169
160
|
rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
|
170
161
|
# Creates a snapshot from the requested subscription. Snapshots are used in
|
171
162
|
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
@@ -173,11 +164,7 @@ module Google::Cloud::PubSub::V1
|
|
173
164
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
174
165
|
# acknowledgment state of messages in an existing subscription to the state
|
175
166
|
# captured by a snapshot.
|
176
|
-
# <br><br>
|
177
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
178
|
-
# changed in backward-incompatible ways and is not recommended for production
|
179
|
-
# use. It is not subject to any SLA or deprecation policy.<br><br>
|
180
|
-
# If the snapshot already exists, returns `ALREADY_EXISTS`.
|
167
|
+
# <br><br>If the snapshot already exists, returns `ALREADY_EXISTS`.
|
181
168
|
# If the requested subscription doesn't exist, returns `NOT_FOUND`.
|
182
169
|
# If the backlog in the subscription is too old -- and the resulting snapshot
|
183
170
|
# would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned.
|
@@ -195,11 +182,7 @@ module Google::Cloud::PubSub::V1
|
|
195
182
|
# operations, which allow
|
196
183
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
197
184
|
# acknowledgment state of messages in an existing subscription to the state
|
198
|
-
# captured by a snapshot
|
199
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
200
|
-
# changed in backward-incompatible ways and is not recommended for production
|
201
|
-
# use. It is not subject to any SLA or deprecation policy.
|
202
|
-
# Note that certain properties of a snapshot are not modifiable.
|
185
|
+
# captured by a snapshot.
|
203
186
|
rpc :UpdateSnapshot, UpdateSnapshotRequest, Snapshot
|
204
187
|
# Removes an existing snapshot. Snapshots are used in
|
205
188
|
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
@@ -207,9 +190,6 @@ module Google::Cloud::PubSub::V1
|
|
207
190
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
208
191
|
# acknowledgment state of messages in an existing subscription to the state
|
209
192
|
# captured by a snapshot.<br><br>
|
210
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
211
|
-
# changed in backward-incompatible ways and is not recommended for production
|
212
|
-
# use. It is not subject to any SLA or deprecation policy.
|
213
193
|
# When the snapshot is deleted, all messages retained in the snapshot
|
214
194
|
# are immediately dropped. After a snapshot is deleted, a new one may be
|
215
195
|
# created with the same name, but the new one has no association with the old
|
@@ -222,10 +202,7 @@ module Google::Cloud::PubSub::V1
|
|
222
202
|
# you to manage message acknowledgments in bulk. That is, you can set the
|
223
203
|
# acknowledgment state of messages in an existing subscription to the state
|
224
204
|
# captured by a snapshot. Note that both the subscription and the snapshot
|
225
|
-
# must be on the same topic
|
226
|
-
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
227
|
-
# changed in backward-incompatible ways and is not recommended for production
|
228
|
-
# use. It is not subject to any SLA or deprecation policy.
|
205
|
+
# must be on the same topic.
|
229
206
|
rpc :Seek, SeekRequest, SeekResponse
|
230
207
|
end
|
231
208
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.36.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -39,6 +39,26 @@ dependencies:
|
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.3'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: googleapis-common-protos
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.3.9
|
49
|
+
- - "<"
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '2.0'
|
52
|
+
type: :runtime
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: 1.3.9
|
59
|
+
- - "<"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
42
62
|
- !ruby/object:Gem::Dependency
|
43
63
|
name: grpc-google-iam-v1
|
44
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +278,7 @@ files:
|
|
258
278
|
- lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb
|
259
279
|
- lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb
|
260
280
|
- lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb
|
281
|
+
- lib/google/cloud/pubsub/v1/doc/google/type/expr.rb
|
261
282
|
- lib/google/cloud/pubsub/v1/publisher_client.rb
|
262
283
|
- lib/google/cloud/pubsub/v1/publisher_client_config.json
|
263
284
|
- lib/google/cloud/pubsub/v1/subscriber_client.rb
|