Skip to content

Commit 9cffc92

Browse files
author
SDKAuto
committed
CodeGen from PR 34174 in Azure/azure-rest-api-specs
Merge 5a0982ff4076e1b306733e3e20e8407df410b2ff into c6b306b743f110fd78f203d7de7d2b55101f02b9
1 parent aa62911 commit 9cffc92

File tree

219 files changed

+14252
-2143
lines changed

Some content is hidden

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

219 files changed

+14252
-2143
lines changed

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

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

3+
## 13.7.0 (2025-04-30)
4+
5+
### Features Added
6+
7+
- Client `CognitiveServicesManagementClient` added operation group `projects`
8+
- Client `CognitiveServicesManagementClient` added operation group `account_connections`
9+
- Client `CognitiveServicesManagementClient` added operation group `project_connections`
10+
- Client `CognitiveServicesManagementClient` added operation group `account_capability_hosts`
11+
- Client `CognitiveServicesManagementClient` added operation group `project_capability_hosts`
12+
- Model `AccountProperties` added property `network_injections`
13+
- Model `AccountProperties` added property `allow_project_management`
14+
- Model `AccountProperties` added property `default_project`
15+
- Model `AccountProperties` added property `associated_projects`
16+
- Model `AzureEntityResource` added property `system_data`
17+
- Model `ModelCapacityListResultValueItem` added property `system_data`
18+
- Model `NetworkSecurityPerimeterConfiguration` added property `system_data`
19+
- Model `PrivateLinkResource` added property `system_data`
20+
- Enum `ProvisioningState` added member `CANCELED`
21+
- Model `ProxyResource` added property `system_data`
22+
- Model `RaiContentFilter` added property `system_data`
23+
- Model `Resource` added property `system_data`
24+
- Added model `AADAuthTypeConnectionProperties`
25+
- Added model `AccessKeyAuthTypeConnectionProperties`
26+
- Added model `AccountKeyAuthTypeConnectionProperties`
27+
- Added model `ApiKeyAuthConnectionProperties`
28+
- Added model `CapabilityHost`
29+
- Added enum `CapabilityHostKind`
30+
- Added model `CapabilityHostProperties`
31+
- Added enum `CapabilityHostProvisioningState`
32+
- Added model `ConnectionAccessKey`
33+
- Added model `ConnectionAccountKey`
34+
- Added model `ConnectionApiKey`
35+
- Added enum `ConnectionAuthType`
36+
- Added enum `ConnectionCategory`
37+
- Added enum `ConnectionGroup`
38+
- Added model `ConnectionManagedIdentity`
39+
- Added model `ConnectionOAuth2`
40+
- Added model `ConnectionPersonalAccessToken`
41+
- Added model `ConnectionPropertiesV2`
42+
- Added model `ConnectionPropertiesV2BasicResource`
43+
- Added model `ConnectionPropertiesV2BasicResourceArmPaginatedResult`
44+
- Added model `ConnectionServicePrincipal`
45+
- Added model `ConnectionSharedAccessSignature`
46+
- Added model `ConnectionUpdateContent`
47+
- Added model `ConnectionUsernamePassword`
48+
- Added model `CustomKeys`
49+
- Added model `CustomKeysConnectionProperties`
50+
- Added model `ManagedIdentityAuthTypeConnectionProperties`
51+
- Added enum `ManagedPERequirement`
52+
- Added enum `ManagedPEStatus`
53+
- Added model `NetworkInjections`
54+
- Added model `NoneAuthTypeConnectionProperties`
55+
- Added model `OAuth2AuthTypeConnectionProperties`
56+
- Added model `PATAuthTypeConnectionProperties`
57+
- Added model `Project`
58+
- Added model `ProjectListResult`
59+
- Added model `ProjectProperties`
60+
- Added model `ResourceBase`
61+
- Added model `SASAuthTypeConnectionProperties`
62+
- Added enum `ScenarioType`
63+
- Added model `ServicePrincipalAuthTypeConnectionProperties`
64+
- Added model `UsernamePasswordAuthTypeConnectionProperties`
65+
- Added model `AccountCapabilityHostsOperations`
66+
- Added model `AccountConnectionsOperations`
67+
- Added model `ProjectCapabilityHostsOperations`
68+
- Added model `ProjectConnectionsOperations`
69+
- Added model `ProjectsOperations`
70+
- Method `AccountCapabilityHostsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, account_name: str, capability_host_name: str, body: CapabilityHost, content_type: str)`
71+
- Method `AccountCapabilityHostsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, account_name: str, capability_host_name: str, body: IO[bytes], content_type: str)`
72+
- Method `AccountConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, connection_name: str, body: Optional[ConnectionPropertiesV2BasicResource], content_type: str)`
73+
- Method `AccountConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, connection_name: str, body: Optional[IO[bytes]], content_type: str)`
74+
- Method `AccountConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, connection_name: str, body: Optional[ConnectionUpdateContent], content_type: str)`
75+
- Method `AccountConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, connection_name: str, body: Optional[IO[bytes]], content_type: str)`
76+
- Method `ProjectCapabilityHostsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, account_name: str, project_name: str, capability_host_name: str, body: CapabilityHost, content_type: str)`
77+
- Method `ProjectCapabilityHostsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, account_name: str, project_name: str, capability_host_name: str, body: IO[bytes], content_type: str)`
78+
- Method `ProjectConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, body: Optional[ConnectionPropertiesV2BasicResource], content_type: str)`
79+
- Method `ProjectConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, body: Optional[IO[bytes]], content_type: str)`
80+
- Method `ProjectConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, body: Optional[ConnectionUpdateContent], content_type: str)`
81+
- Method `ProjectConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, body: Optional[IO[bytes]], content_type: str)`
82+
- Method `ProjectsOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, account_name: str, project_name: str, project: Project, content_type: str)`
83+
- Method `ProjectsOperations.begin_create` has a new overload `def begin_create(self: None, resource_group_name: str, account_name: str, project_name: str, project: IO[bytes], content_type: str)`
84+
- Method `ProjectsOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, account_name: str, project_name: str, project: Project, content_type: str)`
85+
- Method `ProjectsOperations.begin_update` has a new overload `def begin_update(self: None, resource_group_name: str, account_name: str, project_name: str, project: IO[bytes], content_type: str)`
86+
387
## 13.6.0 (2024-12-19)
488

589
### Features Added

sdk/cognitiveservices/azure-mgmt-cognitiveservices/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 Cognitive Services 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": "0383d4a163beb3e58e7b4cb3c06172d32ddd8c85",
2+
"commit": "9b3fa678dd0d458f60120d611440303498696d6e",
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/cognitiveservices/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/cognitiveservices/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/cognitiveservices/resource-manager/readme.md"
1111
}

sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/__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 ._cognitive_services_management_client import CognitiveServicesManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._cognitive_services_management_client import CognitiveServicesManagementClient # 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
"CognitiveServicesManagementClient",
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/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +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 CognitiveServicesManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
24+
AccountCapabilityHostsOperations,
25+
AccountConnectionsOperations,
2226
AccountsOperations,
2327
CognitiveServicesManagementClientOperationsMixin,
2428
CommitmentPlansOperations,
@@ -34,6 +38,9 @@
3438
Operations,
3539
PrivateEndpointConnectionsOperations,
3640
PrivateLinkResourcesOperations,
41+
ProjectCapabilityHostsOperations,
42+
ProjectConnectionsOperations,
43+
ProjectsOperations,
3744
RaiBlocklistItemsOperations,
3845
RaiBlocklistsOperations,
3946
RaiContentFiltersOperations,
@@ -43,13 +50,12 @@
4350
)
4451

4552
if TYPE_CHECKING:
46-
# pylint: disable=unused-import,ungrouped-imports
4753
from azure.core.credentials import TokenCredential
4854

4955

5056
class CognitiveServicesManagementClient(
5157
CognitiveServicesManagementClientOperationsMixin
52-
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
58+
): # pylint: disable=too-many-instance-attributes
5359
"""Cognitive Services Management Client.
5460
5561
:ivar accounts: AccountsOperations operations
@@ -100,29 +106,45 @@ class CognitiveServicesManagementClient(
100106
:ivar defender_for_ai_settings: DefenderForAISettingsOperations operations
101107
:vartype defender_for_ai_settings:
102108
azure.mgmt.cognitiveservices.operations.DefenderForAISettingsOperations
109+
:ivar projects: ProjectsOperations operations
110+
:vartype projects: azure.mgmt.cognitiveservices.operations.ProjectsOperations
111+
:ivar account_connections: AccountConnectionsOperations operations
112+
:vartype account_connections:
113+
azure.mgmt.cognitiveservices.operations.AccountConnectionsOperations
114+
:ivar project_connections: ProjectConnectionsOperations operations
115+
:vartype project_connections:
116+
azure.mgmt.cognitiveservices.operations.ProjectConnectionsOperations
117+
:ivar account_capability_hosts: AccountCapabilityHostsOperations operations
118+
:vartype account_capability_hosts:
119+
azure.mgmt.cognitiveservices.operations.AccountCapabilityHostsOperations
120+
:ivar project_capability_hosts: ProjectCapabilityHostsOperations operations
121+
:vartype project_capability_hosts:
122+
azure.mgmt.cognitiveservices.operations.ProjectCapabilityHostsOperations
103123
:param credential: Credential needed for the client to connect to Azure. Required.
104124
:type credential: ~azure.core.credentials.TokenCredential
105-
:param subscription_id: The ID of the target subscription. Required.
125+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
106126
:type subscription_id: str
107-
:param base_url: Service URL. Default value is "https://management.azure.com".
127+
:param base_url: Service URL. Default value is None.
108128
:type base_url: str
109-
:keyword api_version: Api Version. Default value is "2024-10-01". Note that overriding this
129+
:keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
110130
default value may result in unsupported behavior.
111131
:paramtype api_version: str
112132
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
113133
Retry-After header is present.
114134
"""
115135

116136
def __init__(
117-
self,
118-
credential: "TokenCredential",
119-
subscription_id: str,
120-
base_url: str = "https://management.azure.com",
121-
**kwargs: Any
137+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
122138
) -> None:
139+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
140+
_endpoints = get_arm_endpoints(_cloud)
141+
if not base_url:
142+
base_url = _endpoints["resource_manager"]
143+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
123144
self._config = CognitiveServicesManagementClientConfiguration(
124-
credential=credential, subscription_id=subscription_id, **kwargs
145+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
125146
)
147+
126148
_policies = kwargs.pop("policies", None)
127149
if _policies is None:
128150
_policies = [
@@ -141,7 +163,7 @@ def __init__(
141163
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
142164
self._config.http_logging_policy,
143165
]
144-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
166+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
145167

146168
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
147169
self._serialize = Serializer(client_models)
@@ -191,6 +213,19 @@ def __init__(
191213
self.defender_for_ai_settings = DefenderForAISettingsOperations(
192214
self._client, self._config, self._serialize, self._deserialize
193215
)
216+
self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize)
217+
self.account_connections = AccountConnectionsOperations(
218+
self._client, self._config, self._serialize, self._deserialize
219+
)
220+
self.project_connections = ProjectConnectionsOperations(
221+
self._client, self._config, self._serialize, self._deserialize
222+
)
223+
self.account_capability_hosts = AccountCapabilityHostsOperations(
224+
self._client, self._config, self._serialize, self._deserialize
225+
)
226+
self.project_capability_hosts = ProjectCapabilityHostsOperations(
227+
self._client, self._config, self._serialize, self._deserialize
228+
)
194229

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

sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_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

@@ -26,15 +25,15 @@ class CognitiveServicesManagementClientConfiguration: # pylint: disable=too-man
2625
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-10-01". Note that overriding this
30+
:keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
3231
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-10-01")
36+
api_version: str = kwargs.pop("api_version", "2025-06-01")
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)