Skip to content

Commit

Permalink
[AutoPR cost-management/resource-manager] PR - Introduce new API vers…
Browse files Browse the repository at this point in the history
…ion (2019-01-01) with new (Export-related APIs) introduced (#4291)

* Generated from 1fd359a4268074a5afb5b0706411b500260ea8ac

readme updated to update tag package name per reviewers suggestion to fix check errors.

* Packaging update of azure-mgmt-costmanagement

* Generated from 8b2e7a5828fed35240abcbd92caca0f5a612a470

Based on ARM review introduced the use of 'scope' and abstracted out different scopes for API paths defined

* Generated from fe55f184a9e5d9b66823d36ffe90a8a89411da2b

ARM review based changes.

* Generated from 97b0e06c068c2403ec16aa2ecea95e4c79d4d65a

ARM review based change. Updated path to represent 'scope'.

* Generated from 526b0925dc38b30e76398f351a475a013b77cac7

updated query parameter scope to include management group path
  • Loading branch information
AutorestCI authored Feb 4, 2019
1 parent 02d8f52 commit 943a554
Show file tree
Hide file tree
Showing 71 changed files with 1,651 additions and 3,739 deletions.
19 changes: 0 additions & 19 deletions azure-mgmt-costmanagement/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
from .version import VERSION
from .operations.dimensions_operations import DimensionsOperations
from .operations.query_operations import QueryOperations
from .operations.forecast_operations import ForecastOperations
from .operations.cloud_connector_operations import CloudConnectorOperations
from .operations.external_billing_account_operations import ExternalBillingAccountOperations
from .operations.external_subscription_operations import ExternalSubscriptionOperations
from .operations.entities_operations import EntitiesOperations
from .operations.exports_operations import ExportsOperations
from .operations.operations import Operations
from . import models

Expand Down Expand Up @@ -66,16 +62,8 @@ class CostManagementClient(SDKClient):
:vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
:ivar query: Query operations
:vartype query: azure.mgmt.costmanagement.operations.QueryOperations
:ivar forecast: Forecast operations
:vartype forecast: azure.mgmt.costmanagement.operations.ForecastOperations
:ivar cloud_connector: CloudConnector operations
:vartype cloud_connector: azure.mgmt.costmanagement.operations.CloudConnectorOperations
:ivar external_billing_account: ExternalBillingAccount operations
:vartype external_billing_account: azure.mgmt.costmanagement.operations.ExternalBillingAccountOperations
:ivar external_subscription: ExternalSubscription operations
:vartype external_subscription: azure.mgmt.costmanagement.operations.ExternalSubscriptionOperations
:ivar entities: Entities operations
:vartype entities: azure.mgmt.costmanagement.operations.EntitiesOperations
:ivar exports: Exports operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.operations.Operations
Expand All @@ -94,23 +82,15 @@ def __init__(
super(CostManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-03-01-preview'
self.api_version = '2019-01-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.dimensions = DimensionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.query = QueryOperations(
self._client, self.config, self._serialize, self._deserialize)
self.forecast = ForecastOperations(
self._client, self.config, self._serialize, self._deserialize)
self.cloud_connector = CloudConnectorOperations(
self._client, self.config, self._serialize, self._deserialize)
self.external_billing_account = ExternalBillingAccountOperations(
self._client, self.config, self._serialize, self._deserialize)
self.external_subscription = ExternalSubscriptionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.entities = EntitiesOperations(
self.exports = ExportsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
135 changes: 68 additions & 67 deletions azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,110 +10,111 @@
# --------------------------------------------------------------------------

try:
from .error_base_py3 import ErrorBase
from .error_details_py3 import ErrorDetails
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .resource_py3 import Resource
from .report_config_time_period_py3 import ReportConfigTimePeriod
from .report_config_dataset_configuration_py3 import ReportConfigDatasetConfiguration
from .report_config_aggregation_py3 import ReportConfigAggregation
from .report_config_grouping_py3 import ReportConfigGrouping
from .report_config_sorting_py3 import ReportConfigSorting
from .report_config_comparison_expression_py3 import ReportConfigComparisonExpression
from .report_config_filter_py3 import ReportConfigFilter
from .report_config_dataset_py3 import ReportConfigDataset
from .report_config_definition_py3 import ReportConfigDefinition
from .dimension_py3 import Dimension
from .query_column_py3 import QueryColumn
from .query_py3 import Query
from .connector_collection_error_info_py3 import ConnectorCollectionErrorInfo
from .connector_collection_info_py3 import ConnectorCollectionInfo
from .connector_definition_py3 import ConnectorDefinition
from .external_billing_account_definition_py3 import ExternalBillingAccountDefinition
from .external_subscription_definition_py3 import ExternalSubscriptionDefinition
from .entity_parent_group_info_py3 import EntityParentGroupInfo
from .entity_info_py3 import EntityInfo
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .query_time_period_py3 import QueryTimePeriod
from .query_dataset_configuration_py3 import QueryDatasetConfiguration
from .query_aggregation_py3 import QueryAggregation
from .query_grouping_py3 import QueryGrouping
from .query_sorting_configuration_py3 import QuerySortingConfiguration
from .query_comparison_expression_py3 import QueryComparisonExpression
from .query_filter_py3 import QueryFilter
from .query_dataset_py3 import QueryDataset
from .query_definition_py3 import QueryDefinition
from .export_recurrence_period_py3 import ExportRecurrencePeriod
from .export_schedule_py3 import ExportSchedule
from .export_py3 import Export
from .export_list_result_py3 import ExportListResult
from .export_delivery_destination_py3 import ExportDeliveryDestination
from .export_delivery_info_py3 import ExportDeliveryInfo
from .common_export_properties_py3 import CommonExportProperties
from .export_execution_py3 import ExportExecution
from .export_execution_list_result_py3 import ExportExecutionListResult
except (SyntaxError, ImportError):
from .error_base import ErrorBase
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .resource import Resource
from .report_config_time_period import ReportConfigTimePeriod
from .report_config_dataset_configuration import ReportConfigDatasetConfiguration
from .report_config_aggregation import ReportConfigAggregation
from .report_config_grouping import ReportConfigGrouping
from .report_config_sorting import ReportConfigSorting
from .report_config_comparison_expression import ReportConfigComparisonExpression
from .report_config_filter import ReportConfigFilter
from .report_config_dataset import ReportConfigDataset
from .report_config_definition import ReportConfigDefinition
from .dimension import Dimension
from .query_column import QueryColumn
from .query import Query
from .connector_collection_error_info import ConnectorCollectionErrorInfo
from .connector_collection_info import ConnectorCollectionInfo
from .connector_definition import ConnectorDefinition
from .external_billing_account_definition import ExternalBillingAccountDefinition
from .external_subscription_definition import ExternalSubscriptionDefinition
from .entity_parent_group_info import EntityParentGroupInfo
from .entity_info import EntityInfo
from .operation_display import OperationDisplay
from .operation import Operation
from .query_time_period import QueryTimePeriod
from .query_dataset_configuration import QueryDatasetConfiguration
from .query_aggregation import QueryAggregation
from .query_grouping import QueryGrouping
from .query_sorting_configuration import QuerySortingConfiguration
from .query_comparison_expression import QueryComparisonExpression
from .query_filter import QueryFilter
from .query_dataset import QueryDataset
from .query_definition import QueryDefinition
from .export_recurrence_period import ExportRecurrencePeriod
from .export_schedule import ExportSchedule
from .export import Export
from .export_list_result import ExportListResult
from .export_delivery_destination import ExportDeliveryDestination
from .export_delivery_info import ExportDeliveryInfo
from .common_export_properties import CommonExportProperties
from .export_execution import ExportExecution
from .export_execution_list_result import ExportExecutionListResult
from .dimension_paged import DimensionPaged
from .query_paged import QueryPaged
from .connector_definition_paged import ConnectorDefinitionPaged
from .external_billing_account_definition_paged import ExternalBillingAccountDefinitionPaged
from .external_subscription_definition_paged import ExternalSubscriptionDefinitionPaged
from .entity_info_paged import EntityInfoPaged
from .operation_paged import OperationPaged
from .cost_management_client_enums import (
TimeframeType,
GranularityType,
ReportConfigColumnType,
OperatorType,
ConnectorStatus,
ConnectorBillingModel,
QueryColumnType,
SortDirection,
StatusType,
RecurrenceType,
FormatType,
ExecutionType,
ExecutionStatus,
)

__all__ = [
'ErrorBase',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'Resource',
'ReportConfigTimePeriod',
'ReportConfigDatasetConfiguration',
'ReportConfigAggregation',
'ReportConfigGrouping',
'ReportConfigSorting',
'ReportConfigComparisonExpression',
'ReportConfigFilter',
'ReportConfigDataset',
'ReportConfigDefinition',
'Dimension',
'QueryColumn',
'Query',
'ConnectorCollectionErrorInfo',
'ConnectorCollectionInfo',
'ConnectorDefinition',
'ExternalBillingAccountDefinition',
'ExternalSubscriptionDefinition',
'EntityParentGroupInfo',
'EntityInfo',
'OperationDisplay',
'Operation',
'QueryTimePeriod',
'QueryDatasetConfiguration',
'QueryAggregation',
'QueryGrouping',
'QuerySortingConfiguration',
'QueryComparisonExpression',
'QueryFilter',
'QueryDataset',
'QueryDefinition',
'ExportRecurrencePeriod',
'ExportSchedule',
'Export',
'ExportListResult',
'ExportDeliveryDestination',
'ExportDeliveryInfo',
'CommonExportProperties',
'ExportExecution',
'ExportExecutionListResult',
'DimensionPaged',
'QueryPaged',
'ConnectorDefinitionPaged',
'ExternalBillingAccountDefinitionPaged',
'ExternalSubscriptionDefinitionPaged',
'EntityInfoPaged',
'OperationPaged',
'TimeframeType',
'GranularityType',
'ReportConfigColumnType',
'OperatorType',
'ConnectorStatus',
'ConnectorBillingModel',
'QueryColumnType',
'SortDirection',
'StatusType',
'RecurrenceType',
'FormatType',
'ExecutionType',
'ExecutionStatus',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CommonExportProperties(Model):
"""The common properties of the export.
All required parameters must be populated in order to send to Azure.
:param format: The format of the export being delivered. Possible values
include: 'Csv'
:type format: str or ~azure.mgmt.costmanagement.models.FormatType
:param delivery_info: Required. Has delivery information for the export.
:type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo
:param definition: Required. Has definition for the export.
:type definition: ~azure.mgmt.costmanagement.models.QueryDefinition
"""

_validation = {
'delivery_info': {'required': True},
'definition': {'required': True},
}

_attribute_map = {
'format': {'key': 'format', 'type': 'str'},
'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'},
'definition': {'key': 'definition', 'type': 'QueryDefinition'},
}

def __init__(self, **kwargs):
super(CommonExportProperties, self).__init__(**kwargs)
self.format = kwargs.get('format', None)
self.delivery_info = kwargs.get('delivery_info', None)
self.definition = kwargs.get('definition', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class CommonExportProperties(Model):
"""The common properties of the export.
All required parameters must be populated in order to send to Azure.
:param format: The format of the export being delivered. Possible values
include: 'Csv'
:type format: str or ~azure.mgmt.costmanagement.models.FormatType
:param delivery_info: Required. Has delivery information for the export.
:type delivery_info: ~azure.mgmt.costmanagement.models.ExportDeliveryInfo
:param definition: Required. Has definition for the export.
:type definition: ~azure.mgmt.costmanagement.models.QueryDefinition
"""

_validation = {
'delivery_info': {'required': True},
'definition': {'required': True},
}

_attribute_map = {
'format': {'key': 'format', 'type': 'str'},
'delivery_info': {'key': 'deliveryInfo', 'type': 'ExportDeliveryInfo'},
'definition': {'key': 'definition', 'type': 'QueryDefinition'},
}

def __init__(self, *, delivery_info, definition, format=None, **kwargs) -> None:
super(CommonExportProperties, self).__init__(**kwargs)
self.format = format
self.delivery_info = delivery_info
self.definition = definition
Loading

0 comments on commit 943a554

Please sign in to comment.