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