@@ -85,22 +85,6 @@ def from_service_account_file(cls, filename, *args, **kwargs):
8585
8686 from_service_account_json = from_service_account_file
8787
88- @classmethod
89- def subscription_path (cls , project , subscription ):
90- """Return a fully-qualified subscription string."""
91- return google .api_core .path_template .expand (
92- "projects/{project}/subscriptions/{subscription}" ,
93- project = project ,
94- subscription = subscription ,
95- )
96-
97- @classmethod
98- def topic_path (cls , project , topic ):
99- """Return a fully-qualified topic string."""
100- return google .api_core .path_template .expand (
101- "projects/{project}/topics/{topic}" , project = project , topic = topic
102- )
103-
10488 @classmethod
10589 def project_path (cls , project ):
10690 """Return a fully-qualified project string."""
@@ -117,6 +101,22 @@ def snapshot_path(cls, project, snapshot):
117101 snapshot = snapshot ,
118102 )
119103
104+ @classmethod
105+ def subscription_path (cls , project , subscription ):
106+ """Return a fully-qualified subscription string."""
107+ return google .api_core .path_template .expand (
108+ "projects/{project}/subscriptions/{subscription}" ,
109+ project = project ,
110+ subscription = subscription ,
111+ )
112+
113+ @classmethod
114+ def topic_path (cls , project , topic ):
115+ """Return a fully-qualified topic string."""
116+ return google .api_core .path_template .expand (
117+ "projects/{project}/topics/{topic}" , project = project , topic = topic
118+ )
119+
120120 def __init__ (
121121 self ,
122122 transport = None ,
@@ -293,19 +293,13 @@ def create_subscription(
293293 messages are not expunged from the subscription's backlog, even if they
294294 are acknowledged, until they fall out of the
295295 ``message_retention_duration`` window. This must be true if you would
296- like to Seek to a timestamp. BETA: This feature is part of a beta
297- release. This API might be changed in backward-incompatible ways and is
298- not recommended for production use. It is not subject to any SLA or
299- deprecation policy.
296+ like to Seek to a timestamp.
300297 message_retention_duration (Union[dict, ~google.cloud.pubsub_v1.types.Duration]): How long to retain unacknowledged messages in the subscription's
301298 backlog, from the moment a message is published. If
302299 ``retain_acked_messages`` is true, then this also configures the
303300 retention of acknowledged messages, and thus configures how far back in
304301 time a ``Seek`` can be done. Defaults to 7 days. Cannot be more than 7
305- days or less than 10 minutes. BETA: This feature is part of a beta
306- release. This API might be changed in backward-incompatible ways and is
307- not recommended for production use. It is not subject to any SLA or
308- deprecation policy.
302+ days or less than 10 minutes.
309303
310304 If a dict is provided, it must be of the same form as the protobuf
311305 message :class:`~google.cloud.pubsub_v1.types.Duration`
@@ -323,10 +317,7 @@ def create_subscription(
323317 subscriber is successfully consuming messages from the subscription or
324318 is issuing operations on the subscription. If ``expiration_policy`` is
325319 not set, a *default policy* with ``ttl`` of 31 days will be used. The
326- minimum allowed value for ``expiration_policy.ttl`` is 1 day. BETA: This
327- feature is part of a beta release. This API might be changed in
328- backward-incompatible ways and is not recommended for production use. It
329- is not subject to any SLA or deprecation policy.
320+ minimum allowed value for ``expiration_policy.ttl`` is 1 day.
330321
331322 If a dict is provided, it must be of the same form as the protobuf
332323 message :class:`~google.cloud.pubsub_v1.types.ExpirationPolicy`
@@ -1151,10 +1142,7 @@ def list_snapshots(
11511142 operations, which allow
11521143 you to manage message acknowledgments in bulk. That is, you can set the
11531144 acknowledgment state of messages in an existing subscription to the state
1154- captured by a snapshot.<br><br>
1155- <b>BETA:</b> This feature is part of a beta release. This API might be
1156- changed in backward-incompatible ways and is not recommended for production
1157- use. It is not subject to any SLA or deprecation policy.
1145+ captured by a snapshot.
11581146
11591147 Example:
11601148 >>> from google.cloud import pubsub_v1
@@ -1260,15 +1248,12 @@ def create_snapshot(
12601248 Creates a snapshot from the requested subscription. Snapshots are used
12611249 in Seek operations, which allow you to manage message acknowledgments in
12621250 bulk. That is, you can set the acknowledgment state of messages in an
1263- existing subscription to the state captured by a snapshot. BETA: This
1264- feature is part of a beta release. This API might be changed in
1265- backward-incompatible ways and is not recommended for production use. It
1266- is not subject to any SLA or deprecation policy. If the snapshot already
1267- exists, returns ``ALREADY_EXISTS``. If the requested subscription
1268- doesn't exist, returns ``NOT_FOUND``. If the backlog in the subscription
1269- is too old -- and the resulting snapshot would expire in less than 1
1270- hour -- then ``FAILED_PRECONDITION`` is returned. See also the
1271- ``Snapshot.expire_time`` field. If the name is not provided in the
1251+ existing subscription to the state captured by a snapshot. If the
1252+ snapshot already exists, returns ``ALREADY_EXISTS``. If the requested
1253+ subscription doesn't exist, returns ``NOT_FOUND``. If the backlog in the
1254+ subscription is too old -- and the resulting snapshot would expire in
1255+ less than 1 hour -- then ``FAILED_PRECONDITION`` is returned. See also
1256+ the ``Snapshot.expire_time`` field. If the name is not provided in the
12721257 request, the server will assign a random name for this snapshot on the
12731258 same project as the subscription, conforming to the `resource name
12741259 format <https://cloud.google.com/pubsub/docs/admin#resource_names>`__.
@@ -1365,11 +1350,7 @@ def update_snapshot(
13651350 operations, which allow
13661351 you to manage message acknowledgments in bulk. That is, you can set the
13671352 acknowledgment state of messages in an existing subscription to the state
1368- captured by a snapshot.<br><br>
1369- <b>BETA:</b> This feature is part of a beta release. This API might be
1370- changed in backward-incompatible ways and is not recommended for production
1371- use. It is not subject to any SLA or deprecation policy.
1372- Note that certain properties of a snapshot are not modifiable.
1353+ captured by a snapshot.
13731354
13741355 Example:
13751356 >>> from google.cloud import pubsub_v1
@@ -1459,9 +1440,6 @@ def delete_snapshot(
14591440 you to manage message acknowledgments in bulk. That is, you can set the
14601441 acknowledgment state of messages in an existing subscription to the state
14611442 captured by a snapshot.<br><br>
1462- <b>BETA:</b> This feature is part of a beta release. This API might be
1463- changed in backward-incompatible ways and is not recommended for production
1464- use. It is not subject to any SLA or deprecation policy.
14651443 When the snapshot is deleted, all messages retained in the snapshot
14661444 are immediately dropped. After a snapshot is deleted, a new one may be
14671445 created with the same name, but the new one has no association with the old
@@ -1541,10 +1519,7 @@ def seek(
15411519 you to manage message acknowledgments in bulk. That is, you can set the
15421520 acknowledgment state of messages in an existing subscription to the state
15431521 captured by a snapshot. Note that both the subscription and the snapshot
1544- must be on the same topic.<br><br>
1545- <b>BETA:</b> This feature is part of a beta release. This API might be
1546- changed in backward-incompatible ways and is not recommended for production
1547- use. It is not subject to any SLA or deprecation policy.
1522+ must be on the same topic.
15481523
15491524 Example:
15501525 >>> from google.cloud import pubsub_v1
@@ -1651,8 +1626,7 @@ def set_iam_policy(
16511626
16521627 Args:
16531628 resource (str): REQUIRED: The resource for which the policy is being specified.
1654- ``resource`` is usually specified as a path. For example, a Project
1655- resource is specified as ``projects/{project}``.
1629+ See the operation documentation for the appropriate value for this field.
16561630 policy (Union[dict, ~google.cloud.pubsub_v1.types.Policy]): REQUIRED: The complete policy to be applied to the ``resource``. The
16571631 size of the policy is limited to a few 10s of KB. An empty policy is a
16581632 valid policy but certain Cloud Platform services (such as Projects)
@@ -1731,8 +1705,7 @@ def get_iam_policy(
17311705
17321706 Args:
17331707 resource (str): REQUIRED: The resource for which the policy is being requested.
1734- ``resource`` is usually specified as a path. For example, a Project
1735- resource is specified as ``projects/{project}``.
1708+ See the operation documentation for the appropriate value for this field.
17361709 retry (Optional[google.api_core.retry.Retry]): A retry object used
17371710 to retry requests. If ``None`` is specified, requests will not
17381711 be retried.
@@ -1794,6 +1767,10 @@ def test_iam_permissions(
17941767 resource does not exist, this will return an empty set of permissions,
17951768 not a NOT\_FOUND error.
17961769
1770+ Note: This operation is designed to be used for building
1771+ permission-aware UIs and command-line tools, not for authorization
1772+ checking. This operation may "fail open" without warning.
1773+
17971774 Example:
17981775 >>> from google.cloud import pubsub_v1
17991776 >>>
@@ -1808,8 +1785,7 @@ def test_iam_permissions(
18081785
18091786 Args:
18101787 resource (str): REQUIRED: The resource for which the policy detail is being requested.
1811- ``resource`` is usually specified as a path. For example, a Project
1812- resource is specified as ``projects/{project}``.
1788+ See the operation documentation for the appropriate value for this field.
18131789 permissions (list[str]): The set of permissions to check for the ``resource``. Permissions with
18141790 wildcards (such as '*' or 'storage.*') are not allowed. For more
18151791 information see `IAM
0 commit comments