Skip to content
Draft
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
8 changes: 4 additions & 4 deletions sdk/costmanagement/azure-mgmt-costmanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.2",
"autorest": "3.4.5",
"use": [
"@autorest/python@5.8.0",
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "67528b3e539b96ccaaf82c360f5715184e467e21",
"commit": "17ebcee3c21d0c1fb14a197c05f41856f1951269",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cost-management/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",
"autorest_command": "autorest specification/cost-management/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.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/cost-management/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
super(CostManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2019-11-01"
self.api_version = "2020-06-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import CostManagementClientConfiguration
from .operations import SettingsOperations
from .operations import ViewsOperations
from .operations import AlertsOperations
from .operations import ForecastOperations
from .operations import DimensionsOperations
from .operations import QueryOperations
from .operations import GenerateReservationDetailsReportOperations
from .operations import Operations
from .operations import ExportsOperations
from . import models
Expand All @@ -34,8 +32,6 @@
class CostManagementClient(object):
"""CostManagementClient.

:ivar settings: SettingsOperations operations
:vartype settings: azure.mgmt.costmanagement.operations.SettingsOperations
:ivar views: ViewsOperations operations
:vartype views: azure.mgmt.costmanagement.operations.ViewsOperations
:ivar alerts: AlertsOperations operations
Expand All @@ -46,16 +42,13 @@ class CostManagementClient(object):
:vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
:ivar query: QueryOperations operations
:vartype query: azure.mgmt.costmanagement.operations.QueryOperations
:ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations operations
:vartype generate_reservation_details_report: azure.mgmt.costmanagement.operations.GenerateReservationDetailsReportOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.operations.Operations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param str base_url: Service URL
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
Expand All @@ -75,8 +68,6 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.settings = SettingsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.views = ViewsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(
Expand All @@ -87,8 +78,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.query = QueryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_reservation_details_report = GenerateReservationDetailsReportOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.exports = ExportsOperations(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"chosen_version": "2019-11-01",
"total_api_version_list": ["2019-11-01"],
"chosen_version": "2020-06-01",
"total_api_version_list": ["2020-06-01"],
"client": {
"name": "CostManagementClient",
"filename": "_cost_management_client",
"description": "CostManagementClient.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"has_lro_operations": false,
"client_side_validation": false,
"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\": [\"CostManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"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\": [\"CostManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
Expand Down Expand Up @@ -86,13 +86,11 @@
"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\"]}}}"
},
"operation_groups": {
"settings": "SettingsOperations",
"views": "ViewsOperations",
"alerts": "AlertsOperations",
"forecast": "ForecastOperations",
"dimensions": "DimensionsOperations",
"query": "QueryOperations",
"generate_reservation_details_report": "GenerateReservationDetailsReportOperations",
"operations": "Operations",
"exports": "ExportsOperations"
}
Expand Down
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 = "2.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
super(CostManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.api_version = "2019-11-01"
self.api_version = "2020-06-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-costmanagement/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import CostManagementClientConfiguration
from .operations import SettingsOperations
from .operations import ViewsOperations
from .operations import AlertsOperations
from .operations import ForecastOperations
from .operations import DimensionsOperations
from .operations import QueryOperations
from .operations import GenerateReservationDetailsReportOperations
from .operations import Operations
from .operations import ExportsOperations
from .. import models
Expand All @@ -32,8 +30,6 @@
class CostManagementClient(object):
"""CostManagementClient.

:ivar settings: SettingsOperations operations
:vartype settings: azure.mgmt.costmanagement.aio.operations.SettingsOperations
:ivar views: ViewsOperations operations
:vartype views: azure.mgmt.costmanagement.aio.operations.ViewsOperations
:ivar alerts: AlertsOperations operations
Expand All @@ -44,16 +40,13 @@ class CostManagementClient(object):
:vartype dimensions: azure.mgmt.costmanagement.aio.operations.DimensionsOperations
:ivar query: QueryOperations operations
:vartype query: azure.mgmt.costmanagement.aio.operations.QueryOperations
:ivar generate_reservation_details_report: GenerateReservationDetailsReportOperations operations
:vartype generate_reservation_details_report: azure.mgmt.costmanagement.aio.operations.GenerateReservationDetailsReportOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.aio.operations.Operations
:ivar exports: ExportsOperations operations
:vartype exports: azure.mgmt.costmanagement.aio.operations.ExportsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param str base_url: Service URL
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
Expand All @@ -72,8 +65,6 @@ def __init__(
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.settings = SettingsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.views = ViewsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(
Expand All @@ -84,8 +75,6 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.query = QueryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.generate_reservation_details_report = GenerateReservationDetailsReportOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.exports = ExportsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._settings_operations import SettingsOperations
from ._views_operations import ViewsOperations
from ._alerts_operations import AlertsOperations
from ._forecast_operations import ForecastOperations
from ._dimensions_operations import DimensionsOperations
from ._query_operations import QueryOperations
from ._generate_reservation_details_report_operations import GenerateReservationDetailsReportOperations
from ._operations import Operations
from ._exports_operations import ExportsOperations

__all__ = [
'SettingsOperations',
'ViewsOperations',
'AlertsOperations',
'ForecastOperations',
'DimensionsOperations',
'QueryOperations',
'GenerateReservationDetailsReportOperations',
'Operations',
'ExportsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -146,7 +146,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -222,7 +222,7 @@ async def dismiss(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -288,7 +288,7 @@ async def list_external(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ def list(
:type top: int
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DimensionsListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.DimensionsListResultor None]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.costmanagement.models.DimensionsListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.DimensionsListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -138,7 +138,7 @@ async def get_next(next_link=None):
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 204]:
if response.status_code not in [200]:
error = self._deserialize.failsafe_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 Down Expand Up @@ -191,7 +191,7 @@ def by_external_cloud_provider_type(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-06-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Loading