Skip to content

Commit

Permalink
CodeGen from PR 12798 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge d8ff3e54c4bd7da2eb975be6ba58fc9e4117523a into b6612fa
  • Loading branch information
SDKAuto committed Feb 4, 2021
1 parent 5aa3396 commit 85bbe0e
Show file tree
Hide file tree
Showing 28 changed files with 457 additions and 358 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,13 @@ 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 2019-09-01.
:type api_version1: str
:param str base_url: Service URL
"""

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

self.config = CdnManagementClientConfiguration(credentials, subscription_id, subscription_id1, api_version1, base_url)
self.config = CdnManagementClientConfiguration(credentials, subscription_id, 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)}
Expand Down
13 changes: 1 addition & 12 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,16 @@ 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 2019-09-01.
:type api_version1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, subscription_id1, api_version1, base_url=None):
self, credentials, subscription_id, 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 @@ -55,5 +46,3 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.subscription_id1 = subscription_id1
self.api_version1 = api_version1
29 changes: 27 additions & 2 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
from ._models_py3 import SecretProperties
from ._models_py3 import SecurityPolicy
from ._models_py3 import SecurityPolicyParameters
from ._models_py3 import SecurityPolicyProperties
from ._models_py3 import SecurityPolicyWebApplicationFirewallAssociation
from ._models_py3 import SecurityPolicyWebApplicationFirewallParameters
from ._models_py3 import SharedPrivateLinkResourceProperties
Expand Down Expand Up @@ -318,6 +319,7 @@
from ._models import SecretProperties
from ._models import SecurityPolicy
from ._models import SecurityPolicyParameters
from ._models import SecurityPolicyProperties
from ._models import SecurityPolicyWebApplicationFirewallAssociation
from ._models import SecurityPolicyWebApplicationFirewallParameters
from ._models import SharedPrivateLinkResourceProperties
Expand Down Expand Up @@ -423,8 +425,8 @@
DomainValidationState,
EnabledState,
AFDEndpointProtocols,
SecretType,
SharedPrivateLinkResourceStatus,
AfdQueryStringCachingBehavior,
ForwardingProtocol,
LinkToDefaultDomain,
HttpsRedirect,
Expand All @@ -439,6 +441,17 @@
ManagedRuleEnabledState,
ProvisioningState,
PolicyResourceState,
LogMetric,
LogMetricsGranularity,
LogMetricsGroupBy,
LogRanking,
LogRankingMetric,
WafMetric,
WafGranularity,
WafAction,
WafRankingGroupBy,
WafRuleType,
WafRankingType,
)

__all__ = [
Expand Down Expand Up @@ -577,6 +590,7 @@
'SecretProperties',
'SecurityPolicy',
'SecurityPolicyParameters',
'SecurityPolicyProperties',
'SecurityPolicyWebApplicationFirewallAssociation',
'SecurityPolicyWebApplicationFirewallParameters',
'SharedPrivateLinkResourceProperties',
Expand Down Expand Up @@ -681,8 +695,8 @@
'DomainValidationState',
'EnabledState',
'AFDEndpointProtocols',
'SecretType',
'SharedPrivateLinkResourceStatus',
'AfdQueryStringCachingBehavior',
'ForwardingProtocol',
'LinkToDefaultDomain',
'HttpsRedirect',
Expand All @@ -697,4 +711,15 @@
'ManagedRuleEnabledState',
'ProvisioningState',
'PolicyResourceState',
'LogMetric',
'LogMetricsGranularity',
'LogMetricsGroupBy',
'LogRanking',
'LogRankingMetric',
'WafMetric',
'WafGranularity',
'WafAction',
'WafRankingGroupBy',
'WafRuleType',
'WafRankingType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,6 @@ class AFDEndpointProtocols(str, Enum):
https = "Https"


class SecretType(str, Enum):

url_signing_key = "UrlSigningKey"
customer_certificate = "CustomerCertificate"
managed_certificate = "ManagedCertificate"


class SharedPrivateLinkResourceStatus(str, Enum):

pending = "Pending"
Expand All @@ -448,6 +441,13 @@ class SharedPrivateLinkResourceStatus(str, Enum):
timeout = "Timeout"


class AfdQueryStringCachingBehavior(str, Enum):

ignore_query_string = "IgnoreQueryString"
use_query_string = "UseQueryString"
not_set = "NotSet"


class ForwardingProtocol(str, Enum):

http_only = "HttpOnly"
Expand Down Expand Up @@ -559,3 +559,93 @@ class PolicyResourceState(str, Enum):
disabling = "Disabling"
disabled = "Disabled"
deleting = "Deleting"


class LogMetric(str, Enum):

client_request_count = "clientRequestCount"
client_request_traffic = "clientRequestTraffic"
client_request_bandwidth = "clientRequestBandwidth"
origin_request_traffic = "originRequestTraffic"
origin_request_bandwidth = "originRequestBandwidth"
total_latency = "totalLatency"


class LogMetricsGranularity(str, Enum):

pt5_m = "PT5M"
pt1_h = "PT1H"
p1_d = "P1D"


class LogMetricsGroupBy(str, Enum):

http_status_code = "httpStatusCode"
protocol = "protocol"
cache_status = "cacheStatus"
country = "country"
custom_domain = "customDomain"


class LogRanking(str, Enum):

url = "url"
referrer = "referrer"
browser = "browser"
user_agent = "userAgent"
country_or_region = "countryOrRegion"


class LogRankingMetric(str, Enum):

client_request_count = "clientRequestCount"
client_request_traffic = "clientRequestTraffic"
hit_count = "hitCount"
miss_count = "missCount"
user_error_count = "userErrorCount"
error_count = "errorCount"


class WafMetric(str, Enum):

client_request_count = "clientRequestCount"


class WafGranularity(str, Enum):

pt5_m = "PT5M"
pt1_h = "PT1H"
p1_d = "P1D"


class WafAction(str, Enum):

allow = "allow"
block = "block"
log = "log"
redirect = "redirect"


class WafRankingGroupBy(str, Enum):

http_status_code = "httpStatusCode"
custom_domain = "customDomain"


class WafRuleType(str, Enum):

managed = "managed"
custom = "custom"
bot = "bot"


class WafRankingType(str, Enum):

action = "action"
rule_group = "ruleGroup"
rule_id = "ruleId"
user_agent = "userAgent"
client_ip = "clientIp"
url = "url"
country = "country"
rule_type = "ruleType"
Loading

0 comments on commit 85bbe0e

Please sign in to comment.