• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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="storage_v1.html">Cloud Storage JSON API</a> . <a href="storage_v1.notifications.html">notifications</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(bucket, notification, provisionalUserProject=None, userProject=None)</a></code></p>
82<p class="firstline">Permanently deletes a notification subscription.</p>
83<p class="toc_element">
84  <code><a href="#get">get(bucket, notification, provisionalUserProject=None, userProject=None)</a></code></p>
85<p class="firstline">View a notification configuration.</p>
86<p class="toc_element">
87  <code><a href="#insert">insert(bucket, body=None, provisionalUserProject=None, userProject=None)</a></code></p>
88<p class="firstline">Creates a notification subscription for a given bucket.</p>
89<p class="toc_element">
90  <code><a href="#list">list(bucket, provisionalUserProject=None, userProject=None)</a></code></p>
91<p class="firstline">Retrieves a list of notification subscriptions for a given bucket.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="close">close()</code>
95  <pre>Close httplib2 connections.</pre>
96</div>
97
98<div class="method">
99    <code class="details" id="delete">delete(bucket, notification, provisionalUserProject=None, userProject=None)</code>
100  <pre>Permanently deletes a notification subscription.
101
102Args:
103  bucket: string, The parent bucket of the notification. (required)
104  notification: string, ID of the notification to delete. (required)
105  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
106  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
107</pre>
108</div>
109
110<div class="method">
111    <code class="details" id="get">get(bucket, notification, provisionalUserProject=None, userProject=None)</code>
112  <pre>View a notification configuration.
113
114Args:
115  bucket: string, The parent bucket of the notification. (required)
116  notification: string, Notification ID (required)
117  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
118  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
119
120Returns:
121  An object of the form:
122
123    { # A subscription to receive Google PubSub notifications.
124  &quot;custom_attributes&quot;: { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
125    &quot;a_key&quot;: &quot;A String&quot;,
126  },
127  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for this subscription notification.
128  &quot;event_types&quot;: [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types.
129    &quot;A String&quot;,
130  ],
131  &quot;id&quot;: &quot;A String&quot;, # The ID of the notification.
132  &quot;kind&quot;: &quot;storage#notification&quot;, # The kind of item this is. For notifications, this is always storage#notification.
133  &quot;object_name_prefix&quot;: &quot;A String&quot;, # If present, only apply this notification configuration to object names that begin with this prefix.
134  &quot;payload_format&quot;: &quot;JSON_API_V1&quot;, # The desired content of the Payload.
135  &quot;selfLink&quot;: &quot;A String&quot;, # The canonical URL of this notification.
136  &quot;topic&quot;: &quot;A String&quot;, # The Cloud PubSub topic to which this subscription publishes. Formatted as: &#x27;//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}&#x27;
137}</pre>
138</div>
139
140<div class="method">
141    <code class="details" id="insert">insert(bucket, body=None, provisionalUserProject=None, userProject=None)</code>
142  <pre>Creates a notification subscription for a given bucket.
143
144Args:
145  bucket: string, The parent bucket of the notification. (required)
146  body: object, The request body.
147    The object takes the form of:
148
149{ # A subscription to receive Google PubSub notifications.
150  &quot;custom_attributes&quot;: { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
151    &quot;a_key&quot;: &quot;A String&quot;,
152  },
153  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for this subscription notification.
154  &quot;event_types&quot;: [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types.
155    &quot;A String&quot;,
156  ],
157  &quot;id&quot;: &quot;A String&quot;, # The ID of the notification.
158  &quot;kind&quot;: &quot;storage#notification&quot;, # The kind of item this is. For notifications, this is always storage#notification.
159  &quot;object_name_prefix&quot;: &quot;A String&quot;, # If present, only apply this notification configuration to object names that begin with this prefix.
160  &quot;payload_format&quot;: &quot;JSON_API_V1&quot;, # The desired content of the Payload.
161  &quot;selfLink&quot;: &quot;A String&quot;, # The canonical URL of this notification.
162  &quot;topic&quot;: &quot;A String&quot;, # The Cloud PubSub topic to which this subscription publishes. Formatted as: &#x27;//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}&#x27;
163}
164
165  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
166  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
167
168Returns:
169  An object of the form:
170
171    { # A subscription to receive Google PubSub notifications.
172  &quot;custom_attributes&quot;: { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
173    &quot;a_key&quot;: &quot;A String&quot;,
174  },
175  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for this subscription notification.
176  &quot;event_types&quot;: [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types.
177    &quot;A String&quot;,
178  ],
179  &quot;id&quot;: &quot;A String&quot;, # The ID of the notification.
180  &quot;kind&quot;: &quot;storage#notification&quot;, # The kind of item this is. For notifications, this is always storage#notification.
181  &quot;object_name_prefix&quot;: &quot;A String&quot;, # If present, only apply this notification configuration to object names that begin with this prefix.
182  &quot;payload_format&quot;: &quot;JSON_API_V1&quot;, # The desired content of the Payload.
183  &quot;selfLink&quot;: &quot;A String&quot;, # The canonical URL of this notification.
184  &quot;topic&quot;: &quot;A String&quot;, # The Cloud PubSub topic to which this subscription publishes. Formatted as: &#x27;//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}&#x27;
185}</pre>
186</div>
187
188<div class="method">
189    <code class="details" id="list">list(bucket, provisionalUserProject=None, userProject=None)</code>
190  <pre>Retrieves a list of notification subscriptions for a given bucket.
191
192Args:
193  bucket: string, Name of a Google Cloud Storage bucket. (required)
194  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
195  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
196
197Returns:
198  An object of the form:
199
200    { # A list of notification subscriptions.
201  &quot;items&quot;: [ # The list of items.
202    { # A subscription to receive Google PubSub notifications.
203      &quot;custom_attributes&quot;: { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
204        &quot;a_key&quot;: &quot;A String&quot;,
205      },
206      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for this subscription notification.
207      &quot;event_types&quot;: [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types.
208        &quot;A String&quot;,
209      ],
210      &quot;id&quot;: &quot;A String&quot;, # The ID of the notification.
211      &quot;kind&quot;: &quot;storage#notification&quot;, # The kind of item this is. For notifications, this is always storage#notification.
212      &quot;object_name_prefix&quot;: &quot;A String&quot;, # If present, only apply this notification configuration to object names that begin with this prefix.
213      &quot;payload_format&quot;: &quot;JSON_API_V1&quot;, # The desired content of the Payload.
214      &quot;selfLink&quot;: &quot;A String&quot;, # The canonical URL of this notification.
215      &quot;topic&quot;: &quot;A String&quot;, # The Cloud PubSub topic to which this subscription publishes. Formatted as: &#x27;//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}&#x27;
216    },
217  ],
218  &quot;kind&quot;: &quot;storage#notifications&quot;, # The kind of item this is. For lists of notifications, this is always storage#notifications.
219}</pre>
220</div>
221
222</body></html>