Skip to content
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
13 changes: 13 additions & 0 deletions sdk/nginx/azure-mgmt-nginx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 3.1.0b1 (2024-03-18)

### Features Added

- Added operation ConfigurationsOperations.analysis
- Model NginxCertificateProperties has a new parameter certificate_error
- Model NginxCertificateProperties has a new parameter key_vault_secret_created
- Model NginxCertificateProperties has a new parameter key_vault_secret_version
- Model NginxCertificateProperties has a new parameter sha1_thumbprint
- Model NginxDeploymentProperties has a new parameter auto_upgrade_profile
- Model NginxDeploymentScalingProperties has a new parameter profiles
- Model NginxDeploymentUpdateProperties has a new parameter auto_upgrade_profile

## 3.0.0 (2023-11-20)

### Features Added
Expand Down
4 changes: 2 additions & 2 deletions sdk/nginx/azure-mgmt-nginx/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Nginx Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand Down
4 changes: 2 additions & 2 deletions sdk/nginx/azure-mgmt-nginx/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "11bbc2b1df2e915a2227a6a1a48a27b9e67c3311",
"commit": "cf5ad1932d00c7d15497705ad6b71171d3d68b1e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/nginx/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/nginx/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2024-01-01-preview --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
"readme": "specification/nginx/resource-manager/readme.md"
}
6 changes: 6 additions & 0 deletions sdk/nginx/azure-mgmt-nginx/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/nginx/azure-mgmt-nginx",
"Tag": "python/nginx/azure-mgmt-nginx_7deb46f428"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class NginxManagementClientConfiguration(Configuration): # pylint: disable=too-
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-01-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(NginxManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-04-01")
api_version: str = kwargs.pop("api_version", "2024-01-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class NginxManagementClient: # pylint: disable=client-accepts-api-version-keywo
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-01-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
2 changes: 1 addition & 1 deletion sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.0.0"
VERSION = "3.1.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class NginxManagementClientConfiguration(Configuration): # pylint: disable=too-
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-01-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(NginxManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-04-01")
api_version: str = kwargs.pop("api_version", "2024-01-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class NginxManagementClient: # pylint: disable=client-accepts-api-version-keywo
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-01-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._configurations_operations import (
build_analysis_request,
build_create_or_update_request,
build_delete_request,
build_get_request,
Expand Down Expand Up @@ -607,3 +608,170 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
begin_delete.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}"
}

@overload
async def analysis(
self,
resource_group_name: str,
deployment_name: str,
configuration_name: str,
body: Optional[_models.AnalysisCreate] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> _models.AnalysisResult:
"""Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param deployment_name: The name of targeted NGINX deployment. Required.
:type deployment_name: str
:param configuration_name: The name of configuration, only 'default' is supported value due to
the singleton of NGINX conf. Required.
:type configuration_name: str
:param body: The NGINX configuration to analyze. Default value is None.
:type body: ~azure.mgmt.nginx.models.AnalysisCreate
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AnalysisResult or the result of cls(response)
:rtype: ~azure.mgmt.nginx.models.AnalysisResult
:raises ~azure.core.exceptions.HttpResponseError:
"""

@overload
async def analysis(
self,
resource_group_name: str,
deployment_name: str,
configuration_name: str,
body: Optional[IO] = None,
*,
content_type: str = "application/json",
**kwargs: Any
) -> _models.AnalysisResult:
"""Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param deployment_name: The name of targeted NGINX deployment. Required.
:type deployment_name: str
:param configuration_name: The name of configuration, only 'default' is supported value due to
the singleton of NGINX conf. Required.
:type configuration_name: str
:param body: The NGINX configuration to analyze. Default value is None.
:type body: IO
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AnalysisResult or the result of cls(response)
:rtype: ~azure.mgmt.nginx.models.AnalysisResult
:raises ~azure.core.exceptions.HttpResponseError:
"""

@distributed_trace_async
async def analysis(
self,
resource_group_name: str,
deployment_name: str,
configuration_name: str,
body: Optional[Union[_models.AnalysisCreate, IO]] = None,
**kwargs: Any
) -> _models.AnalysisResult:
"""Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

Analyze an NGINX configuration without applying it to the NGINXaaS deployment.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param deployment_name: The name of targeted NGINX deployment. Required.
:type deployment_name: str
:param configuration_name: The name of configuration, only 'default' is supported value due to
the singleton of NGINX conf. Required.
:type configuration_name: str
:param body: The NGINX configuration to analyze. Is either a AnalysisCreate type or a IO type.
Default value is None.
:type body: ~azure.mgmt.nginx.models.AnalysisCreate or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AnalysisResult or the result of cls(response)
:rtype: ~azure.mgmt.nginx.models.AnalysisResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AnalysisResult] = kwargs.pop("cls", None)

content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(body, (IOBase, bytes)):
_content = body
else:
if body is not None:
_json = self._serialize.body(body, "AnalysisCreate")
else:
_json = None

request = build_analysis_request(
resource_group_name=resource_group_name,
deployment_name=deployment_name,
configuration_name=configuration_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
template_url=self.analysis.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(
_models.ResourceProviderDefaultErrorResponse, pipeline_response
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("AnalysisResult", pipeline_response)

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

return deserialized

analysis.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze"
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def __init__(self, *args, **kwargs) -> None:

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationResult"]:
"""List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version.
"""List all operations provided by Nginx.NginxPlus for the 2024-01-01-preview api version.

List all operations provided by Nginx.NginxPlus for the 2023-04-01 api version.
List all operations provided by Nginx.NginxPlus for the 2024-01-01-preview api version.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OperationResult or the result of cls(response)
Expand Down
24 changes: 22 additions & 2 deletions sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._models_py3 import ErrorResponseBody
from ._models_py3 import AnalysisCreate
from ._models_py3 import AnalysisCreateConfig
from ._models_py3 import AnalysisDiagnostic
from ._models_py3 import AnalysisResult
from ._models_py3 import AnalysisResultData
from ._models_py3 import AutoUpgradeProfile
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import IdentityProperties
from ._models_py3 import NginxCertificate
from ._models_py3 import NginxCertificateErrorResponseBody
from ._models_py3 import NginxCertificateListResponse
from ._models_py3 import NginxCertificateProperties
from ._models_py3 import NginxConfiguration
Expand All @@ -35,6 +43,8 @@
from ._models_py3 import OperationResult
from ._models_py3 import ResourceProviderDefaultErrorResponse
from ._models_py3 import ResourceSku
from ._models_py3 import ScaleProfile
from ._models_py3 import ScaleProfileCapacity
from ._models_py3 import SystemData
from ._models_py3 import UserIdentityProperties

Expand All @@ -47,9 +57,17 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"ErrorResponseBody",
"AnalysisCreate",
"AnalysisCreateConfig",
"AnalysisDiagnostic",
"AnalysisResult",
"AnalysisResultData",
"AutoUpgradeProfile",
"ErrorAdditionalInfo",
"ErrorDetail",
"IdentityProperties",
"NginxCertificate",
"NginxCertificateErrorResponseBody",
"NginxCertificateListResponse",
"NginxCertificateProperties",
"NginxConfiguration",
Expand All @@ -76,6 +94,8 @@
"OperationResult",
"ResourceProviderDefaultErrorResponse",
"ResourceSku",
"ScaleProfile",
"ScaleProfileCapacity",
"SystemData",
"UserIdentityProperties",
"CreatedByType",
Expand Down
Loading