Skip to content
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
18 changes: 18 additions & 0 deletions azure-mgmt-workloadmonitor/azure/mgmt/workloadmonitor/__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 .workload_monitor_api import WorkloadMonitorAPI
from .version import VERSION

__all__ = ['WorkloadMonitorAPI']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 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 .monitor_criteria_py3 import MonitorCriteria
from .monitor_py3 import Monitor
from .component_py3 import Component
from .health_state_change_py3 import HealthStateChange
from .monitor_instance_py3 import MonitorInstance
from .notification_setting_py3 import NotificationSetting
from .operation_properties_py3 import OperationProperties
from .operation_py3 import Operation
from .error_field_contract_py3 import ErrorFieldContract
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .tracked_resource_py3 import TrackedResource
from .azure_entity_resource_py3 import AzureEntityResource
from .resource_py3 import Resource
from .proxy_resource_py3 import ProxyResource
except (SyntaxError, ImportError):
from .monitor_criteria import MonitorCriteria
from .monitor import Monitor
from .component import Component
from .health_state_change import HealthStateChange
from .monitor_instance import MonitorInstance
from .notification_setting import NotificationSetting
from .operation_properties import OperationProperties
from .operation import Operation
from .error_field_contract import ErrorFieldContract
from .error_response import ErrorResponse, ErrorResponseException
from .tracked_resource import TrackedResource
from .azure_entity_resource import AzureEntityResource
from .resource import Resource
from .proxy_resource import ProxyResource
from .monitor_paged import MonitorPaged
from .component_paged import ComponentPaged
from .monitor_instance_paged import MonitorInstancePaged
from .notification_setting_paged import NotificationSettingPaged
from .operation_paged import OperationPaged
from .workload_monitor_api_enums import (
MonitorType,
MonitorCategory,
MonitorState,
HealthState,
Operator,
AlertGeneration,
WorkloadType,
HealthStateCategory,
)

__all__ = [
'MonitorCriteria',
'Monitor',
'Component',
'HealthStateChange',
'MonitorInstance',
'NotificationSetting',
'OperationProperties',
'Operation',
'ErrorFieldContract',
'ErrorResponse', 'ErrorResponseException',
'TrackedResource',
'AzureEntityResource',
'Resource',
'ProxyResource',
'MonitorPaged',
'ComponentPaged',
'MonitorInstancePaged',
'NotificationSettingPaged',
'OperationPaged',
'MonitorType',
'MonitorCategory',
'MonitorState',
'HealthState',
'Operator',
'AlertGeneration',
'WorkloadType',
'HealthStateCategory',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 .resource import Resource


class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.

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

:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'etag': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AzureEntityResource, self).__init__(**kwargs)
self.etag = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 .resource_py3 import Resource


class AzureEntityResource(Resource):
"""The resource model definition for a Azure Resource Manager resource with an
etag.

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

:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:ivar etag: Resource Etag.
:vartype etag: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'etag': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(AzureEntityResource, self).__init__(**kwargs)
self.etag = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# 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 .proxy_resource import ProxyResource


class Component(ProxyResource):
"""Model for component.

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

:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
:vartype type: str
:ivar etag: For optimistic concurrency control.
:vartype etag: str
:ivar workspace_id: ID of the workspace.
:vartype workspace_id: str
:ivar solution_id: ID of the OMS solution this component belong to.
:vartype solution_id: str
:ivar workload_type: Type of the workload. Possible values include:
'BaseOS', 'SQL', 'IIS', 'Apache'
:vartype workload_type: str or
~azure.mgmt.workloadmonitor.models.WorkloadType
:ivar component_name: Name of the component.
:vartype component_name: str
:ivar component_type_id: ID of the component type.
:vartype component_type_id: str
:ivar component_type_name: Name of the component type. Qualifies the type
of component such as whether it is a SQL database, logical disk, website,
etc.
:vartype component_type_name: str
:ivar component_type_group_category: Component type group category.
Classification of component type groups into a logical category. e.g.
Network, Disk, Memory, CPU.
:vartype component_type_group_category: str
:ivar health_state: Health state of the component. Possible values
include: 'Error', 'Warning', 'Success', 'Unknown', 'Uninitialized'
:vartype health_state: str or
~azure.mgmt.workloadmonitor.models.HealthState
:ivar health_state_category: Category of component's health state.
Possible values include: 'Identity', 'CustomGroup'
:vartype health_state_category: str or
~azure.mgmt.workloadmonitor.models.HealthStateCategory
:ivar health_state_changes_start_time: Start time for health state
changes.
:vartype health_state_changes_start_time: datetime
:ivar health_state_changes_end_time: End time for health state changes.
:vartype health_state_changes_end_time: datetime
:ivar last_health_state_change_time: Time of last health state change.
:vartype last_health_state_change_time: datetime
:ivar vm_id: ID of the VM this component belongs to.
:vartype vm_id: str
:ivar vm_name: Name of the VM this component belongs to.
:vartype vm_name: str
:ivar vm_tags: Tags on the VM this component belongs to.
:vartype vm_tags: dict[str, str]
:ivar aggregate_properties: Properties requested in aggregation queries.
:vartype aggregate_properties: dict[str, str]
:ivar children: component children.
:vartype children: list[~azure.mgmt.workloadmonitor.models.Component]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'etag': {'readonly': True},
'workspace_id': {'readonly': True},
'solution_id': {'readonly': True},
'workload_type': {'readonly': True},
'component_name': {'readonly': True},
'component_type_id': {'readonly': True},
'component_type_name': {'readonly': True},
'component_type_group_category': {'readonly': True},
'health_state': {'readonly': True},
'health_state_category': {'readonly': True},
'health_state_changes_start_time': {'readonly': True},
'health_state_changes_end_time': {'readonly': True},
'last_health_state_change_time': {'readonly': True},
'vm_id': {'readonly': True},
'vm_name': {'readonly': True},
'vm_tags': {'readonly': True},
'aggregate_properties': {'readonly': True},
'children': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'},
'solution_id': {'key': 'properties.solutionId', 'type': 'str'},
'workload_type': {'key': 'properties.workloadType', 'type': 'str'},
'component_name': {'key': 'properties.componentName', 'type': 'str'},
'component_type_id': {'key': 'properties.componentTypeId', 'type': 'str'},
'component_type_name': {'key': 'properties.componentTypeName', 'type': 'str'},
'component_type_group_category': {'key': 'properties.componentTypeGroupCategory', 'type': 'str'},
'health_state': {'key': 'properties.healthState', 'type': 'HealthState'},
'health_state_category': {'key': 'properties.healthStateCategory', 'type': 'str'},
'health_state_changes_start_time': {'key': 'properties.healthStateChangesStartTime', 'type': 'iso-8601'},
'health_state_changes_end_time': {'key': 'properties.healthStateChangesEndTime', 'type': 'iso-8601'},
'last_health_state_change_time': {'key': 'properties.lastHealthStateChangeTime', 'type': 'iso-8601'},
'vm_id': {'key': 'properties.vmId', 'type': 'str'},
'vm_name': {'key': 'properties.vmName', 'type': 'str'},
'vm_tags': {'key': 'properties.vmTags', 'type': '{str}'},
'aggregate_properties': {'key': 'properties.aggregateProperties', 'type': '{str}'},
'children': {'key': 'properties.children', 'type': '[Component]'},
}

def __init__(self, **kwargs):
super(Component, self).__init__(**kwargs)
self.etag = None
self.workspace_id = None
self.solution_id = None
self.workload_type = None
self.component_name = None
self.component_type_id = None
self.component_type_name = None
self.component_type_group_category = None
self.health_state = None
self.health_state_category = None
self.health_state_changes_start_time = None
self.health_state_changes_end_time = None
self.last_health_state_change_time = None
self.vm_id = None
self.vm_name = None
self.vm_tags = None
self.aggregate_properties = None
self.children = 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 ComponentPaged(Paged):
"""
A paging container for iterating over a list of :class:`Component <azure.mgmt.workloadmonitor.models.Component>` object
"""

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

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

super(ComponentPaged, self).__init__(*args, **kwargs)
Loading