Skip to content

Commit 83f2694

Browse files
[AutoRelease] t2-appcontainers-2024-08-02-27805(can only be merged by SDK owner) (#36723)
* code and test * update-testcase * Update testcases * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent af56b65 commit 83f2694

File tree

310 files changed

+7547
-17064
lines changed

Some content is hidden

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

310 files changed

+7547
-17064
lines changed

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

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

3+
## 3.1.0 (2024-08-06)
4+
5+
### Features Added
6+
7+
- The 'azure.mgmt.appcontainers.ContainerAppsAPIClient' client method 'get_custom_domain_verification_id' was added in the current version
8+
- The 'azure.mgmt.appcontainers.ContainerAppsAPIClient' client had operation group 'usages' added in the current version
9+
- The 'azure.mgmt.appcontainers.ContainerAppsAPIClient' client had operation group 'managed_environment_usages' added in the current version
10+
- The 'azure.mgmt.appcontainers.aio.ContainerAppsAPIClient' client method 'get_custom_domain_verification_id' was added in the current version
11+
- The 'azure.mgmt.appcontainers.aio.ContainerAppsAPIClient' client had operation group 'usages' added in the current version
12+
- The 'azure.mgmt.appcontainers.aio.ContainerAppsAPIClient' client had operation group 'managed_environment_usages' added in the current version
13+
- The 'azure.mgmt.appcontainers.aio.operations.ContainerAppsAPIClientOperationsMixin' method 'get_custom_domain_verification_id' was added in the current version
14+
- The 'azure.mgmt.appcontainers.aio.operations.JobsOperations' method 'get_detector' was added in the current version
15+
- The 'azure.mgmt.appcontainers.aio.operations.JobsOperations' method 'list_detectors' was added in the current version
16+
- The 'azure.mgmt.appcontainers.aio.operations.JobsOperations' method 'proxy_get' was added in the current version
17+
- The model or publicly exposed class 'azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentUsagesOperations' was added in the current version
18+
- The model or publicly exposed class 'azure.mgmt.appcontainers.aio.operations.UsagesOperations' was added in the current version
19+
- The 'azure.mgmt.appcontainers.operations.ContainerAppsAPIClientOperationsMixin' method 'get_custom_domain_verification_id' was added in the current version
20+
- The 'azure.mgmt.appcontainers.operations.JobsOperations' method 'get_detector' was added in the current version
21+
- The 'azure.mgmt.appcontainers.operations.JobsOperations' method 'list_detectors' was added in the current version
22+
- The 'azure.mgmt.appcontainers.operations.JobsOperations' method 'proxy_get' was added in the current version
23+
- The model or publicly exposed class 'azure.mgmt.appcontainers.operations.ManagedEnvironmentUsagesOperations' was added in the current version
24+
- The model or publicly exposed class 'azure.mgmt.appcontainers.operations.UsagesOperations' was added in the current version
25+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.AuthConfig' had property 'encryption_settings' added in the current version
26+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.AvailableWorkloadProfileProperties' had property 'gpus' added in the current version
27+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.Ingress' had property 'additional_port_mappings' added in the current version
28+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.Login' had property 'token_store' added in the current version
29+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.ManagedEnvironment' had property 'peer_traffic_configuration' added in the current version
30+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.BlobStorageTokenStore' was added in the current version
31+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.EncryptionSettings' was added in the current version
32+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.IngressPortMapping' was added in the current version
33+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.ListUsagesResult' was added in the current version
34+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration' was added in the current version
35+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption' was added in the current version
36+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.TokenStore' was added in the current version
37+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.Usage' was added in the current version
38+
- The model or publicly exposed class 'azure.mgmt.appcontainers.models.UsageName' was added in the current version
39+
340
## 3.1.0b1 (2024-03-18)
441

542
### Features Added
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c",
2+
"commit": "c4b33165c43ba9253bb5b36a8c907dbef570bb6f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.17.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/app/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/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/app/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2024-03 --use=@autorest/python@6.17.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/app/resource-manager/readme.md"
1111
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "python",
4+
"TagPrefix": "python/appcontainers/azure-mgmt-appcontainers",
5+
"Tag": "python/appcontainers/azure-mgmt-appcontainers_61b453d1ec"
6+
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class ContainerAppsAPIClientConfiguration: # pylint: disable=too-many-instance-
2626
2727
:param credential: Credential needed for the client to connect to Azure. Required.
2828
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
29+
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-11-02-preview". Note that overriding
32-
this default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2024-03-01". Note that overriding this
32+
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-11-02-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-03-01")
3838

3939
if credential is None:
4040
raise ValueError("Parameter 'credential' must not be None.")

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -18,13 +19,8 @@
1819
from ._configuration import ContainerAppsAPIClientConfiguration
1920
from ._serialization import Deserializer, Serializer
2021
from .operations import (
21-
AppResiliencyOperations,
2222
AvailableWorkloadProfilesOperations,
2323
BillingMetersOperations,
24-
BuildAuthTokenOperations,
25-
BuildersOperations,
26-
BuildsByBuilderResourceOperations,
27-
BuildsOperations,
2824
CertificatesOperations,
2925
ConnectedEnvironmentsCertificatesOperations,
3026
ConnectedEnvironmentsDaprComponentsOperations,
@@ -37,11 +33,7 @@
3733
ContainerAppsRevisionReplicasOperations,
3834
ContainerAppsRevisionsOperations,
3935
ContainerAppsSourceControlsOperations,
40-
DaprComponentResiliencyPoliciesOperations,
4136
DaprComponentsOperations,
42-
DaprSubscriptionsOperations,
43-
DotNetComponentsOperations,
44-
JavaComponentsOperations,
4537
JobsExecutionsOperations,
4638
JobsOperations,
4739
ManagedCertificatesOperations,
@@ -65,8 +57,6 @@ class ContainerAppsAPIClient(
6557
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
6658
"""ContainerAppsAPIClient.
6759
68-
:ivar app_resiliency: AppResiliencyOperations operations
69-
:vartype app_resiliency: azure.mgmt.appcontainers.operations.AppResiliencyOperations
7060
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
7161
:vartype container_apps_auth_configs:
7262
azure.mgmt.appcontainers.operations.ContainerAppsAuthConfigsOperations
@@ -75,15 +65,6 @@ class ContainerAppsAPIClient(
7565
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
7666
:ivar billing_meters: BillingMetersOperations operations
7767
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
78-
:ivar builders: BuildersOperations operations
79-
:vartype builders: azure.mgmt.appcontainers.operations.BuildersOperations
80-
:ivar builds_by_builder_resource: BuildsByBuilderResourceOperations operations
81-
:vartype builds_by_builder_resource:
82-
azure.mgmt.appcontainers.operations.BuildsByBuilderResourceOperations
83-
:ivar builds: BuildsOperations operations
84-
:vartype builds: azure.mgmt.appcontainers.operations.BuildsOperations
85-
:ivar build_auth_token: BuildAuthTokenOperations operations
86-
:vartype build_auth_token: azure.mgmt.appcontainers.operations.BuildAuthTokenOperations
8768
:ivar connected_environments: ConnectedEnvironmentsOperations operations
8869
:vartype connected_environments:
8970
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
@@ -131,13 +112,8 @@ class ContainerAppsAPIClient(
131112
azure.mgmt.appcontainers.operations.ManagedCertificatesOperations
132113
:ivar namespaces: NamespacesOperations operations
133114
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
134-
:ivar dapr_component_resiliency_policies: DaprComponentResiliencyPoliciesOperations operations
135-
:vartype dapr_component_resiliency_policies:
136-
azure.mgmt.appcontainers.operations.DaprComponentResiliencyPoliciesOperations
137115
:ivar dapr_components: DaprComponentsOperations operations
138116
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
139-
:ivar dapr_subscriptions: DaprSubscriptionsOperations operations
140-
:vartype dapr_subscriptions: azure.mgmt.appcontainers.operations.DaprSubscriptionsOperations
141117
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
142118
:vartype managed_environments_storages:
143119
azure.mgmt.appcontainers.operations.ManagedEnvironmentsStoragesOperations
@@ -149,18 +125,14 @@ class ContainerAppsAPIClient(
149125
:ivar managed_environment_usages: ManagedEnvironmentUsagesOperations operations
150126
:vartype managed_environment_usages:
151127
azure.mgmt.appcontainers.operations.ManagedEnvironmentUsagesOperations
152-
:ivar java_components: JavaComponentsOperations operations
153-
:vartype java_components: azure.mgmt.appcontainers.operations.JavaComponentsOperations
154-
:ivar dot_net_components: DotNetComponentsOperations operations
155-
:vartype dot_net_components: azure.mgmt.appcontainers.operations.DotNetComponentsOperations
156128
:param credential: Credential needed for the client to connect to Azure. Required.
157129
:type credential: ~azure.core.credentials.TokenCredential
158-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
130+
:param subscription_id: The ID of the target subscription. Required.
159131
:type subscription_id: str
160132
:param base_url: Service URL. Default value is "https://management.azure.com".
161133
:type base_url: str
162-
:keyword api_version: Api Version. Default value is "2023-11-02-preview". Note that overriding
163-
this default value may result in unsupported behavior.
134+
:keyword api_version: Api Version. Default value is "2024-03-01". Note that overriding this
135+
default value may result in unsupported behavior.
164136
:paramtype api_version: str
165137
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
166138
Retry-After header is present.
@@ -200,20 +172,13 @@ def __init__(
200172
self._serialize = Serializer(client_models)
201173
self._deserialize = Deserializer(client_models)
202174
self._serialize.client_side_validation = False
203-
self.app_resiliency = AppResiliencyOperations(self._client, self._config, self._serialize, self._deserialize)
204175
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
205176
self._client, self._config, self._serialize, self._deserialize
206177
)
207178
self.available_workload_profiles = AvailableWorkloadProfilesOperations(
208179
self._client, self._config, self._serialize, self._deserialize
209180
)
210181
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
211-
self.builders = BuildersOperations(self._client, self._config, self._serialize, self._deserialize)
212-
self.builds_by_builder_resource = BuildsByBuilderResourceOperations(
213-
self._client, self._config, self._serialize, self._deserialize
214-
)
215-
self.builds = BuildsOperations(self._client, self._config, self._serialize, self._deserialize)
216-
self.build_auth_token = BuildAuthTokenOperations(self._client, self._config, self._serialize, self._deserialize)
217182
self.connected_environments = ConnectedEnvironmentsOperations(
218183
self._client, self._config, self._serialize, self._deserialize
219184
)
@@ -253,13 +218,7 @@ def __init__(
253218
self._client, self._config, self._serialize, self._deserialize
254219
)
255220
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
256-
self.dapr_component_resiliency_policies = DaprComponentResiliencyPoliciesOperations(
257-
self._client, self._config, self._serialize, self._deserialize
258-
)
259221
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
260-
self.dapr_subscriptions = DaprSubscriptionsOperations(
261-
self._client, self._config, self._serialize, self._deserialize
262-
)
263222
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
264223
self._client, self._config, self._serialize, self._deserialize
265224
)
@@ -270,10 +229,6 @@ def __init__(
270229
self.managed_environment_usages = ManagedEnvironmentUsagesOperations(
271230
self._client, self._config, self._serialize, self._deserialize
272231
)
273-
self.java_components = JavaComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
274-
self.dot_net_components = DotNetComponentsOperations(
275-
self._client, self._config, self._serialize, self._deserialize
276-
)
277232

278233
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
279234
"""Runs the network request through the client's chained policies.
@@ -300,7 +255,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
300255
def close(self) -> None:
301256
self._client.close()
302257

303-
def __enter__(self) -> "ContainerAppsAPIClient":
258+
def __enter__(self) -> Self:
304259
self._client.__enter__()
305260
return self
306261

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod
@@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
14411443
elif isinstance(response, type) and issubclass(response, Enum):
14421444
return self.deserialize_enum(data, response)
14431445

1444-
if data is None:
1446+
if data is None or data is CoreNull:
14451447
return data
14461448
try:
14471449
attributes = response._attribute_map # type: ignore

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_vendor.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from abc import ABC
99
from typing import TYPE_CHECKING
1010

11-
from azure.core.pipeline.transport import HttpRequest
12-
1311
from ._configuration import ContainerAppsAPIClientConfiguration
1412

1513
if TYPE_CHECKING:
@@ -19,14 +17,6 @@
1917
from ._serialization import Deserializer, Serializer
2018

2119

22-
def _convert_request(request, files=None):
23-
data = request.content if not files else None
24-
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
25-
if files:
26-
request.set_formdata_body(files)
27-
return request
28-
29-
3020
class ContainerAppsAPIClientMixinABC(ABC):
3121
"""DO NOT use this class. It is for internal typing use only."""
3222

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "3.1.0b1"
9+
VERSION = "3.1.0"

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ class ContainerAppsAPIClientConfiguration: # pylint: disable=too-many-instance-
2626
2727
:param credential: Credential needed for the client to connect to Azure. Required.
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
29-
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
29+
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-11-02-preview". Note that overriding
32-
this default value may result in unsupported behavior.
31+
:keyword api_version: Api Version. Default value is "2024-03-01". Note that overriding this
32+
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-11-02-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-03-01")
3838

3939
if credential is None:
4040
raise ValueError("Parameter 'credential' must not be None.")

0 commit comments

Comments
 (0)