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 "custom_attributes": { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. 125 "a_key": "A String", 126 }, 127 "etag": "A String", # HTTP 1.1 Entity tag for this subscription notification. 128 "event_types": [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types. 129 "A String", 130 ], 131 "id": "A String", # The ID of the notification. 132 "kind": "storage#notification", # The kind of item this is. For notifications, this is always storage#notification. 133 "object_name_prefix": "A String", # If present, only apply this notification configuration to object names that begin with this prefix. 134 "payload_format": "JSON_API_V1", # The desired content of the Payload. 135 "selfLink": "A String", # The canonical URL of this notification. 136 "topic": "A String", # The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' 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 "custom_attributes": { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. 151 "a_key": "A String", 152 }, 153 "etag": "A String", # HTTP 1.1 Entity tag for this subscription notification. 154 "event_types": [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types. 155 "A String", 156 ], 157 "id": "A String", # The ID of the notification. 158 "kind": "storage#notification", # The kind of item this is. For notifications, this is always storage#notification. 159 "object_name_prefix": "A String", # If present, only apply this notification configuration to object names that begin with this prefix. 160 "payload_format": "JSON_API_V1", # The desired content of the Payload. 161 "selfLink": "A String", # The canonical URL of this notification. 162 "topic": "A String", # The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' 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 "custom_attributes": { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. 173 "a_key": "A String", 174 }, 175 "etag": "A String", # HTTP 1.1 Entity tag for this subscription notification. 176 "event_types": [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types. 177 "A String", 178 ], 179 "id": "A String", # The ID of the notification. 180 "kind": "storage#notification", # The kind of item this is. For notifications, this is always storage#notification. 181 "object_name_prefix": "A String", # If present, only apply this notification configuration to object names that begin with this prefix. 182 "payload_format": "JSON_API_V1", # The desired content of the Payload. 183 "selfLink": "A String", # The canonical URL of this notification. 184 "topic": "A String", # The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' 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 "items": [ # The list of items. 202 { # A subscription to receive Google PubSub notifications. 203 "custom_attributes": { # An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription. 204 "a_key": "A String", 205 }, 206 "etag": "A String", # HTTP 1.1 Entity tag for this subscription notification. 207 "event_types": [ # If present, only send notifications about listed event types. If empty, sent notifications for all event types. 208 "A String", 209 ], 210 "id": "A String", # The ID of the notification. 211 "kind": "storage#notification", # The kind of item this is. For notifications, this is always storage#notification. 212 "object_name_prefix": "A String", # If present, only apply this notification configuration to object names that begin with this prefix. 213 "payload_format": "JSON_API_V1", # The desired content of the Payload. 214 "selfLink": "A String", # The canonical URL of this notification. 215 "topic": "A String", # The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' 216 }, 217 ], 218 "kind": "storage#notifications", # The kind of item this is. For lists of notifications, this is always storage#notifications. 219}</pre> 220</div> 221 222</body></html>