Skip to content

Commit

Permalink
CodeGen from PR 29824 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge aedd92d623a3b9b9e5885e7134ab8cb0869e2d93 into 27a9398801386caaba2df7e1a4d1a8abd19e3789
  • Loading branch information
SDKAuto committed Aug 8, 2024
1 parent 48cdbb2 commit a03d00d
Show file tree
Hide file tree
Showing 114 changed files with 4,842 additions and 5,474 deletions.
7 changes: 2 additions & 5 deletions sdk/appconfiguration/azure-mgmt-appconfiguration/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 App Configuration 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 Expand Up @@ -59,6 +59,3 @@ Code samples for this package can be found at:
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.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-appconfiguration%2FREADME.png)
15 changes: 9 additions & 6 deletions sdk/appconfiguration/azure-mgmt-appconfiguration/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"commit": "396209531039d3e211cb1ec0982606dbbdf64ac2",
"commit": "44d885fdd11102695098a041b2476f93e8907df6",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.4.3",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.17.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/appconfiguration/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.2 --version-tolerant=False",
"readme": "specification/appconfiguration/resource-manager/readme.md"
"autorest_command": "autorest specification/appconfiguration/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/appconfiguration/resource-manager/readme.md",
"package-2023-03-01": "2023-05-03 21:13:49 -0700 32e5ec18ee2125c2638de8d48d63053fa5e4af93 Microsoft.AppConfiguration/stable/2023-03-01/appconfiguration.json",
"package-2022-05-01": "2023-02-02 21:00:54 -0500 2c4244e5bcb8939167b79f633cdc17a1f0eae9be Microsoft.AppConfiguration/stable/2022-05-01/appconfiguration.json",
"package-2022-03-01-preview": "2022-07-19 19:54:15 -0700 0e1a9820941badc06e99bda9d1efa59de777efbf Microsoft.AppConfiguration/preview/2022-03-01-preview/appconfiguration.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
# --------------------------------------------------------------------------

from ._app_configuration_management_client import AppConfigurationManagementClient

__all__ = ["AppConfigurationManagementClient"]
__all__ = ['AppConfigurationManagementClient']

try:
from ._patch import patch_sdk # type: ignore

patch_sdk()
except ImportError:
pass
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

Expand All @@ -20,8 +19,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential


class AppConfigurationManagementClientConfiguration(Configuration):
class AppConfigurationManagementClientConfiguration:
"""Configuration for AppConfigurationManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -33,30 +31,36 @@ class AppConfigurationManagementClientConfiguration(Configuration):
:type subscription_id: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any):
def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(AppConfigurationManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "azure-mgmt-appconfiguration/{}".format(VERSION))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-appconfiguration/{}'.format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any):
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
def _configure(
self,
**kwargs: Any
):
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
self.credential, *self.credential_scopes, **kwargs
)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit a03d00d

Please sign in to comment.