blob: bdbcd5533fa3836b89e1a9627acf27629fcfac48 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="pubsub_v1beta2.html">Google Cloud Pub/Sub API</a> . <a href="pubsub_v1beta2.projects.html">projects</a> . <a href="pubsub_v1beta2.projects.subscriptions.html">subscriptions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000078 <code><a href="#acknowledge">acknowledge(subscription, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080079<p class="firstline">Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.</p>
80<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000081 <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080082<p class="firstline">Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.</p>
83<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000084 <code><a href="#delete">delete(subscription, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080085<p class="firstline">Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.</p>
86<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000087 <code><a href="#get">get(subscription, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080088<p class="firstline">Gets the configuration details of a subscription.</p>
89<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000090 <code><a href="#getIamPolicy">getIamPolicy(resource, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
93 <code><a href="#list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080094<p class="firstline">Lists matching subscriptions.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +000099 <code><a href="#modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800100<p class="firstline">Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.</p>
101<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000102 <code><a href="#modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800103<p class="firstline">Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.</p>
104<p class="toc_element">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000105 <code><a href="#pull">pull(subscription, body, x__xgafv=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -0800106<p class="firstline">Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.</p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000107<p class="toc_element">
108 <code><a href="#setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</a></code></p>
109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
111 <code><a href="#testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</a></code></p>
112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800113<h3>Method Details</h3>
114<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000115 <code class="details" id="acknowledge">acknowledge(subscription, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800116 <pre>Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.
117
118Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000119 subscription: string, The subscription whose message is being acknowledged. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800120 body: object, The request body. (required)
121 The object takes the form of:
122
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000123{ # Request for the Acknowledge method.
124 "ackIds": [ # The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.
Craig Citroe633be12015-03-02 13:40:36 -0800125 "A String",
126 ],
127 }
128
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000129 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800130
131Returns:
132 An object of the form:
133
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000134 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
Craig Citroe633be12015-03-02 13:40:36 -0800135 }</pre>
136</div>
137
138<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000139 <code class="details" id="create">create(name, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800140 <pre>Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.
141
142Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000143 name: string, The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog". (required)
Craig Citroe633be12015-03-02 13:40:36 -0800144 body: object, The request body. (required)
145 The object takes the form of:
146
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000147{ # A subscription resource.
148 "topic": "A String", # The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.
149 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for each message using its corresponding ack_id by calling ModifyAckDeadline. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 60 seconds is used.
150 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.
151 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800152 "a_key": "A String",
153 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000154 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800155 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000156 "name": "A String", # The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
Craig Citroe633be12015-03-02 13:40:36 -0800157}
158
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000159 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800160
161Returns:
162 An object of the form:
163
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000164 { # A subscription resource.
165 "topic": "A String", # The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.
166 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for each message using its corresponding ack_id by calling ModifyAckDeadline. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 60 seconds is used.
167 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.
168 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800169 "a_key": "A String",
170 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000171 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800172 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000173 "name": "A String", # The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
Craig Citroe633be12015-03-02 13:40:36 -0800174 }</pre>
175</div>
176
177<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000178 <code class="details" id="delete">delete(subscription, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800179 <pre>Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.
180
181Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000182 subscription: string, The subscription to delete. (required)
183 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800184
185Returns:
186 An object of the form:
187
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000188 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
Craig Citroe633be12015-03-02 13:40:36 -0800189 }</pre>
190</div>
191
192<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000193 <code class="details" id="get">get(subscription, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800194 <pre>Gets the configuration details of a subscription.
195
196Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000197 subscription: string, The name of the subscription to get. (required)
198 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800199
200Returns:
201 An object of the form:
202
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000203 { # A subscription resource.
204 "topic": "A String", # The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.
205 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for each message using its corresponding ack_id by calling ModifyAckDeadline. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 60 seconds is used.
206 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.
207 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800208 "a_key": "A String",
209 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000210 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800211 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000212 "name": "A String", # The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
Craig Citroe633be12015-03-02 13:40:36 -0800213 }</pre>
214</div>
215
216<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000217 <code class="details" id="getIamPolicy">getIamPolicy(resource, x__xgafv=None)</code>
218 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Craig Citroe633be12015-03-02 13:40:36 -0800219
220Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000221 resource: string, REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}. (required)
222 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800223
224Returns:
225 An object of the form:
226
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000227 { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
228 "rules": [
229 { # A rule to be applied in a Policy.
230 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
231 "A String",
232 ],
233 "description": "A String", # Human-readable description of the rule.
234 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
235 "A String",
236 ],
237 "action": "A String", # Required
238 "conditions": [ # Additional restrictions that must be met
239 { # A condition to be met.
240 "iam": "A String", # Trusted attributes supplied by the IAM system.
241 "svc": "A String", # Trusted attributes discharged by the service.
242 "value": "A String", # The object of the condition. Exactly one of these must be set.
243 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
244 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
245 "A String",
246 ],
247 "op": "A String", # An operator to apply the subject with.
248 },
249 ],
250 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
251 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
252 "counter": { # Options for counters # Counter options.
253 "field": "A String", # The field value to attribute.
254 "metric": "A String", # The metric to update.
255 },
256 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
257 },
258 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
259 },
260 },
261 ],
262 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
263 "A String",
264 ],
265 },
266 ],
267 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
268 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
269 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
270 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
271 "A String",
272 ],
273 },
274 ],
275 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
276 "etag": "A String", # Can be used to perform a read-modify-write.
277 }</pre>
278</div>
279
280<div class="method">
281 <code class="details" id="list">list(project, pageSize=None, pageToken=None, x__xgafv=None)</code>
282 <pre>Lists matching subscriptions.
283
284Args:
285 project: string, The name of the cloud project that subscriptions belong to. (required)
286 pageSize: integer, Maximum number of subscriptions to return.
287 pageToken: string, The value returned by the last ListSubscriptionsResponse; indicates that this is a continuation of a prior ListSubscriptions call, and that the system should return the next page of data.
288 x__xgafv: string, V1 error format.
289
290Returns:
291 An object of the form:
292
293 { # Response for the ListSubscriptions method.
294 "nextPageToken": "A String", # If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ListSubscriptionsRequest to get more subscriptions.
295 "subscriptions": [ # The subscriptions that match the request.
296 { # A subscription resource.
297 "topic": "A String", # The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.
298 "ackDeadlineSeconds": 42, # This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for each message using its corresponding ack_id by calling ModifyAckDeadline. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 60 seconds is used.
299 "pushConfig": { # Configuration for a push delivery endpoint. # If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.
300 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800301 "a_key": "A String",
302 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000303 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800304 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000305 "name": "A String", # The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
Craig Citroe633be12015-03-02 13:40:36 -0800306 },
307 ],
308 }</pre>
309</div>
310
311<div class="method">
312 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
313 <pre>Retrieves the next page of results.
314
315Args:
316 previous_request: The request for the previous page. (required)
317 previous_response: The response from the request for the previous page. (required)
318
319Returns:
320 A request object that you can call 'execute()' on to request the next
321 page. Returns None if there are no more items in the collection.
322 </pre>
323</div>
324
325<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000326 <code class="details" id="modifyAckDeadline">modifyAckDeadline(subscription, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800327 <pre>Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.
328
329Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000330 subscription: string, The name of the subscription. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800331 body: object, The request body. (required)
332 The object takes the form of:
333
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000334{ # Request for the ModifyAckDeadline method.
335 "ackDeadlineSeconds": 42, # The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request.
336 "ackId": "A String", # The acknowledgment ID.
337 "ackIds": [ # List of acknowledgment IDs.
338 "A String",
339 ],
Craig Citroe633be12015-03-02 13:40:36 -0800340 }
341
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000342 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800343
344Returns:
345 An object of the form:
346
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000347 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
Craig Citroe633be12015-03-02 13:40:36 -0800348 }</pre>
349</div>
350
351<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000352 <code class="details" id="modifyPushConfig">modifyPushConfig(subscription, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800353 <pre>Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.
354
355Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000356 subscription: string, The name of the subscription. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800357 body: object, The request body. (required)
358 The object takes the form of:
359
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000360{ # Request for the ModifyPushConfig method.
361 "pushConfig": { # Configuration for a push delivery endpoint. # The push configuration for future deliveries. An empty pushConfig indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if Pull is not called.
362 "attributes": { # Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the CreateSubscription call, it will default to the version of the API used to make such call. If not present during a ModifyPushConfig call, its value will not be changed. GetSubscription calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
Craig Citroe633be12015-03-02 13:40:36 -0800363 "a_key": "A String",
364 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000365 "pushEndpoint": "A String", # A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push".
Craig Citroe633be12015-03-02 13:40:36 -0800366 },
367 }
368
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000369 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800370
371Returns:
372 An object of the form:
373
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000374 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
Craig Citroe633be12015-03-02 13:40:36 -0800375 }</pre>
376</div>
377
378<div class="method">
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000379 <code class="details" id="pull">pull(subscription, body, x__xgafv=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -0800380 <pre>Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.
381
382Args:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000383 subscription: string, The subscription from which messages should be pulled. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800384 body: object, The request body. (required)
385 The object takes the form of:
386
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000387{ # Request for the Pull method.
388 "returnImmediately": True or False, # If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.
389 "maxMessages": 42, # The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.
Craig Citroe633be12015-03-02 13:40:36 -0800390 }
391
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000392 x__xgafv: string, V1 error format.
Craig Citroe633be12015-03-02 13:40:36 -0800393
394Returns:
395 An object of the form:
396
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000397 { # Response for the Pull method.
398 "receivedMessages": [ # Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.
399 { # A message and its corresponding acknowledgment ID.
400 "ackId": "A String", # This ID can be used to acknowledge the received message.
401 "message": { # A message data and its attributes. # The message.
402 "attributes": { # Optional attributes for this message.
Craig Citroe633be12015-03-02 13:40:36 -0800403 "a_key": "A String",
404 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000405 "data": "A String", # The message payload. For JSON requests, the value of this field must be base64-encoded.
406 "messageId": "A String", # ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.
Craig Citroe633be12015-03-02 13:40:36 -0800407 },
408 },
409 ],
410 }</pre>
411</div>
412
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000413<div class="method">
414 <code class="details" id="setIamPolicy">setIamPolicy(resource, body, x__xgafv=None)</code>
415 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
416
417Args:
418 resource: string, REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}. (required)
419 body: object, The request body. (required)
420 The object takes the form of:
421
422{ # Request message for `SetIamPolicy` method.
423 "policy": { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ``` # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
424 "rules": [
425 { # A rule to be applied in a Policy.
426 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
427 "A String",
428 ],
429 "description": "A String", # Human-readable description of the rule.
430 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
431 "A String",
432 ],
433 "action": "A String", # Required
434 "conditions": [ # Additional restrictions that must be met
435 { # A condition to be met.
436 "iam": "A String", # Trusted attributes supplied by the IAM system.
437 "svc": "A String", # Trusted attributes discharged by the service.
438 "value": "A String", # The object of the condition. Exactly one of these must be set.
439 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
440 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
441 "A String",
442 ],
443 "op": "A String", # An operator to apply the subject with.
444 },
445 ],
446 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
447 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
448 "counter": { # Options for counters # Counter options.
449 "field": "A String", # The field value to attribute.
450 "metric": "A String", # The metric to update.
451 },
452 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
453 },
454 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
455 },
456 },
457 ],
458 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
459 "A String",
460 ],
461 },
462 ],
463 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
464 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
465 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
466 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
467 "A String",
468 ],
469 },
470 ],
471 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
472 "etag": "A String", # Can be used to perform a read-modify-write.
473 },
474 }
475
476 x__xgafv: string, V1 error format.
477
478Returns:
479 An object of the form:
480
481 { # # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
482 "rules": [
483 { # A rule to be applied in a Policy.
484 "notIn": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of entries. The formation for in and not_in entries is the same as members in a Binding above.
485 "A String",
486 ],
487 "description": "A String", # Human-readable description of the rule.
488 "in": [ # The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of entries.
489 "A String",
490 ],
491 "action": "A String", # Required
492 "conditions": [ # Additional restrictions that must be met
493 { # A condition to be met.
494 "iam": "A String", # Trusted attributes supplied by the IAM system.
495 "svc": "A String", # Trusted attributes discharged by the service.
496 "value": "A String", # The object of the condition. Exactly one of these must be set.
497 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
498 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
499 "A String",
500 ],
501 "op": "A String", # An operator to apply the subject with.
502 },
503 ],
504 "logConfig": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
505 { # Specifies what kind of log the caller must write Increment a streamz counter with the specified metric and field names. Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended. Field names correspond to IAM request parameters and field values are their respective values. At present only "iam_principal", corresponding to IAMContext.principal, is supported. Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==> increment counter /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]} At this time we do not support: * multiple field names (though this may be supported in the future) * decrementing the counter * incrementing it by anything other than 1
506 "counter": { # Options for counters # Counter options.
507 "field": "A String", # The field value to attribute.
508 "metric": "A String", # The metric to update.
509 },
510 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
511 },
512 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
513 },
514 },
515 ],
516 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
517 "A String",
518 ],
519 },
520 ],
521 "bindings": [ # It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
522 { # Associates members of various types with roles. See below for details of the various objects that can be included as members.
523 "role": "A String", # The name of the role to which the members should be bound. Examples: "roles/viewer", "roles/editor", "roles/owner". Required
524 "members": [ # Format of member entries: 1. allUsers Matches any requesting principal (users, service accounts or anonymous). 2. allAuthenticatedUsers Matches any requesting authenticated principal (users or service accounts). 3. user:{emailid} A google user account using an email address. For example alice@gmail.com, joe@example.com 4. serviceAccount:{emailid} An service account email. 5. group:{emailid} A google group with an email address. For example auth-ti-cloud@google.com 6. domain:{domain} A Google Apps domain name. For example google.com, example.com
525 "A String",
526 ],
527 },
528 ],
529 "version": 42, # The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
530 "etag": "A String", # Can be used to perform a read-modify-write.
531 }</pre>
532</div>
533
534<div class="method">
535 <code class="details" id="testIamPermissions">testIamPermissions(resource, body, x__xgafv=None)</code>
536 <pre>Returns permissions that a caller has on the specified resource.
537
538Args:
539 resource: string, REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}. (required)
540 body: object, The request body. (required)
541 The object takes the form of:
542
543{ # Request message for `TestIamPermissions` method.
544 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
545 "A String",
546 ],
547 }
548
549 x__xgafv: string, V1 error format.
550
551Returns:
552 An object of the form:
553
554 { # Response message for `TestIamPermissions` method.
555 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
556 "A String",
557 ],
558 }</pre>
559</div>
560
Craig Citroe633be12015-03-02 13:40:36 -0800561</body></html>