Skip to content

Commit eb0590e

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into fix_confidentialledger_aiohttp
* 'master' of https://github.com/Azure/azure-sdk-for-python: add version info on models (Azure#18654) [AutoRelease] t2-billing-2021-05-12-16217(wave4) (Azure#18660) Revert "Update swagger_to_sdk_config_autorest.json (Azure#18659)" (Azure#18661) Update swagger_to_sdk_config_autorest.json (Azure#18659) T2 cosmosdb 2021 05 10 (Azure#18628) Eg backward compat (Azure#18658) [Key Vault] Bump msrest requirement for secrets (Azure#18653) [formrecognizer] include message about api version targeted on changelog / add some docs (Azure#18652)
2 parents 4f5a1d5 + 3882143 commit eb0590e

File tree

173 files changed

+17450
-29277
lines changed

Some content is hidden

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

173 files changed

+17450
-29277
lines changed

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

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

3+
## 6.0.0 (2021-05-12)
4+
5+
**Features**
6+
7+
- Model InvoiceSectionListResult has a new parameter total_count
8+
- Model OperationDisplay has a new parameter description
9+
- Model BillingSubscriptionsListResult has a new parameter total_count
10+
- Model BillingAccountUpdateRequest has a new parameter notification_email_address
11+
- Model EnrollmentAccount has a new parameter account_owner_email
12+
- Model CustomerListResult has a new parameter total_count
13+
- Model Operation has a new parameter is_data_action
14+
- Model BillingAccount has a new parameter notification_email_address
15+
- Model AddressDetails has a new parameter middle_name
16+
- Model BillingProfile has a new parameter tags
17+
- Model EnrollmentPolicies has a new parameter marketplace_enabled
18+
- Added operation group ReservationsOperations
19+
20+
**Breaking changes**
21+
22+
- Model EnrollmentPolicies no longer has parameter marketplaces_enabled
23+
324
## 6.0.0b1 (2020-11-20)
425

526
This is beta preview version.

sdk/billing/azure-mgmt-billing/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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected]",
4+
"commit": "1e43e60cfb0bb2829ff8d57a9ba06a2410f0b3c0",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/billing/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] --version=3.3.0",
7+
"readme": "specification/billing/resource-manager/readme.md"
8+
}

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_billing_management_client.py

Lines changed: 24 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 BillingManagementClientConfiguration
2122
from .operations import BillingAccountsOperations
@@ -36,6 +37,7 @@
3637
from .operations import BillingRoleDefinitionsOperations
3738
from .operations import BillingRoleAssignmentsOperations
3839
from .operations import AgreementsOperations
40+
from .operations import ReservationsOperations
3941
from .operations import EnrollmentAccountsOperations
4042
from .operations import BillingPeriodsOperations
4143
from . import models
@@ -80,6 +82,8 @@ class BillingManagementClient(object):
8082
:vartype billing_role_assignments: azure.mgmt.billing.operations.BillingRoleAssignmentsOperations
8183
:ivar agreements: AgreementsOperations operations
8284
:vartype agreements: azure.mgmt.billing.operations.AgreementsOperations
85+
:ivar reservations: ReservationsOperations operations
86+
:vartype reservations: azure.mgmt.billing.operations.ReservationsOperations
8387
:ivar enrollment_accounts: EnrollmentAccountsOperations operations
8488
:vartype enrollment_accounts: azure.mgmt.billing.operations.EnrollmentAccountsOperations
8589
:ivar billing_periods: BillingPeriodsOperations operations
@@ -146,11 +150,31 @@ def __init__(
146150
self._client, self._config, self._serialize, self._deserialize)
147151
self.agreements = AgreementsOperations(
148152
self._client, self._config, self._serialize, self._deserialize)
153+
self.reservations = ReservationsOperations(
154+
self._client, self._config, self._serialize, self._deserialize)
149155
self.enrollment_accounts = EnrollmentAccountsOperations(
150156
self._client, self._config, self._serialize, self._deserialize)
151157
self.billing_periods = BillingPeriodsOperations(
152158
self._client, self._config, self._serialize, self._deserialize)
153159

160+
def _send_request(self, http_request, **kwargs):
161+
# type: (HttpRequest, Any) -> HttpResponse
162+
"""Runs the network request through the client's chained policies.
163+
164+
:param http_request: The network request you want to make. Required.
165+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
166+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
167+
:return: The response of your network call. Does not do error handling on your response.
168+
:rtype: ~azure.core.pipeline.transport.HttpResponse
169+
"""
170+
path_format_arguments = {
171+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
172+
}
173+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
174+
stream = kwargs.pop("stream", True)
175+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
176+
return pipeline_response.http_response
177+
154178
def close(self):
155179
# type: () -> None
156180
self._client.close()
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"chosen_version": "",
3+
"total_api_version_list": ["2018-03-01-preview", "2020-05-01"],
4+
"client": {
5+
"name": "BillingManagementClient",
6+
"filename": "_billing_management_client",
7+
"description": "Billing client provides access to billing resources for Azure subscriptions.",
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\": [\"BillingManagementClientConfiguration\"]}}, \"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\": [\"BillingManagementClientConfiguration\"]}}, \"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 that uniquely identifies an Azure 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 that uniquely identifies an Azure 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+
"billing_accounts": "BillingAccountsOperations",
102+
"address": "AddressOperations",
103+
"available_balances": "AvailableBalancesOperations",
104+
"instructions": "InstructionsOperations",
105+
"billing_profiles": "BillingProfilesOperations",
106+
"customers": "CustomersOperations",
107+
"invoice_sections": "InvoiceSectionsOperations",
108+
"billing_permissions": "BillingPermissionsOperations",
109+
"billing_subscriptions": "BillingSubscriptionsOperations",
110+
"products": "ProductsOperations",
111+
"invoices": "InvoicesOperations",
112+
"transactions": "TransactionsOperations",
113+
"policies": "PoliciesOperations",
114+
"billing_property": "BillingPropertyOperations",
115+
"operations": "Operations",
116+
"billing_role_definitions": "BillingRoleDefinitionsOperations",
117+
"billing_role_assignments": "BillingRoleAssignmentsOperations",
118+
"agreements": "AgreementsOperations",
119+
"reservations": "ReservationsOperations",
120+
"enrollment_accounts": "EnrollmentAccountsOperations",
121+
"billing_periods": "BillingPeriodsOperations"
122+
}
123+
}

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_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 = "6.0.0b1"
9+
VERSION = "6.0.0"

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_billing_management_client.py

Lines changed: 23 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

@@ -34,6 +35,7 @@
3435
from .operations import BillingRoleDefinitionsOperations
3536
from .operations import BillingRoleAssignmentsOperations
3637
from .operations import AgreementsOperations
38+
from .operations import ReservationsOperations
3739
from .operations import EnrollmentAccountsOperations
3840
from .operations import BillingPeriodsOperations
3941
from .. import models
@@ -78,6 +80,8 @@ class BillingManagementClient(object):
7880
:vartype billing_role_assignments: azure.mgmt.billing.aio.operations.BillingRoleAssignmentsOperations
7981
:ivar agreements: AgreementsOperations operations
8082
:vartype agreements: azure.mgmt.billing.aio.operations.AgreementsOperations
83+
:ivar reservations: ReservationsOperations operations
84+
:vartype reservations: azure.mgmt.billing.aio.operations.ReservationsOperations
8185
:ivar enrollment_accounts: EnrollmentAccountsOperations operations
8286
:vartype enrollment_accounts: azure.mgmt.billing.aio.operations.EnrollmentAccountsOperations
8387
:ivar billing_periods: BillingPeriodsOperations operations
@@ -143,11 +147,30 @@ def __init__(
143147
self._client, self._config, self._serialize, self._deserialize)
144148
self.agreements = AgreementsOperations(
145149
self._client, self._config, self._serialize, self._deserialize)
150+
self.reservations = ReservationsOperations(
151+
self._client, self._config, self._serialize, self._deserialize)
146152
self.enrollment_accounts = EnrollmentAccountsOperations(
147153
self._client, self._config, self._serialize, self._deserialize)
148154
self.billing_periods = BillingPeriodsOperations(
149155
self._client, self._config, self._serialize, self._deserialize)
150156

157+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
158+
"""Runs the network request through the client's chained policies.
159+
160+
:param http_request: The network request you want to make. Required.
161+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
162+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
163+
:return: The response of your network call. Does not do error handling on your response.
164+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
165+
"""
166+
path_format_arguments = {
167+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
168+
}
169+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
170+
stream = kwargs.pop("stream", True)
171+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
172+
return pipeline_response.http_response
173+
151174
async def close(self) -> None:
152175
await self._client.close()
153176

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from ._billing_role_definitions_operations import BillingRoleDefinitionsOperations
2525
from ._billing_role_assignments_operations import BillingRoleAssignmentsOperations
2626
from ._agreements_operations import AgreementsOperations
27+
from ._reservations_operations import ReservationsOperations
2728
from ._enrollment_accounts_operations import EnrollmentAccountsOperations
2829
from ._billing_periods_operations import BillingPeriodsOperations
2930

@@ -46,6 +47,7 @@
4647
'BillingRoleDefinitionsOperations',
4748
'BillingRoleAssignmentsOperations',
4849
'AgreementsOperations',
50+
'ReservationsOperations',
4951
'EnrollmentAccountsOperations',
5052
'BillingPeriodsOperations',
5153
]

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_address_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def validate(
8585

8686
if response.status_code not in [200]:
8787
map_error(status_code=response.status_code, response=response, error_map=error_map)
88-
error = self._deserialize(_models.ErrorResponse, response)
88+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
8989
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9090

9191
deserialized = self._deserialize('ValidateAddressResponse', pipeline_response)

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_agreements_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def get_next(next_link=None):
105105
response = pipeline_response.http_response
106106

107107
if response.status_code not in [200]:
108-
error = self._deserialize(_models.ErrorResponse, response)
108+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
109109
map_error(status_code=response.status_code, response=response, error_map=error_map)
110110
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
111111

@@ -168,7 +168,7 @@ async def get(
168168

169169
if response.status_code not in [200]:
170170
map_error(status_code=response.status_code, response=response, error_map=error_map)
171-
error = self._deserialize(_models.ErrorResponse, response)
171+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
172172
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
173173

174174
deserialized = self._deserialize('Agreement', pipeline_response)

sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_available_balances_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def get(
8989

9090
if response.status_code not in [200]:
9191
map_error(status_code=response.status_code, response=response, error_map=error_map)
92-
error = self._deserialize(_models.ErrorResponse, response)
92+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
9393
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9494

9595
deserialized = self._deserialize('AvailableBalance', pipeline_response)

0 commit comments

Comments
 (0)