Skip to content

Cdn release #12974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release History

## 5.1.0 (2020-08-10)

**Features**
- Add UrlSigningAction

## 5.0.0 (2020-07-21)

**Features**
Expand Down
28 changes: 10 additions & 18 deletions sdk/cdn/azure-mgmt-cdn/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure CDN Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs
that replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.

For a more complete set of Azure libraries, see the
[azure sdk python release](https://aka.ms/azsdk/python/all).
# Usage

## Usage
For code examples, see [CDN Management](https://docs.microsoft.com/python/api/overview/azure/cdn)
on docs.microsoft.com.

For code examples, see [CDN
Management](https://docs.microsoft.com/python/api/overview/azure/cdn) on
docs.microsoft.com.

## Provide Feedback
# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.

![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-cdn%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-cdn%2FREADME.png)
3 changes: 3 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
from ._models_py3 import UrlRedirectActionParameters
from ._models_py3 import UrlRewriteAction
from ._models_py3 import UrlRewriteActionParameters
from ._models_py3 import UrlSigningAction
from ._models_py3 import UrlSigningActionParameters
from ._models_py3 import UrlSigningKey
from ._models_py3 import UrlSigningParamIdentifier
Expand Down Expand Up @@ -217,6 +218,7 @@
from ._models import UrlRedirectActionParameters
from ._models import UrlRewriteAction
from ._models import UrlRewriteActionParameters
from ._models import UrlSigningAction
from ._models import UrlSigningActionParameters
from ._models import UrlSigningKey
from ._models import UrlSigningParamIdentifier
Expand Down Expand Up @@ -385,6 +387,7 @@
'UrlRedirectActionParameters',
'UrlRewriteAction',
'UrlRewriteActionParameters',
'UrlSigningAction',
'UrlSigningActionParameters',
'UrlSigningKey',
'UrlSigningParamIdentifier',
Expand Down
31 changes: 29 additions & 2 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ class DeliveryRuleAction(Model):
"""An action for the delivery rule.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: UrlRedirectAction, UrlRewriteAction,
sub-classes are: UrlRedirectAction, UrlSigningAction, UrlRewriteAction,
DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction,
DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction

Expand All @@ -952,7 +952,7 @@ class DeliveryRuleAction(Model):
}

_subtype_map = {
'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'}
'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlSigning': 'UrlSigningAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'}
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -4007,6 +4007,33 @@ def __init__(self, **kwargs):
self.preserve_unmatched_path = kwargs.get('preserve_unmatched_path', None)


class UrlSigningAction(DeliveryRuleAction):
"""Defines the url signing action for the delivery rule.

All required parameters must be populated in order to send to Azure.

:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters
"""

_validation = {
'name': {'required': True},
'parameters': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlSigningActionParameters'},
}

def __init__(self, **kwargs):
super(UrlSigningAction, self).__init__(**kwargs)
self.parameters = kwargs.get('parameters', None)
self.name = 'UrlSigning'


class UrlSigningActionParameters(Model):
"""Defines the parameters for the Url Signing action.

Expand Down
31 changes: 29 additions & 2 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ class DeliveryRuleAction(Model):
"""An action for the delivery rule.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: UrlRedirectAction, UrlRewriteAction,
sub-classes are: UrlRedirectAction, UrlSigningAction, UrlRewriteAction,
DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction,
DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction

Expand All @@ -952,7 +952,7 @@ class DeliveryRuleAction(Model):
}

_subtype_map = {
'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'}
'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlSigning': 'UrlSigningAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'}
}

def __init__(self, **kwargs) -> None:
Expand Down Expand Up @@ -4007,6 +4007,33 @@ def __init__(self, *, source_pattern: str, destination: str, preserve_unmatched_
self.preserve_unmatched_path = preserve_unmatched_path


class UrlSigningAction(DeliveryRuleAction):
"""Defines the url signing action for the delivery rule.

All required parameters must be populated in order to send to Azure.

:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters
"""

_validation = {
'name': {'required': True},
'parameters': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlSigningActionParameters'},
}

def __init__(self, *, parameters, **kwargs) -> None:
super(UrlSigningAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlSigning'


class UrlSigningActionParameters(Model):
"""Defines the parameters for the Url Signing action.

Expand Down
2 changes: 1 addition & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "5.0.0"
VERSION = "5.1.0"

2 changes: 1 addition & 1 deletion sdk/cdn/azure-mgmt-cdn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py')
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
Expand Down
Loading