Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR track2_azure-mgmt-consumption] Update Parameters Documentation for Reservation Summaries API #15553

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.usage_details = UsageDetailsOperations(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"chosen_version": "2019-10-01",
"total_api_version_list": ["2019-10-01"],
"client": {
"name": "ConsumptionManagementClient",
"filename": "_consumption_management_client",
"description": "Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": true
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Azure Subscription ID.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"usage_details": "UsageDetailsOperations",
"marketplaces": "MarketplacesOperations",
"budgets": "BudgetsOperations",
"tags": "TagsOperations",
"charges": "ChargesOperations",
"balances": "BalancesOperations",
"reservations_summaries": "ReservationsSummariesOperations",
"reservations_details": "ReservationsDetailsOperations",
"reservation_recommendations": "ReservationRecommendationsOperations",
"reservation_recommendation_details": "ReservationRecommendationDetailsOperations",
"reservation_transactions": "ReservationTransactionsOperations",
"price_sheet": "PriceSheetOperations",
"forecasts": "ForecastsOperations",
"operations": "Operations",
"aggregated_cost": "AggregatedCostOperations",
"events": "EventsOperations",
"lots": "LotsOperations",
"credits": "CreditsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "8.0.0b1"
VERSION = "2.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.usage_details = UsageDetailsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -32,7 +32,7 @@ class AggregatedCostOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -45,7 +45,7 @@ async def get_by_management_group(
management_group_id: str,
filter: Optional[str] = None,
**kwargs
) -> "models.ManagementGroupAggregatedCostResult":
) -> "_models.ManagementGroupAggregatedCostResult":
"""Provides the aggregate cost of a management group and all child management groups by current
billing period.

Expand All @@ -61,7 +61,7 @@ async def get_by_management_group(
:rtype: ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ManagementGroupAggregatedCostResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupAggregatedCostResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -92,7 +92,7 @@ async def get_by_management_group(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response)
Expand All @@ -108,7 +108,7 @@ async def get_for_billing_period_by_management_group(
management_group_id: str,
billing_period_name: str,
**kwargs
) -> "models.ManagementGroupAggregatedCostResult":
) -> "_models.ManagementGroupAggregatedCostResult":
"""Provides the aggregate cost of a management group and all child management groups by specified
billing period.

Expand All @@ -121,7 +121,7 @@ async def get_for_billing_period_by_management_group(
:rtype: ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ManagementGroupAggregatedCostResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupAggregatedCostResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -151,7 +151,7 @@ async def get_for_billing_period_by_management_group(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ManagementGroupAggregatedCostResult', pipeline_response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -32,7 +32,7 @@ class BalancesOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -44,7 +44,7 @@ async def get_by_billing_account(
self,
billing_account_id: str,
**kwargs
) -> "models.Balance":
) -> "_models.Balance":
"""Gets the balances for a scope by billingAccountId. Balances are available via this API only for
May 1, 2014 or later.

Expand All @@ -55,7 +55,7 @@ async def get_by_billing_account(
:rtype: ~azure.mgmt.consumption.models.Balance
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Balance"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Balance"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -84,7 +84,7 @@ async def get_by_billing_account(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Balance', pipeline_response)
Expand All @@ -100,7 +100,7 @@ async def get_for_billing_period_by_billing_account(
billing_account_id: str,
billing_period_name: str,
**kwargs
) -> "models.Balance":
) -> "_models.Balance":
"""Gets the balances for a scope by billing period and billingAccountId. Balances are available
via this API only for May 1, 2014 or later.

Expand All @@ -113,7 +113,7 @@ async def get_for_billing_period_by_billing_account(
:rtype: ~azure.mgmt.consumption.models.Balance
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Balance"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Balance"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -143,7 +143,7 @@ async def get_for_billing_period_by_billing_account(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Balance', pipeline_response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models
from ... import models as _models

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
Expand All @@ -33,7 +33,7 @@ class BudgetsOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -45,7 +45,7 @@ def list(
self,
scope: str,
**kwargs
) -> AsyncIterable["models.BudgetsListResult"]:
) -> AsyncIterable["_models.BudgetsListResult"]:
"""Lists all budgets for the defined scope.

:param scope: The scope associated with budget operations. This includes
Expand All @@ -68,7 +68,7 @@ def list(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.consumption.models.BudgetsListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.BudgetsListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.BudgetsListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -113,7 +113,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand All @@ -129,7 +129,7 @@ async def get(
scope: str,
budget_name: str,
**kwargs
) -> "models.Budget":
) -> "_models.Budget":
"""Gets the budget for the scope by budget name.

:param scope: The scope associated with budget operations. This includes
Expand All @@ -154,7 +154,7 @@ async def get(
:rtype: ~azure.mgmt.consumption.models.Budget
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Budget"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Budget"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -184,7 +184,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Budget', pipeline_response)
Expand All @@ -199,9 +199,9 @@ async def create_or_update(
self,
scope: str,
budget_name: str,
parameters: "models.Budget",
parameters: "_models.Budget",
**kwargs
) -> "models.Budget":
) -> "_models.Budget":
"""The operation to create or update a budget. Update operation requires latest eTag to be set in
the request mandatorily. You may obtain the latest eTag by performing a get operation. Create
operation does not require eTag.
Expand Down Expand Up @@ -230,7 +230,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.consumption.models.Budget
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Budget"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Budget"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -265,7 +265,7 @@ async def create_or_update(

if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
Expand Down Expand Up @@ -340,7 +340,7 @@ async def delete(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
Expand Down
Loading