Skip to content

Commit 14f613e

Browse files
Azure CLI BotSDKAuto
andauthored
[AutoRelease] t2-apimanagement-2021-08-03-81462 (#20052)
* CodeGen from PR 15384 in Azure/azure-rest-api-specs Update readme.md (#15384) * version,CHANGELOG Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 31c370f commit 14f613e

File tree

156 files changed

+1724
-1329
lines changed

Some content is hidden

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

156 files changed

+1724
-1329
lines changed

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

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

3+
## 2.1.0 (2021-08-03)
4+
5+
**Features**
6+
7+
- Model OperationResultContract has a new parameter id_properties_id
8+
- Model OperationResultContract has a new parameter name
9+
- Model OperationResultContract has a new parameter type
10+
- Model TenantConfigurationSyncStateContract has a new parameter last_operation_id
11+
312
## 2.0.0 (2021-03-25)
413

514
**Features**

sdk/apimanagement/azure-mgmt-apimanagement/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.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "ecf0d999c9128ddfc1cac5ba52f57a5b00f94000",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/apimanagement/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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
10+
"readme": "specification/apimanagement/resource-manager/readme.md"
11+
}

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
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 ApiManagementClientConfiguration
2122
from .operations import ApiOperations
@@ -411,6 +412,24 @@ def __init__(
411412
self.user_confirmation_password = UserConfirmationPasswordOperations(
412413
self._client, self._config, self._serialize, self._deserialize)
413414

415+
def _send_request(self, http_request, **kwargs):
416+
# type: (HttpRequest, Any) -> HttpResponse
417+
"""Runs the network request through the client's chained policies.
418+
419+
:param http_request: The network request you want to make. Required.
420+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
421+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
422+
:return: The response of your network call. Does not do error handling on your response.
423+
:rtype: ~azure.core.pipeline.transport.HttpResponse
424+
"""
425+
path_format_arguments = {
426+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
427+
}
428+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
429+
stream = kwargs.pop("stream", True)
430+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
431+
return pipeline_response.http_response
432+
414433
def close(self):
415434
# type: () -> None
416435
self._client.close()
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
{
2+
"chosen_version": "2020-12-01",
3+
"total_api_version_list": ["2020-12-01"],
4+
"client": {
5+
"name": "ApiManagementClient",
6+
"filename": "_api_management_client",
7+
"description": "ApiManagement 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\": [\"ApiManagementClientConfiguration\"]}}, \"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\": [\"ApiManagementClientConfiguration\"]}}, \"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": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
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": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
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+
"api": "ApiOperations",
102+
"api_revision": "ApiRevisionOperations",
103+
"api_release": "ApiReleaseOperations",
104+
"api_operation": "ApiOperationOperations",
105+
"api_operation_policy": "ApiOperationPolicyOperations",
106+
"tag": "TagOperations",
107+
"api_product": "ApiProductOperations",
108+
"api_policy": "ApiPolicyOperations",
109+
"api_schema": "ApiSchemaOperations",
110+
"api_diagnostic": "ApiDiagnosticOperations",
111+
"api_issue": "ApiIssueOperations",
112+
"api_issue_comment": "ApiIssueCommentOperations",
113+
"api_issue_attachment": "ApiIssueAttachmentOperations",
114+
"api_tag_description": "ApiTagDescriptionOperations",
115+
"operation": "OperationOperations",
116+
"api_export": "ApiExportOperations",
117+
"api_version_set": "ApiVersionSetOperations",
118+
"authorization_server": "AuthorizationServerOperations",
119+
"backend": "BackendOperations",
120+
"cache": "CacheOperations",
121+
"certificate": "CertificateOperations",
122+
"content_type": "ContentTypeOperations",
123+
"content_item": "ContentItemOperations",
124+
"deleted_services": "DeletedServicesOperations",
125+
"api_management_operations": "ApiManagementOperationsOperations",
126+
"api_management_service_skus": "ApiManagementServiceSkusOperations",
127+
"api_management_service": "ApiManagementServiceOperations",
128+
"diagnostic": "DiagnosticOperations",
129+
"email_template": "EmailTemplateOperations",
130+
"gateway": "GatewayOperations",
131+
"gateway_hostname_configuration": "GatewayHostnameConfigurationOperations",
132+
"gateway_api": "GatewayApiOperations",
133+
"gateway_certificate_authority": "GatewayCertificateAuthorityOperations",
134+
"group": "GroupOperations",
135+
"group_user": "GroupUserOperations",
136+
"identity_provider": "IdentityProviderOperations",
137+
"issue": "IssueOperations",
138+
"logger": "LoggerOperations",
139+
"named_value": "NamedValueOperations",
140+
"network_status": "NetworkStatusOperations",
141+
"notification": "NotificationOperations",
142+
"notification_recipient_user": "NotificationRecipientUserOperations",
143+
"notification_recipient_email": "NotificationRecipientEmailOperations",
144+
"open_id_connect_provider": "OpenIdConnectProviderOperations",
145+
"policy": "PolicyOperations",
146+
"policy_description": "PolicyDescriptionOperations",
147+
"portal_revision": "PortalRevisionOperations",
148+
"portal_settings": "PortalSettingsOperations",
149+
"sign_in_settings": "SignInSettingsOperations",
150+
"sign_up_settings": "SignUpSettingsOperations",
151+
"delegation_settings": "DelegationSettingsOperations",
152+
"product": "ProductOperations",
153+
"product_api": "ProductApiOperations",
154+
"product_group": "ProductGroupOperations",
155+
"product_subscriptions": "ProductSubscriptionsOperations",
156+
"product_policy": "ProductPolicyOperations",
157+
"quota_by_counter_keys": "QuotaByCounterKeysOperations",
158+
"quota_by_period_keys": "QuotaByPeriodKeysOperations",
159+
"region": "RegionOperations",
160+
"reports": "ReportsOperations",
161+
"tenant_settings": "TenantSettingsOperations",
162+
"api_management_skus": "ApiManagementSkusOperations",
163+
"subscription": "SubscriptionOperations",
164+
"tag_resource": "TagResourceOperations",
165+
"tenant_access": "TenantAccessOperations",
166+
"tenant_access_git": "TenantAccessGitOperations",
167+
"tenant_configuration": "TenantConfigurationOperations",
168+
"user": "UserOperations",
169+
"user_group": "UserGroupOperations",
170+
"user_subscription": "UserSubscriptionOperations",
171+
"user_identities": "UserIdentitiesOperations",
172+
"user_confirmation_password": "UserConfirmationPasswordOperations"
173+
}
174+
}

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_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 = "2.0.0"
9+
VERSION = "2.1.0"

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py

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

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -408,6 +409,23 @@ def __init__(
408409
self.user_confirmation_password = UserConfirmationPasswordOperations(
409410
self._client, self._config, self._serialize, self._deserialize)
410411

412+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
413+
"""Runs the network request through the client's chained policies.
414+
415+
:param http_request: The network request you want to make. Required.
416+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
417+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
418+
:return: The response of your network call. Does not do error handling on your response.
419+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
420+
"""
421+
path_format_arguments = {
422+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
423+
}
424+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
425+
stream = kwargs.pop("stream", True)
426+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
427+
return pipeline_response.http_response
428+
411429
async def close(self) -> None:
412430
await self._client.close()
413431

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def list_by_service(
4949
filter: Optional[str] = None,
5050
top: Optional[int] = None,
5151
skip: Optional[int] = None,
52-
**kwargs
52+
**kwargs: Any
5353
) -> AsyncIterable["_models.DiagnosticCollection"]:
5454
"""Lists all diagnostics of an API.
5555
@@ -126,7 +126,7 @@ async def get_next(next_link=None):
126126
response = pipeline_response.http_response
127127

128128
if response.status_code not in [200]:
129-
error = self._deserialize(_models.ErrorResponse, response)
129+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
130130
map_error(status_code=response.status_code, response=response, error_map=error_map)
131131
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
132132

@@ -143,7 +143,7 @@ async def get_entity_tag(
143143
service_name: str,
144144
api_id: str,
145145
diagnostic_id: str,
146-
**kwargs
146+
**kwargs: Any
147147
) -> bool:
148148
"""Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.
149149
@@ -194,7 +194,7 @@ async def get_entity_tag(
194194

195195
if response.status_code not in [200]:
196196
map_error(status_code=response.status_code, response=response, error_map=error_map)
197-
error = self._deserialize(_models.ErrorResponse, response)
197+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
198198
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
199199

200200
response_headers = {}
@@ -212,7 +212,7 @@ async def get(
212212
service_name: str,
213213
api_id: str,
214214
diagnostic_id: str,
215-
**kwargs
215+
**kwargs: Any
216216
) -> "_models.DiagnosticContract":
217217
"""Gets the details of the Diagnostic for an API specified by its identifier.
218218
@@ -263,7 +263,7 @@ async def get(
263263

264264
if response.status_code not in [200]:
265265
map_error(status_code=response.status_code, response=response, error_map=error_map)
266-
error = self._deserialize(_models.ErrorResponse, response)
266+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
267267
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
268268

269269
response_headers = {}
@@ -284,7 +284,7 @@ async def create_or_update(
284284
diagnostic_id: str,
285285
parameters: "_models.DiagnosticContract",
286286
if_match: Optional[str] = None,
287-
**kwargs
287+
**kwargs: Any
288288
) -> "_models.DiagnosticContract":
289289
"""Creates a new Diagnostic for an API or updates an existing one.
290290
@@ -347,7 +347,7 @@ async def create_or_update(
347347

348348
if response.status_code not in [200, 201]:
349349
map_error(status_code=response.status_code, response=response, error_map=error_map)
350-
error = self._deserialize(_models.ErrorResponse, response)
350+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
351351
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
352352

353353
response_headers = {}
@@ -373,7 +373,7 @@ async def update(
373373
diagnostic_id: str,
374374
if_match: str,
375375
parameters: "_models.DiagnosticContract",
376-
**kwargs
376+
**kwargs: Any
377377
) -> "_models.DiagnosticContract":
378378
"""Updates the details of the Diagnostic for an API specified by its identifier.
379379
@@ -435,7 +435,7 @@ async def update(
435435

436436
if response.status_code not in [200]:
437437
map_error(status_code=response.status_code, response=response, error_map=error_map)
438-
error = self._deserialize(_models.ErrorResponse, response)
438+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
439439
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
440440

441441
response_headers = {}
@@ -455,7 +455,7 @@ async def delete(
455455
api_id: str,
456456
diagnostic_id: str,
457457
if_match: str,
458-
**kwargs
458+
**kwargs: Any
459459
) -> None:
460460
"""Deletes the specified Diagnostic from an API.
461461
@@ -510,7 +510,7 @@ async def delete(
510510

511511
if response.status_code not in [200, 204]:
512512
map_error(status_code=response.status_code, response=response, error_map=error_map)
513-
error = self._deserialize(_models.ErrorResponse, response)
513+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
514514
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
515515

516516
if cls:

0 commit comments

Comments
 (0)