Skip to content
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

[AutoPR azure-mgmt-cdn] Make origin a ProxyResource instead of TrackedResource #1584

Closed
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
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 [Github repo](https://github.com/Azure/azure-sdk-for-python/)

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](https://pypi.python.org/pypi/azure) bundle package.
# 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)
16 changes: 13 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_cdn_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .operations import ProfilesOperations
from .operations import EndpointsOperations
from .operations import OriginsOperations
from .operations import OriginGroupsOperations
from .operations import CustomDomainsOperations
from .operations import ResourceUsageOperations
from .operations import Operations
Expand All @@ -38,6 +39,8 @@ class CdnManagementClient(CdnManagementClientOperationsMixin, SDKClient):
:vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations
:ivar origins: Origins operations
:vartype origins: azure.mgmt.cdn.operations.OriginsOperations
:ivar origin_groups: OriginGroups operations
:vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations
:ivar custom_domains: CustomDomains operations
:vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations
:ivar resource_usage: ResourceUsage operations
Expand All @@ -56,17 +59,22 @@ class CdnManagementClient(CdnManagementClientOperationsMixin, SDKClient):
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param subscription_id1: Azure Subscription ID.
:type subscription_id1: str
:param api_version1: Version of the API to be used with the client
request. Current version is 2017-04-02.
:type api_version1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, subscription_id1, api_version1, base_url=None):

self.config = CdnManagementClientConfiguration(credentials, subscription_id, base_url)
self.config = CdnManagementClientConfiguration(credentials, subscription_id, subscription_id1, api_version1, base_url)
super(CdnManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-06-15-preview'
self.api_version = '2020-04-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -76,6 +84,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.origins = OriginsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.origin_groups = OriginGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.custom_domains = CustomDomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_usage = ResourceUsageOperations(
Expand Down
13 changes: 12 additions & 1 deletion sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,25 @@ class CdnManagementClientConfiguration(AzureConfiguration):
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param subscription_id1: Azure Subscription ID.
:type subscription_id1: str
:param api_version1: Version of the API to be used with the client
request. Current version is 2017-04-02.
:type api_version1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):
self, credentials, subscription_id, subscription_id1, api_version1, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if subscription_id1 is None:
raise ValueError("Parameter 'subscription_id1' must not be None.")
if api_version1 is None:
raise ValueError("Parameter 'api_version1' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -46,3 +55,5 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.subscription_id1 = subscription_id1
self.api_version1 = api_version1
49 changes: 49 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 @@ -27,6 +27,7 @@
from ._models_py3 import CustomRule
from ._models_py3 import CustomRuleList
from ._models_py3 import DeepCreatedOrigin
from ._models_py3 import DeepCreatedOriginGroup
from ._models_py3 import DeliveryRule
from ._models_py3 import DeliveryRuleAction
from ._models_py3 import DeliveryRuleCacheExpirationAction
Expand Down Expand Up @@ -56,10 +57,13 @@
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import GeoFilter
from ._models_py3 import HeaderActionParameters
from ._models_py3 import HealthProbeParameters
from ._models_py3 import HttpErrorRangeParameters
from ._models_py3 import HttpVersionMatchConditionParameters
from ._models_py3 import IpAddressGroup
from ._models_py3 import IsDeviceMatchConditionParameters
from ._models_py3 import KeyVaultCertificateSourceParameters
from ._models_py3 import KeyVaultSigningKeyParameters
from ._models_py3 import LoadParameters
from ._models_py3 import ManagedRuleDefinition
from ._models_py3 import ManagedRuleGroupDefinition
Expand All @@ -72,6 +76,8 @@
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import Origin
from ._models_py3 import OriginGroup
from ._models_py3 import OriginGroupUpdateParameters
from ._models_py3 import OriginUpdateParameters
from ._models_py3 import PolicySettings
from ._models_py3 import PostArgsMatchConditionParameters
Expand All @@ -89,7 +95,9 @@
from ._models_py3 import RequestSchemeMatchConditionParameters
from ._models_py3 import RequestUriMatchConditionParameters
from ._models_py3 import Resource
from ._models_py3 import ResourceReference
from ._models_py3 import ResourceUsage
from ._models_py3 import ResponseBasedOriginErrorDetectionParameters
from ._models_py3 import Sku
from ._models_py3 import SsoUri
from ._models_py3 import SupportedOptimizationTypesListResult
Expand All @@ -101,6 +109,9 @@
from ._models_py3 import UrlRedirectActionParameters
from ._models_py3 import UrlRewriteAction
from ._models_py3 import UrlRewriteActionParameters
from ._models_py3 import UrlSigningActionParameters
from ._models_py3 import UrlSigningKey
from ._models_py3 import UrlSigningParamIdentifier
from ._models_py3 import UserManagedHttpsParameters
from ._models_py3 import ValidateCustomDomainInput
from ._models_py3 import ValidateCustomDomainOutput
Expand All @@ -124,6 +135,7 @@
from ._models import CustomRule
from ._models import CustomRuleList
from ._models import DeepCreatedOrigin
from ._models import DeepCreatedOriginGroup
from ._models import DeliveryRule
from ._models import DeliveryRuleAction
from ._models import DeliveryRuleCacheExpirationAction
Expand Down Expand Up @@ -153,10 +165,13 @@
from ._models import ErrorResponse, ErrorResponseException
from ._models import GeoFilter
from ._models import HeaderActionParameters
from ._models import HealthProbeParameters
from ._models import HttpErrorRangeParameters
from ._models import HttpVersionMatchConditionParameters
from ._models import IpAddressGroup
from ._models import IsDeviceMatchConditionParameters
from ._models import KeyVaultCertificateSourceParameters
from ._models import KeyVaultSigningKeyParameters
from ._models import LoadParameters
from ._models import ManagedRuleDefinition
from ._models import ManagedRuleGroupDefinition
Expand All @@ -169,6 +184,8 @@
from ._models import Operation
from ._models import OperationDisplay
from ._models import Origin
from ._models import OriginGroup
from ._models import OriginGroupUpdateParameters
from ._models import OriginUpdateParameters
from ._models import PolicySettings
from ._models import PostArgsMatchConditionParameters
Expand All @@ -186,7 +203,9 @@
from ._models import RequestSchemeMatchConditionParameters
from ._models import RequestUriMatchConditionParameters
from ._models import Resource
from ._models import ResourceReference
from ._models import ResourceUsage
from ._models import ResponseBasedOriginErrorDetectionParameters
from ._models import Sku
from ._models import SsoUri
from ._models import SupportedOptimizationTypesListResult
Expand All @@ -198,6 +217,9 @@
from ._models import UrlRedirectActionParameters
from ._models import UrlRewriteAction
from ._models import UrlRewriteActionParameters
from ._models import UrlSigningActionParameters
from ._models import UrlSigningKey
from ._models import UrlSigningParamIdentifier
from ._models import UserManagedHttpsParameters
from ._models import ValidateCustomDomainInput
from ._models import ValidateCustomDomainOutput
Expand All @@ -209,13 +231,17 @@
from ._paged_models import EndpointPaged
from ._paged_models import ManagedRuleSetDefinitionPaged
from ._paged_models import OperationPaged
from ._paged_models import OriginGroupPaged
from ._paged_models import OriginPaged
from ._paged_models import ProfilePaged
from ._paged_models import ResourceUsagePaged
from ._cdn_management_client_enums import (
SkuName,
ProfileResourceState,
OptimizationType,
HealthProbeRequestType,
ProbeProtocol,
ResponseBasedDetectedErrorTypes,
EndpointResourceState,
QueryStringCachingBehavior,
GeoFilterActions,
Expand All @@ -232,10 +258,14 @@
CookiesOperator,
RedirectType,
DestinationProtocol,
Algorithm,
ParamIndicator,
HeaderAction,
CacheBehavior,
QueryStringBehavior,
OriginResourceState,
PrivateEndpointStatus,
OriginGroupResourceState,
CustomDomainResourceState,
CustomHttpsProvisioningState,
CustomHttpsProvisioningSubstate,
Expand Down Expand Up @@ -273,6 +303,7 @@
'CustomRule',
'CustomRuleList',
'DeepCreatedOrigin',
'DeepCreatedOriginGroup',
'DeliveryRule',
'DeliveryRuleAction',
'DeliveryRuleCacheExpirationAction',
Expand Down Expand Up @@ -302,10 +333,13 @@
'ErrorResponse', 'ErrorResponseException',
'GeoFilter',
'HeaderActionParameters',
'HealthProbeParameters',
'HttpErrorRangeParameters',
'HttpVersionMatchConditionParameters',
'IpAddressGroup',
'IsDeviceMatchConditionParameters',
'KeyVaultCertificateSourceParameters',
'KeyVaultSigningKeyParameters',
'LoadParameters',
'ManagedRuleDefinition',
'ManagedRuleGroupDefinition',
Expand All @@ -318,6 +352,8 @@
'Operation',
'OperationDisplay',
'Origin',
'OriginGroup',
'OriginGroupUpdateParameters',
'OriginUpdateParameters',
'PolicySettings',
'PostArgsMatchConditionParameters',
Expand All @@ -335,7 +371,9 @@
'RequestSchemeMatchConditionParameters',
'RequestUriMatchConditionParameters',
'Resource',
'ResourceReference',
'ResourceUsage',
'ResponseBasedOriginErrorDetectionParameters',
'Sku',
'SsoUri',
'SupportedOptimizationTypesListResult',
Expand All @@ -347,6 +385,9 @@
'UrlRedirectActionParameters',
'UrlRewriteAction',
'UrlRewriteActionParameters',
'UrlSigningActionParameters',
'UrlSigningKey',
'UrlSigningParamIdentifier',
'UserManagedHttpsParameters',
'ValidateCustomDomainInput',
'ValidateCustomDomainOutput',
Expand All @@ -356,6 +397,7 @@
'ResourceUsagePaged',
'EndpointPaged',
'OriginPaged',
'OriginGroupPaged',
'CustomDomainPaged',
'OperationPaged',
'EdgeNodePaged',
Expand All @@ -364,6 +406,9 @@
'SkuName',
'ProfileResourceState',
'OptimizationType',
'HealthProbeRequestType',
'ProbeProtocol',
'ResponseBasedDetectedErrorTypes',
'EndpointResourceState',
'QueryStringCachingBehavior',
'GeoFilterActions',
Expand All @@ -380,10 +425,14 @@
'CookiesOperator',
'RedirectType',
'DestinationProtocol',
'Algorithm',
'ParamIndicator',
'HeaderAction',
'CacheBehavior',
'QueryStringBehavior',
'OriginResourceState',
'PrivateEndpointStatus',
'OriginGroupResourceState',
'CustomDomainResourceState',
'CustomHttpsProvisioningState',
'CustomHttpsProvisioningSubstate',
Expand Down
Loading