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

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

Merged
Merged
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
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 (1970-01-01)
++++++++++++++++++

* Initial Release
1 change: 1 addition & 0 deletions azure-mgmt-costmanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include *.rst
49 changes: 49 additions & 0 deletions azure-mgmt-costmanagement/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService 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.


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
=====

For code examples, see `MyService 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.
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__)
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .operations.billing_account_dimensions_operations import BillingAccountDimensionsOperations
from .operations.subscription_dimensions_operations import SubscriptionDimensionsOperations
from .operations.resource_group_dimensions_operations import ResourceGroupDimensionsOperations
from .operations.operations import Operations
from . import models


Expand Down Expand Up @@ -68,6 +69,8 @@ class CostManagementClient(SDKClient):
:vartype subscription_dimensions: azure.mgmt.costmanagement.operations.SubscriptionDimensionsOperations
:ivar resource_group_dimensions: ResourceGroupDimensions operations
:vartype resource_group_dimensions: azure.mgmt.costmanagement.operations.ResourceGroupDimensionsOperations
: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
Expand Down Expand Up @@ -96,6 +99,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.resource_group_dimensions = ResourceGroupDimensionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)

def query_subscription(
self, parameters, custom_headers=None, raw=False, **operation_config):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
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
except (SyntaxError, ImportError):
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
Expand All @@ -51,8 +53,11 @@
from .dimension import Dimension
from .query_column import QueryColumn
from .query import Query
from .operation_display import OperationDisplay
from .operation import Operation
from .dimension_paged import DimensionPaged
from .query_paged import QueryPaged
from .operation_paged import OperationPaged
from .cost_management_client_enums import (
StatusType,
RecurrenceType,
Expand Down Expand Up @@ -83,8 +88,11 @@
'Dimension',
'QueryColumn',
'Query',
'OperationDisplay',
'Operation',
'DimensionPaged',
'QueryPaged',
'OperationPaged',
'StatusType',
'RecurrenceType',
'FormatType',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 Operation(Model):
"""A Cost management REST API operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar name: Operation name: {provider}/{resource}/{operation}.
:vartype name: str
:param display: The object that represents the operation.
:type display: ~azure.mgmt.costmanagement.models.OperationDisplay
"""

_validation = {
'name': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = None
self.display = kwargs.get('display', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 OperationDisplay(Model):
"""The object that represents the operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar provider: Service provider: Microsoft.CostManagement.
:vartype provider: str
:ivar resource: Resource on which the operation is performed: Dimensions,
Query.
:vartype resource: str
:ivar operation: Operation type: Read, write, delete, etc.
:vartype operation: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
}

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 OperationDisplay(Model):
"""The object that represents the operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar provider: Service provider: Microsoft.CostManagement.
:vartype provider: str
:ivar resource: Resource on which the operation is performed: Dimensions,
Query.
:vartype resource: str
:ivar operation: Operation type: Read, write, delete, etc.
:vartype operation: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
}

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class OperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`Operation <azure.mgmt.costmanagement.models.Operation>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Operation]'}
}

def __init__(self, *args, **kwargs):

super(OperationPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 Operation(Model):
"""A Cost management REST API operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar name: Operation name: {provider}/{resource}/{operation}.
:vartype name: str
:param display: The object that represents the operation.
:type display: ~azure.mgmt.costmanagement.models.OperationDisplay
"""

_validation = {
'name': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, *, display=None, **kwargs) -> None:
super(Operation, self).__init__(**kwargs)
self.name = None
self.display = display
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
from .billing_account_dimensions_operations import BillingAccountDimensionsOperations
from .subscription_dimensions_operations import SubscriptionDimensionsOperations
from .resource_group_dimensions_operations import ResourceGroupDimensionsOperations
from .operations import Operations

__all__ = [
'ReportConfigOperations',
'BillingAccountDimensionsOperations',
'SubscriptionDimensionsOperations',
'ResourceGroupDimensionsOperations',
'Operations',
]
Loading