Skip to content

Commit bf74d06

Browse files
author
SDKAuto
committed
CodeGen from PR 16979 in Azure/azure-rest-api-specs
Merge 0a7ac43ffa53f27323e1200d69e99253c1a3b551 into 682ebc3
1 parent 3a14782 commit bf74d06

18 files changed

+3560
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from ._configuration import MicrosoftElasticConfiguration
13+
from ._microsoft_elastic import MicrosoftElastic
14+
__all__ = ['MicrosoftElastic', 'MicrosoftElasticConfiguration']
15+
16+
from .version import VERSION
17+
18+
__version__ = VERSION
19+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class MicrosoftElasticConfiguration(AzureConfiguration):
17+
"""Configuration for MicrosoftElastic
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The Azure subscription ID. This is a
25+
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
26+
:type subscription_id: str
27+
:param str base_url: Service URL
28+
"""
29+
30+
def __init__(
31+
self, credentials, subscription_id, base_url=None):
32+
33+
if credentials is None:
34+
raise ValueError("Parameter 'credentials' must not be None.")
35+
if subscription_id is None:
36+
raise ValueError("Parameter 'subscription_id' must not be None.")
37+
if not base_url:
38+
base_url = 'https://management.azure.com'
39+
40+
super(MicrosoftElasticConfiguration, self).__init__(base_url)
41+
42+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
43+
self.keep_alive = True
44+
45+
self.add_user_agent('azure-mgmt-elastic/{}'.format(VERSION))
46+
self.add_user_agent('Azure-SDK-For-Python')
47+
48+
self.credentials = credentials
49+
self.subscription_id = subscription_id
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
15+
from ._configuration import MicrosoftElasticConfiguration
16+
from .operations import Operations
17+
from .operations import MonitorsOperations
18+
from .operations import MonitoredResourcesOperations
19+
from .operations import DeploymentInfoOperations
20+
from .operations import TagRulesOperations
21+
from .operations import VMHostOperations
22+
from .operations import VMIngestionOperations
23+
from .operations import VMCollectionOperations
24+
from . import models
25+
26+
27+
class MicrosoftElastic(SDKClient):
28+
"""MicrosoftElastic
29+
30+
:ivar config: Configuration for client.
31+
:vartype config: MicrosoftElasticConfiguration
32+
33+
:ivar operations: Operations operations
34+
:vartype operations: azure.mgmt.elastic.operations.Operations
35+
:ivar monitors: Monitors operations
36+
:vartype monitors: azure.mgmt.elastic.operations.MonitorsOperations
37+
:ivar monitored_resources: MonitoredResources operations
38+
:vartype monitored_resources: azure.mgmt.elastic.operations.MonitoredResourcesOperations
39+
:ivar deployment_info: DeploymentInfo operations
40+
:vartype deployment_info: azure.mgmt.elastic.operations.DeploymentInfoOperations
41+
:ivar tag_rules: TagRules operations
42+
:vartype tag_rules: azure.mgmt.elastic.operations.TagRulesOperations
43+
:ivar vm_host: VMHost operations
44+
:vartype vm_host: azure.mgmt.elastic.operations.VMHostOperations
45+
:ivar vm_ingestion: VMIngestion operations
46+
:vartype vm_ingestion: azure.mgmt.elastic.operations.VMIngestionOperations
47+
:ivar vm_collection: VMCollection operations
48+
:vartype vm_collection: azure.mgmt.elastic.operations.VMCollectionOperations
49+
50+
:param credentials: Credentials needed for the client to connect to Azure.
51+
:type credentials: :mod:`A msrestazure Credentials
52+
object<msrestazure.azure_active_directory>`
53+
:param subscription_id: The Azure subscription ID. This is a
54+
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
55+
:type subscription_id: str
56+
:param str base_url: Service URL
57+
"""
58+
59+
def __init__(
60+
self, credentials, subscription_id, base_url=None):
61+
62+
self.config = MicrosoftElasticConfiguration(credentials, subscription_id, base_url)
63+
super(MicrosoftElastic, self).__init__(self.config.credentials, self.config)
64+
65+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
66+
self.api_version = '2020-07-01-preview'
67+
self._serialize = Serializer(client_models)
68+
self._deserialize = Deserializer(client_models)
69+
70+
self.operations = Operations(
71+
self._client, self.config, self._serialize, self._deserialize)
72+
self.monitors = MonitorsOperations(
73+
self._client, self.config, self._serialize, self._deserialize)
74+
self.monitored_resources = MonitoredResourcesOperations(
75+
self._client, self.config, self._serialize, self._deserialize)
76+
self.deployment_info = DeploymentInfoOperations(
77+
self._client, self.config, self._serialize, self._deserialize)
78+
self.tag_rules = TagRulesOperations(
79+
self._client, self.config, self._serialize, self._deserialize)
80+
self.vm_host = VMHostOperations(
81+
self._client, self.config, self._serialize, self._deserialize)
82+
self.vm_ingestion = VMIngestionOperations(
83+
self._client, self.config, self._serialize, self._deserialize)
84+
self.vm_collection = VMCollectionOperations(
85+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
try:
13+
from ._models_py3 import CompanyInfo
14+
from ._models_py3 import DeploymentInfoResponse
15+
from ._models_py3 import ElasticCloudDeployment
16+
from ._models_py3 import ElasticCloudUser
17+
from ._models_py3 import ElasticMonitorResource
18+
from ._models_py3 import ElasticMonitorResourceUpdateParameters
19+
from ._models_py3 import ElasticProperties
20+
from ._models_py3 import ErrorResponseBody
21+
from ._models_py3 import FilteringTag
22+
from ._models_py3 import IdentityProperties
23+
from ._models_py3 import LogRules
24+
from ._models_py3 import MonitoredResource
25+
from ._models_py3 import MonitoringTagRules
26+
from ._models_py3 import MonitoringTagRulesProperties
27+
from ._models_py3 import MonitorProperties
28+
from ._models_py3 import OperationDisplay
29+
from ._models_py3 import OperationResult
30+
from ._models_py3 import ResourceProviderDefaultErrorResponse, ResourceProviderDefaultErrorResponseException
31+
from ._models_py3 import ResourceSku
32+
from ._models_py3 import SystemData
33+
from ._models_py3 import UserInfo
34+
from ._models_py3 import VMCollectionUpdate
35+
from ._models_py3 import VMIngestionDetailsResponse
36+
from ._models_py3 import VMResources
37+
except (SyntaxError, ImportError):
38+
from ._models import CompanyInfo
39+
from ._models import DeploymentInfoResponse
40+
from ._models import ElasticCloudDeployment
41+
from ._models import ElasticCloudUser
42+
from ._models import ElasticMonitorResource
43+
from ._models import ElasticMonitorResourceUpdateParameters
44+
from ._models import ElasticProperties
45+
from ._models import ErrorResponseBody
46+
from ._models import FilteringTag
47+
from ._models import IdentityProperties
48+
from ._models import LogRules
49+
from ._models import MonitoredResource
50+
from ._models import MonitoringTagRules
51+
from ._models import MonitoringTagRulesProperties
52+
from ._models import MonitorProperties
53+
from ._models import OperationDisplay
54+
from ._models import OperationResult
55+
from ._models import ResourceProviderDefaultErrorResponse, ResourceProviderDefaultErrorResponseException
56+
from ._models import ResourceSku
57+
from ._models import SystemData
58+
from ._models import UserInfo
59+
from ._models import VMCollectionUpdate
60+
from ._models import VMIngestionDetailsResponse
61+
from ._models import VMResources
62+
from ._paged_models import ElasticMonitorResourcePaged
63+
from ._paged_models import MonitoredResourcePaged
64+
from ._paged_models import MonitoringTagRulesPaged
65+
from ._paged_models import OperationResultPaged
66+
from ._paged_models import VMResourcesPaged
67+
from ._microsoft_elastic_enums import (
68+
ProvisioningState,
69+
MonitoringStatus,
70+
LiftrResourceCategories,
71+
ManagedIdentityTypes,
72+
CreatedByType,
73+
SendingLogs,
74+
TagAction,
75+
ElasticDeploymentStatus,
76+
OperationName,
77+
)
78+
79+
__all__ = [
80+
'CompanyInfo',
81+
'DeploymentInfoResponse',
82+
'ElasticCloudDeployment',
83+
'ElasticCloudUser',
84+
'ElasticMonitorResource',
85+
'ElasticMonitorResourceUpdateParameters',
86+
'ElasticProperties',
87+
'ErrorResponseBody',
88+
'FilteringTag',
89+
'IdentityProperties',
90+
'LogRules',
91+
'MonitoredResource',
92+
'MonitoringTagRules',
93+
'MonitoringTagRulesProperties',
94+
'MonitorProperties',
95+
'OperationDisplay',
96+
'OperationResult',
97+
'ResourceProviderDefaultErrorResponse', 'ResourceProviderDefaultErrorResponseException',
98+
'ResourceSku',
99+
'SystemData',
100+
'UserInfo',
101+
'VMCollectionUpdate',
102+
'VMIngestionDetailsResponse',
103+
'VMResources',
104+
'OperationResultPaged',
105+
'ElasticMonitorResourcePaged',
106+
'MonitoredResourcePaged',
107+
'MonitoringTagRulesPaged',
108+
'VMResourcesPaged',
109+
'ProvisioningState',
110+
'MonitoringStatus',
111+
'LiftrResourceCategories',
112+
'ManagedIdentityTypes',
113+
'CreatedByType',
114+
'SendingLogs',
115+
'TagAction',
116+
'ElasticDeploymentStatus',
117+
'OperationName',
118+
]
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from enum import Enum
13+
14+
15+
class ProvisioningState(str, Enum):
16+
17+
accepted = "Accepted"
18+
creating = "Creating"
19+
updating = "Updating"
20+
deleting = "Deleting"
21+
succeeded = "Succeeded"
22+
failed = "Failed"
23+
canceled = "Canceled"
24+
deleted = "Deleted"
25+
not_specified = "NotSpecified"
26+
27+
28+
class MonitoringStatus(str, Enum):
29+
30+
enabled = "Enabled"
31+
disabled = "Disabled"
32+
33+
34+
class LiftrResourceCategories(str, Enum):
35+
36+
unknown = "Unknown"
37+
monitor_logs = "MonitorLogs"
38+
39+
40+
class ManagedIdentityTypes(str, Enum):
41+
42+
system_assigned = "SystemAssigned"
43+
44+
45+
class CreatedByType(str, Enum):
46+
47+
user = "User"
48+
application = "Application"
49+
managed_identity = "ManagedIdentity"
50+
key = "Key"
51+
52+
53+
class SendingLogs(str, Enum):
54+
55+
true = "True"
56+
false = "False"
57+
58+
59+
class TagAction(str, Enum):
60+
61+
include = "Include"
62+
exclude = "Exclude"
63+
64+
65+
class ElasticDeploymentStatus(str, Enum):
66+
67+
healthy = "Healthy"
68+
unhealthy = "Unhealthy"
69+
70+
71+
class OperationName(str, Enum):
72+
73+
add = "Add"
74+
delete = "Delete"

0 commit comments

Comments
 (0)