Skip to content

Commit 58e02ea

Browse files
author
SDKAuto
committed
CodeGen from PR 34174 in Azure/azure-rest-api-specs
Merge 94587454837402283eba8fbe7de5991db8ccf782 into b1f4d539964453ce8008e4b069e59885e12ba441
1 parent d5b00d7 commit 58e02ea

File tree

217 files changed

+14064
-2037
lines changed

Some content is hidden

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

217 files changed

+14064
-2037
lines changed

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

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

3+
## 13.7.0 (2025-05-07)
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 `DeploymentProperties` added property `spillover_deployment_name`
17+
- Enum `ProvisioningState` added member `CANCELED`
18+
- Added model `AADAuthTypeConnectionProperties`
19+
- Added model `AccessKeyAuthTypeConnectionProperties`
20+
- Added model `AccountKeyAuthTypeConnectionProperties`
21+
- Added model `ApiKeyAuthConnectionProperties`
22+
- Added model `CapabilityHost`
23+
- Added enum `CapabilityHostKind`
24+
- Added model `CapabilityHostProperties`
25+
- Added enum `CapabilityHostProvisioningState`
26+
- Added model `ConnectionAccessKey`
27+
- Added model `ConnectionAccountKey`
28+
- Added model `ConnectionApiKey`
29+
- Added enum `ConnectionAuthType`
30+
- Added enum `ConnectionCategory`
31+
- Added enum `ConnectionGroup`
32+
- Added model `ConnectionManagedIdentity`
33+
- Added model `ConnectionOAuth2`
34+
- Added model `ConnectionPersonalAccessToken`
35+
- Added model `ConnectionPropertiesV2`
36+
- Added model `ConnectionPropertiesV2BasicResource`
37+
- Added model `ConnectionPropertiesV2BasicResourceArmPaginatedResult`
38+
- Added model `ConnectionServicePrincipal`
39+
- Added model `ConnectionSharedAccessSignature`
40+
- Added model `ConnectionUpdateContent`
41+
- Added model `ConnectionUsernamePassword`
42+
- Added model `CustomKeys`
43+
- Added model `CustomKeysConnectionProperties`
44+
- Added model `ManagedIdentityAuthTypeConnectionProperties`
45+
- Added enum `ManagedPERequirement`
46+
- Added enum `ManagedPEStatus`
47+
- Added model `NetworkInjections`
48+
- Added model `NoneAuthTypeConnectionProperties`
49+
- Added model `OAuth2AuthTypeConnectionProperties`
50+
- Added model `PATAuthTypeConnectionProperties`
51+
- Added model `Project`
52+
- Added model `ProjectListResult`
53+
- Added model `ProjectProperties`
54+
- Added model `ResourceBase`
55+
- Added model `SASAuthTypeConnectionProperties`
56+
- Added enum `ScenarioType`
57+
- Added model `ServicePrincipalAuthTypeConnectionProperties`
58+
- Added model `UsernamePasswordAuthTypeConnectionProperties`
59+
- Added model `AccountCapabilityHostsOperations`
60+
- Added model `AccountConnectionsOperations`
61+
- Added model `ProjectCapabilityHostsOperations`
62+
- Added model `ProjectConnectionsOperations`
63+
- Added model `ProjectsOperations`
64+
- 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, capability_host: CapabilityHost, content_type: str)`
65+
- 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, capability_host: IO[bytes], content_type: str)`
66+
- Method `AccountConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, connection_name: str, connection: Optional[ConnectionPropertiesV2BasicResource], content_type: str)`
67+
- Method `AccountConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, connection_name: str, connection: Optional[IO[bytes]], content_type: str)`
68+
- Method `AccountConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, connection_name: str, connection: Optional[ConnectionUpdateContent], content_type: str)`
69+
- Method `AccountConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, connection_name: str, connection: Optional[IO[bytes]], content_type: str)`
70+
- 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, capability_host: CapabilityHost, content_type: str)`
71+
- 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, capability_host: IO[bytes], content_type: str)`
72+
- Method `ProjectConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, connection: Optional[ConnectionPropertiesV2BasicResource], content_type: str)`
73+
- Method `ProjectConnectionsOperations.create` has a new overload `def create(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, connection: Optional[IO[bytes]], content_type: str)`
74+
- Method `ProjectConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, connection: Optional[ConnectionUpdateContent], content_type: str)`
75+
- Method `ProjectConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, account_name: str, project_name: str, connection_name: str, connection: Optional[IO[bytes]], content_type: str)`
76+
- 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)`
77+
- 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)`
78+
- 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)`
79+
- 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)`
80+
381
## 13.6.0 (2024-12-19)
482

583
### 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": "642c35cf122f29508f9352d962f35d0b5ff2ae52",
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: 48 additions & 13 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
105125
:param subscription_id: The ID of the target subscription. 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: 2 additions & 3 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 CognitiveServicesManagementClientConfiguration: # pylint: disable=too-man
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. 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)