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