Skip to content

Commit 6c2ea91

Browse files
Azure CLI BotSDKAutoRAY-316msyyc
authored
[AutoRelease] t2-cognitiveservices-2021-06-03-13142 (Azure#19069)
* CodeGen from PR 14561 in Azure/azure-rest-api-specs Update available SKUs for CognitiveServices->Text Analytics Azure#14180 (Azure#14561) * Update CheckSkuAvailability.json * Update GetSkus.json * version,CHANGELOG * test * test config Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: Zed <601306339@qq.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
1 parent dc457f4 commit 6c2ea91

33 files changed

+3849
-1951
lines changed

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

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

3+
## 12.0.0 (2021-06-03)
4+
5+
**Features**
6+
7+
- Model UserOwnedStorage has a new parameter identity_client_id
8+
- Model Sku has a new parameter family
9+
- Model Sku has a new parameter capacity
10+
- Model Sku has a new parameter size
11+
- Model PrivateEndpointConnection has a new parameter location
12+
- Model PrivateEndpointConnection has a new parameter system_data
13+
- Model PrivateEndpointConnection has a new parameter etag
14+
- Model PrivateEndpointConnectionProperties has a new parameter provisioning_state
15+
- Model KeyVaultProperties has a new parameter identity_client_id
16+
- Model PrivateLinkServiceConnectionState has a new parameter actions_required
17+
- Added operation PrivateEndpointConnectionsOperations.begin_create_or_update
18+
- Added operation PrivateEndpointConnectionsOperations.begin_delete
19+
- Added operation AccountsOperations.list_usages
20+
- Added operation AccountsOperations.begin_delete
21+
- Added operation AccountsOperations.get
22+
- Added operation AccountsOperations.begin_create
23+
- Added operation AccountsOperations.begin_update
24+
- Added operation group DeletedAccountsOperations
25+
26+
**Breaking changes**
27+
28+
- Model PrivateLinkServiceConnectionState no longer has parameter action_required
29+
- Removed operation PrivateEndpointConnectionsOperations.create_or_update
30+
- Removed operation PrivateEndpointConnectionsOperations.delete
31+
- Removed operation AccountsOperations.delete
32+
- Removed operation AccountsOperations.create
33+
- Removed operation AccountsOperations.get_usages
34+
- Removed operation AccountsOperations.update
35+
- Removed operation AccountsOperations.get_properties
36+
337
## 11.0.0 (2020-12-22)
438

539
**Features**

sdk/cognitiveservices/azure-mgmt-cognitiveservices/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/python@5.8.0",
5+
"@autorest/modelerfour@4.19.2"
6+
],
7+
"commit": "d3a5ab585146ee8ee09f43eb0948c45daacd36f7",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/cognitiveservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2",
10+
"readme": "specification/cognitiveservices/resource-manager/readme.md"
11+
}

sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import CognitiveServicesManagementClientConfiguration
2122
from .operations import AccountsOperations
23+
from .operations import DeletedAccountsOperations
2224
from .operations import ResourceSkusOperations
2325
from .operations import Operations
2426
from .operations import CognitiveServicesManagementClientOperationsMixin
@@ -32,6 +34,8 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati
3234
3335
:ivar accounts: AccountsOperations operations
3436
:vartype accounts: azure.mgmt.cognitiveservices.operations.AccountsOperations
37+
:ivar deleted_accounts: DeletedAccountsOperations operations
38+
:vartype deleted_accounts: azure.mgmt.cognitiveservices.operations.DeletedAccountsOperations
3539
:ivar resource_skus: ResourceSkusOperations operations
3640
:vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations
3741
:ivar operations: Operations operations
@@ -45,6 +49,7 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati
4549
:param subscription_id: The ID of the target subscription.
4650
:type subscription_id: str
4751
:param str base_url: Service URL
52+
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
4853
"""
4954

5055
def __init__(
@@ -67,6 +72,8 @@ def __init__(
6772

6873
self.accounts = AccountsOperations(
6974
self._client, self._config, self._serialize, self._deserialize)
75+
self.deleted_accounts = DeletedAccountsOperations(
76+
self._client, self._config, self._serialize, self._deserialize)
7077
self.resource_skus = ResourceSkusOperations(
7178
self._client, self._config, self._serialize, self._deserialize)
7279
self.operations = Operations(
@@ -76,6 +83,24 @@ def __init__(
7683
self.private_link_resources = PrivateLinkResourcesOperations(
7784
self._client, self._config, self._serialize, self._deserialize)
7885

86+
def _send_request(self, http_request, **kwargs):
87+
# type: (HttpRequest, Any) -> HttpResponse
88+
"""Runs the network request through the client's chained policies.
89+
90+
:param http_request: The network request you want to make. Required.
91+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
92+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
93+
:return: The response of your network call. Does not do error handling on your response.
94+
:rtype: ~azure.core.pipeline.transport.HttpResponse
95+
"""
96+
path_format_arguments = {
97+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
98+
}
99+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
100+
stream = kwargs.pop("stream", True)
101+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
102+
return pipeline_response.http_response
103+
79104
def close(self):
80105
# type: () -> None
81106
self._client.close()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2017-04-18"
51+
self.api_version = "2021-04-30"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-cognitiveservices/{}'.format(VERSION))
5454
self._configure(**kwargs)
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"chosen_version": "2021-04-30",
3+
"total_api_version_list": ["2021-04-30"],
4+
"client": {
5+
"name": "CognitiveServicesManagementClient",
6+
"filename": "_cognitive_services_management_client",
7+
"description": "Cognitive Services Management Client.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CognitiveServicesManagementClientConfiguration\"], \"._operations_mixin\": [\"CognitiveServicesManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CognitiveServicesManagementClientConfiguration\"], \"._operations_mixin\": [\"CognitiveServicesManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The ID of the target subscription.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The ID of the target subscription.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
99+
},
100+
"operation_groups": {
101+
"accounts": "AccountsOperations",
102+
"deleted_accounts": "DeletedAccountsOperations",
103+
"resource_skus": "ResourceSkusOperations",
104+
"operations": "Operations",
105+
"private_endpoint_connections": "PrivateEndpointConnectionsOperations",
106+
"private_link_resources": "PrivateLinkResourcesOperations"
107+
},
108+
"operation_mixins": {
109+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}",
110+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}",
111+
"operations": {
112+
"check_sku_availability" : {
113+
"sync": {
114+
"signature": "def check_sku_availability(\n self,\n location, # type: str\n skus, # type: List[str]\n kind, # type: str\n type, # type: str\n **kwargs # type: Any\n):\n",
115+
"doc": "\"\"\"Check available SKUs.\n\n:param location: Resource location.\n:type location: str\n:param skus: The SKU of the resource.\n:type skus: list[str]\n:param kind: The Kind of the resource.\n:type kind: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuAvailabilityListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.SkuAvailabilityListResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
116+
},
117+
"async": {
118+
"coroutine": true,
119+
"signature": "async def check_sku_availability(\n self,\n location: str,\n skus: List[str],\n kind: str,\n type: str,\n **kwargs: Any\n) -\u003e \"_models.SkuAvailabilityListResult\":\n",
120+
"doc": "\"\"\"Check available SKUs.\n\n:param location: Resource location.\n:type location: str\n:param skus: The SKU of the resource.\n:type skus: list[str]\n:param kind: The Kind of the resource.\n:type kind: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuAvailabilityListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.SkuAvailabilityListResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
121+
},
122+
"call": "location, skus, kind, type"
123+
},
124+
"check_domain_availability" : {
125+
"sync": {
126+
"signature": "def check_domain_availability(\n self,\n subdomain_name, # type: str\n type, # type: str\n **kwargs # type: Any\n):\n",
127+
"doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
128+
},
129+
"async": {
130+
"coroutine": true,
131+
"signature": "async def check_domain_availability(\n self,\n subdomain_name: str,\n type: str,\n **kwargs: Any\n) -\u003e \"_models.DomainAvailability\":\n",
132+
"doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
133+
},
134+
"call": "subdomain_name, type"
135+
}
136+
}
137+
}
138+
}

sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_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 = "11.0.0"
9+
VERSION = "12.0.0"

0 commit comments

Comments
 (0)