Skip to content

Commit bee4d04

Browse files
author
SDKAuto
committed
CodeGen from PR 32356 in Azure/azure-rest-api-specs
Merge 247e911b22024d68fc26943ea8e21cd9d2394af4 into c5113dc2dec61ed59dd3a1fffbcb4d0747fd828c
1 parent d7d04c0 commit bee4d04

File tree

93 files changed

+3020
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3020
-990
lines changed

sdk/appconfiguration/azure-mgmt-appconfiguration/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Release History
22

3+
## 5.0.0b1 (2025-05-08)
4+
5+
### Features Added
6+
7+
- Client `AppConfigurationManagementClient` added operation group `experimentation`
8+
- Model `ConfigurationStore` added property `default_key_value_revision_retention_period_in_seconds`
9+
- Model `ConfigurationStore` added property `telemetry`
10+
- Model `ConfigurationStore` added property `managed_on_behalf_of_configuration`
11+
- Model `ConfigurationStoreUpdateParameters` added property `default_key_value_revision_retention_period_in_seconds`
12+
- Model `ConfigurationStoreUpdateParameters` added property `telemetry`
13+
- Added model `Experimentation`
14+
- Added model `ExperimentationListResult`
15+
- Added model `ManagedOnBehalfOfConfiguration`
16+
- Added model `MoboBrokerResource`
17+
- Added model `TelemetryProperties`
18+
- Added model `ExperimentationOperations`
19+
- Method `KeyValuesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, config_store_name: str, key_value_name: str, key_value_parameters: KeyValue, content_type: str)`
20+
- Method `KeyValuesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, config_store_name: str, key_value_name: str, key_value_parameters: IO[bytes], content_type: str)`
21+
- Method `ExperimentationOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, config_store_name: str, experimentation_name: str, experimentation_creation_parameters: Optional[Experimentation], content_type: str)`
22+
- Method `ExperimentationOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, config_store_name: str, experimentation_name: str, experimentation_creation_parameters: Optional[IO[bytes]], content_type: str)`
23+
24+
### Breaking Changes
25+
26+
- Method `KeyValuesOperations.create_or_update` removed default value `None` from its parameter `key_value_parameters`
27+
328
## 4.0.0 (2024-10-29)
429

530
### Breaking Changes

sdk/appconfiguration/azure-mgmt-appconfiguration/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

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

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

1313
### Prerequisites
1414

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

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "2776cb32cd6ca9ea953a13ae26c954b989e83367",
2+
"commit": "0e80888dcb1afd9e4b7a9a0ff9a4d04e4e128f19",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"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/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"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/python@6.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/appconfiguration/resource-manager/readme.md"
1111
}

sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._app_configuration_management_client import AppConfigurationManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._app_configuration_management_client import AppConfigurationManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"AppConfigurationManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_app_configuration_management_client.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import AppConfigurationManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ConfigurationStoresOperations,
25+
ExperimentationOperations,
2326
KeyValuesOperations,
2427
Operations,
2528
PrivateEndpointConnectionsOperations,
@@ -29,11 +32,10 @@
2932
)
3033

3134
if TYPE_CHECKING:
32-
# pylint: disable=unused-import,ungrouped-imports
3335
from azure.core.credentials import TokenCredential
3436

3537

36-
class AppConfigurationManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
38+
class AppConfigurationManagementClient: # pylint: disable=too-many-instance-attributes
3739
"""AppConfigurationManagementClient.
3840
3941
:ivar configuration_stores: ConfigurationStoresOperations operations
@@ -53,29 +55,33 @@ class AppConfigurationManagementClient: # pylint: disable=client-accepts-api-ve
5355
:vartype replicas: azure.mgmt.appconfiguration.operations.ReplicasOperations
5456
:ivar snapshots: SnapshotsOperations operations
5557
:vartype snapshots: azure.mgmt.appconfiguration.operations.SnapshotsOperations
58+
:ivar experimentation: ExperimentationOperations operations
59+
:vartype experimentation: azure.mgmt.appconfiguration.operations.ExperimentationOperations
5660
:param credential: Credential needed for the client to connect to Azure. Required.
5761
:type credential: ~azure.core.credentials.TokenCredential
5862
:param subscription_id: The Microsoft Azure subscription ID. Required.
5963
:type subscription_id: str
60-
:param base_url: Service URL. Default value is "https://management.azure.com".
64+
:param base_url: Service URL. Default value is None.
6165
:type base_url: str
62-
:keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this
63-
default value may result in unsupported behavior.
66+
:keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding
67+
this default value may result in unsupported behavior.
6468
:paramtype api_version: str
6569
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6670
Retry-After header is present.
6771
"""
6872

6973
def __init__(
70-
self,
71-
credential: "TokenCredential",
72-
subscription_id: str,
73-
base_url: str = "https://management.azure.com",
74-
**kwargs: Any
74+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7575
) -> None:
76+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
77+
_endpoints = get_arm_endpoints(_cloud)
78+
if not base_url:
79+
base_url = _endpoints["resource_manager"]
80+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7681
self._config = AppConfigurationManagementClientConfiguration(
77-
credential=credential, subscription_id=subscription_id, **kwargs
82+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
7883
)
84+
7985
_policies = kwargs.pop("policies", None)
8086
if _policies is None:
8187
_policies = [
@@ -94,7 +100,7 @@ def __init__(
94100
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
95101
self._config.http_logging_policy,
96102
]
97-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
103+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
98104

99105
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
100106
self._serialize = Serializer(client_models)
@@ -113,6 +119,7 @@ def __init__(
113119
self.key_values = KeyValuesOperations(self._client, self._config, self._serialize, self._deserialize)
114120
self.replicas = ReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
115121
self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize)
122+
self.experimentation = ExperimentationOperations(self._client, self._config, self._serialize, self._deserialize)
116123

117124
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
118125
"""Runs the network request through the client's chained policies.

sdk/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

@@ -28,13 +27,13 @@ class AppConfigurationManagementClientConfiguration: # pylint: disable=too-many
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The Microsoft Azure subscription ID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-05-01". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-05-01")
36+
api_version: str = kwargs.pop("api_version", "2025-02-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)