Skip to content

Commit

Permalink
[AutoPR] cost-management/resource-manager (#2924)
Browse files Browse the repository at this point in the history
* Generated from 58db2cd8519af2e0e6f428c7ab82da2891b440f5 (#2836)

add README file for cost management

* Generated from 7d375b2ce4c679c5e3a1f63185925ca83422c098 (#3068)

Add Connector resource type as preview to CostManagement RP

* Initial commit for Microsoft.CostManagement 2018-09-01-preview
* Add Connector resource type as preview to CostManagement RP

* [AutoPR cost-management/resource-manager] Reports API moved from stable to preview version with addition of documentation of a couple of new APIs (#3145)

* Generated from 9f3607b94b9c3f9b6c2fa12ae00ed71a80d42699

Updated reports api documentation

* Generated from 41ff04d4ffb063505850fbecd4dd6061f4072f29

Undo remove of API from stable version

* [AutoPR cost-management/resource-manager] Fixing examples and adding missed properties (#3480)

* Generated from 73f83b4c51d265aca17132381382f60da78d5f7a

Fixing examples and adding missed properties

* Packaging update of azure-mgmt-costmanagement

* [AutoPR cost-management/resource-manager] typo: Microsoft.CostManagement (#3929)

* Generated from 56aef8383527613e2ee15566cd34c6b92fd07647

typo: Microsoft.CostManagement

- acount -> account
- dategory -> category
- upto -> up to
- atleast -> at least
- comaprison -> comparison
- exeuction -> execution
- occuring -> occurring
- overriden -> overridden
- managment -. management

* Packaging update of azure-mgmt-costmanagement

* Generated from 855ab2ed573e2d8fe8a65f8a8e638e8a9b033759 (#4202)

Suppress OperationsAPIImplementation error for Microsoft.Billing

* [AutoPR cost-management/resource-manager] PR - Introduce new API version (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

* Update HISTORY.rst

* Update sdk_packaging.toml

* Update version.py

* Packaging update of azure-mgmt-costmanagement

* Generated from a2af3bff7af39874c0611ca27d8b00c33e79be3b (#4413)

Add Put Rule

* [AutoPR cost-management/resource-manager] [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-01-01 (#4825)

* Generated from b8c32f37aa9e744d36530fcbd4caac35a37828f2

Adds suppression to readme

* Packaging update of azure-mgmt-costmanagement

* Generated from dda9bf78560444698902a49dadcbf2a5598dd1e9

updated examples with scope param and fixed syntax error

* 0.1.0
  • Loading branch information
AutorestCI authored and lmazuel committed May 4, 2019
1 parent 44bc675 commit 9cf34cc
Show file tree
Hide file tree
Showing 73 changed files with 3,826 additions and 0 deletions.
9 changes: 9 additions & 0 deletions azure-mgmt-costmanagement/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (2019-05-04)
++++++++++++++++++

* Initial Release
5 changes: 5 additions & 0 deletions azure-mgmt-costmanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

33 changes: 33 additions & 0 deletions azure-mgmt-costmanagement/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure Cost Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Usage
=====

For code examples, see `Cost Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-costmanagement%2FREADME.png
1 change: 1 addition & 0 deletions azure-mgmt-costmanagement/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-costmanagement/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
18 changes: 18 additions & 0 deletions azure-mgmt-costmanagement/azure/mgmt/costmanagement/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .cost_management_client import CostManagementClient
from .version import VERSION

__all__ = ['CostManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.dimensions_operations import DimensionsOperations
from .operations.query_operations import QueryOperations
from .operations.exports_operations import ExportsOperations
from .operations.operations import Operations
from . import models


class CostManagementClientConfiguration(AzureConfiguration):
"""Configuration for CostManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(CostManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-costmanagement/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class CostManagementClient(SDKClient):
"""CostManagementClient
:ivar config: Configuration for client.
:vartype config: CostManagementClientConfiguration
:ivar dimensions: Dimensions operations
:vartype dimensions: azure.mgmt.costmanagement.operations.DimensionsOperations
:ivar query: Query operations
:vartype query: azure.mgmt.costmanagement.operations.QueryOperations
:ivar exports: Exports operations
:vartype exports: azure.mgmt.costmanagement.operations.ExportsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.costmanagement.operations.Operations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure Subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = CostManagementClientConfiguration(credentials, subscription_id, base_url)
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-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.exports = ExportsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
120 changes: 120 additions & 0 deletions azure-mgmt-costmanagement/azure/mgmt/costmanagement/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# 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.
# --------------------------------------------------------------------------

try:
from .error_details_py3 import ErrorDetails
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .resource_py3 import Resource
from .dimension_py3 import Dimension
from .query_column_py3 import QueryColumn
from .query_py3 import Query
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_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .resource import Resource
from .dimension import Dimension
from .query_column import QueryColumn
from .query import Query
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 .operation_paged import OperationPaged
from .cost_management_client_enums import (
TimeframeType,
GranularityType,
QueryColumnType,
SortDirection,
StatusType,
RecurrenceType,
FormatType,
ExecutionType,
ExecutionStatus,
)

__all__ = [
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'Resource',
'Dimension',
'QueryColumn',
'Query',
'OperationDisplay',
'Operation',
'QueryTimePeriod',
'QueryDatasetConfiguration',
'QueryAggregation',
'QueryGrouping',
'QuerySortingConfiguration',
'QueryComparisonExpression',
'QueryFilter',
'QueryDataset',
'QueryDefinition',
'ExportRecurrencePeriod',
'ExportSchedule',
'Export',
'ExportListResult',
'ExportDeliveryDestination',
'ExportDeliveryInfo',
'CommonExportProperties',
'ExportExecution',
'ExportExecutionListResult',
'DimensionPaged',
'QueryPaged',
'OperationPaged',
'TimeframeType',
'GranularityType',
'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 9cf34cc

Please sign in to comment.