Azure CDN libraries for python
Overview
Azure Content Delivery Network (CDN) allows you to provide web content caches to ensure high-bandwidth availability across the globe.
To get started with Azure CDN, see Getting started with Azure CDN.
Management APIs
Create, query, and manage Azure CDNs with the management API.
Install the management package via pip.
pip install azure-mgmt-cdn
Example
Creating a CDN profile with a single defined endpoint:
from azure.mgmt.cdn import CdnManagementClient
cdn_client = CdnManagementClient(credentials, 'your-subscription-id')
profile_poller = cdn_client.profiles.create('my-resource-group',
'cdn-name',
{
"location": "some_region",
"sku": {
"name": "sku_tier"
}
})
profile = profile_poller.result()
endpoint_poller = cdn_client.endpoints.create('my-resource-group',
'cdn-name',
'unique-endpoint-name',
{
"location": "any_region",
"origins": [
{
"name": "origin_name",
"host_name": "url"
}]
})
endpoint = endpoint_poller.result()
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Azure SDK for Python