MCPcopy Create free account
hub / github.com/Azure/azure-storage-python / service_properties

Method service_properties

samples/queue/queue_usage.py:301–320  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

299 self.service.delete_queue(queue_name)
300
301 def service_properties(self):
302 # Basic
303 self.service.set_queue_service_properties(logging=Logging(delete=True),
304 hour_metrics=Metrics(enabled=True, include_apis=True),
305 minute_metrics=Metrics(enabled=True, include_apis=False),
306 cors=[CorsRule(allowed_origins=['*'], allowed_methods=['GET'])])
307
308 # Wait 30 seconds for settings to propagate
309 time.sleep(30)
310
311 props = self.service.get_queue_service_properties() # props = ServiceProperties() w/ all properties specified above
312
313 # Omitted properties will not overwrite what's already on the self.service
314 # Empty properties will clear
315 self.service.set_queue_service_properties(cors=[])
316
317 # Wait 30 seconds for settings to propagate
318 time.sleep(30)
319
320 props = self.service.get_queue_service_properties() # props = ServiceProperties() w/ CORS rules cleared

Callers

nothing calls this directly

Calls 6

LoggingClass · 0.90
MetricsClass · 0.90
CorsRuleClass · 0.90
sleepMethod · 0.80

Tested by

no test coverage detected