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

[ReleasePR track2_azure-mgmt-cdn] Adding LOR extension for CDN custom domain enable/disable https endpoint #17558

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
3 changes: 0 additions & 3 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# --------------------------------------------------------------------------

from ._cdn_management_client import CdnManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['CdnManagementClient']

try:
Expand Down
3 changes: 1 addition & 2 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class CdnManagementClientConfiguration(Configuration):
"""Configuration for CdnManagementClient.
Expand Down
118 changes: 118 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"chosen_version": "2020-09-01",
"total_api_version_list": ["2020-09-01"],
"client": {
"name": "CdnManagementClient",
"filename": "_cdn_management_client",
"description": "Cdn Management Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"profiles": "ProfilesOperations",
"endpoints": "EndpointsOperations",
"origins": "OriginsOperations",
"origin_groups": "OriginGroupsOperations",
"custom_domains": "CustomDomainsOperations",
"resource_usage": "ResourceUsageOperations",
"operations": "Operations",
"edge_nodes": "EdgeNodesOperations",
"afd_profiles": "AFDProfilesOperations",
"afd_custom_domains": "AFDCustomDomainsOperations",
"afd_endpoints": "AFDEndpointsOperations",
"afd_origin_groups": "AFDOriginGroupsOperations",
"afd_origins": "AFDOriginsOperations",
"routes": "RoutesOperations",
"rule_sets": "RuleSetsOperations",
"rules": "RulesOperations",
"security_policies": "SecurityPoliciesOperations",
"secrets": "SecretsOperations",
"validate": "ValidateOperations",
"log_analytics": "LogAnalyticsOperations",
"policies": "PoliciesOperations",
"managed_rule_sets": "ManagedRuleSetsOperations"
},
"operation_mixins": {
"check_name_availability" : {
"sync": {
"signature": "def check_name_availability(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n",
"doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"async": {
"coroutine": true,
"signature": "async def check_name_availability(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n",
"doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"call": "check_name_availability_input"
},
"check_name_availability_with_subscription" : {
"sync": {
"signature": "def check_name_availability_with_subscription(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n",
"doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"async": {
"coroutine": true,
"signature": "async def check_name_availability_with_subscription(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n",
"doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"call": "check_name_availability_input"
},
"validate_probe" : {
"sync": {
"signature": "def validate_probe(\n self,\n validate_probe_input, # type: \"_models.ValidateProbeInput\"\n **kwargs # type: Any\n):\n",
"doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"async": {
"coroutine": true,
"signature": "async def validate_probe(\n self,\n validate_probe_input: \"_models.ValidateProbeInput\",\n **kwargs\n) -\u003e \"_models.ValidateProbeOutput\":\n",
"doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
},
"call": "validate_probe_input"
}
},
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}"
}
3 changes: 1 addition & 2 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

VERSION = "unknown"

class CdnManagementClientConfiguration(Configuration):
"""Configuration for CdnManagementClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async def _create_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201]:
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand All @@ -236,6 +236,9 @@ async def _create_initial(
if response.status_code == 201:
deserialized = self._deserialize('AFDDomain', pipeline_response)

if response.status_code == 202:
deserialized = self._deserialize('AFDDomain', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

Expand Down Expand Up @@ -491,7 +494,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async def _create_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201]:
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand All @@ -236,6 +236,9 @@ async def _create_initial(
if response.status_code == 201:
deserialized = self._deserialize('AFDEndpoint', pipeline_response)

if response.status_code == 202:
deserialized = self._deserialize('AFDEndpoint', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

Expand Down Expand Up @@ -495,7 +498,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ async def _create_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201]:
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand All @@ -235,6 +235,9 @@ async def _create_initial(
if response.status_code == 201:
deserialized = self._deserialize('AFDOriginGroup', pipeline_response)

if response.status_code == 202:
deserialized = self._deserialize('AFDOriginGroup', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

Expand Down Expand Up @@ -490,7 +493,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async def _create_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201]:
if response.status_code not in [200, 201, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand All @@ -245,6 +245,9 @@ async def _create_initial(
if response.status_code == 201:
deserialized = self._deserialize('AFDOrigin', pipeline_response)

if response.status_code == 202:
deserialized = self._deserialize('AFDOrigin', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

Expand Down Expand Up @@ -514,7 +517,7 @@ async def _delete_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.AfdErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
Expand Down
Loading