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

[ReleasePR track2_azure-mgmt-monitor] [Monitor] Added DataCollectionRules in 2019-11-01-preview #12906

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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class MonitorClient(MultiApiClientMixin, _SDKClient):
'operations': '2015-04-01',
'scheduled_query_rules': '2018-04-16',
'service_diagnostic_settings': '2016-09-01',
'subscription_diagnostic_settings': '2017-05-01-preview',
'tenant_activity_logs': '2015-04-01',
'vm_insights': '2018-11-27-preview',
}},
Expand Down Expand Up @@ -126,6 +127,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-03-01: :mod:`v2019_03_01.models<azure.mgmt.eventhub.v2019_03_01.models>`
* 2019-06-01: :mod:`v2019_06_01.models<azure.mgmt.eventhub.v2019_06_01.models>`
* 2019-10-17-preview: :mod:`v2019_10_17.models<azure.mgmt.eventhub.v2019_10_17.models>`
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.eventhub.v2020_01_01_preview.models>`
"""
if api_version == '2015-04-01':
from .v2015_04_01 import models
Expand Down Expand Up @@ -181,6 +183,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-10-17-preview':
from .v2019_10_17 import models
return models
elif api_version == '2020-01-01-preview':
from .v2020_01_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -380,6 +385,19 @@ def log_profiles(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def management_group_diagnostic_settings(self):
"""Instance depends on the API version:

* 2020-01-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations<azure.mgmt.eventhub.v2020_01_01_preview.operations.ManagementGroupDiagnosticSettingsOperations>`
"""
api_version = self._get_api_version('management_group_diagnostic_settings')
if api_version == '2020-01-01-preview':
from .v2020_01_01_preview.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_alerts(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -580,6 +598,19 @@ def service_diagnostic_settings(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def subscription_diagnostic_settings(self):
"""Instance depends on the API version:

* 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations<azure.mgmt.eventhub.v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations>`
"""
api_version = self._get_api_version('subscription_diagnostic_settings')
if api_version == '2017-05-01-preview':
from .v2017_05_01_preview.operations import SubscriptionDiagnosticSettingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def tenant_activity_logs(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class MonitorClient(MultiApiClientMixin, _SDKClient):
'operations': '2015-04-01',
'scheduled_query_rules': '2018-04-16',
'service_diagnostic_settings': '2016-09-01',
'subscription_diagnostic_settings': '2017-05-01-preview',
'tenant_activity_logs': '2015-04-01',
'vm_insights': '2018-11-27-preview',
}},
Expand Down Expand Up @@ -126,6 +127,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-03-01: :mod:`v2019_03_01.models<azure.mgmt.eventhub.v2019_03_01.models>`
* 2019-06-01: :mod:`v2019_06_01.models<azure.mgmt.eventhub.v2019_06_01.models>`
* 2019-10-17-preview: :mod:`v2019_10_17.models<azure.mgmt.eventhub.v2019_10_17.models>`
* 2020-01-01-preview: :mod:`v2020_01_01_preview.models<azure.mgmt.eventhub.v2020_01_01_preview.models>`
"""
if api_version == '2015-04-01':
from ..v2015_04_01 import models
Expand Down Expand Up @@ -181,6 +183,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-10-17-preview':
from ..v2019_10_17 import models
return models
elif api_version == '2020-01-01-preview':
from ..v2020_01_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -380,6 +385,19 @@ def log_profiles(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def management_group_diagnostic_settings(self):
"""Instance depends on the API version:

* 2020-01-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations<azure.mgmt.eventhub.v2020_01_01_preview.aio.operations_async.ManagementGroupDiagnosticSettingsOperations>`
"""
api_version = self._get_api_version('management_group_diagnostic_settings')
if api_version == '2020-01-01-preview':
from ..v2020_01_01_preview.aio.operations_async import ManagementGroupDiagnosticSettingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_alerts(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -580,6 +598,19 @@ def service_diagnostic_settings(self):
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def subscription_diagnostic_settings(self):
"""Instance depends on the API version:

* 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations<azure.mgmt.eventhub.v2017_05_01_preview.aio.operations_async.SubscriptionDiagnosticSettingsOperations>`
"""
api_version = self._get_api_version('subscription_diagnostic_settings')
if api_version == '2017-05-01-preview':
from ..v2017_05_01_preview.aio.operations_async import SubscriptionDiagnosticSettingsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def tenant_activity_logs(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def list(
api_version = "2015-04-01"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -97,15 +101,11 @@ def prepare_request(next_link=None):
if select is not None:
query_parameters['$select'] = self._serialize.query("select", select, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def list_by_resource_group(
api_version = "2015-04-01"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
Expand All @@ -73,15 +77,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down Expand Up @@ -153,7 +153,6 @@ async def create_or_update(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'AutoscaleSettingResource')
body_content_kwargs['content'] = body_content
Expand All @@ -167,7 +166,6 @@ async def create_or_update(
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response)

Expand Down Expand Up @@ -218,7 +216,6 @@ async def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -272,7 +269,6 @@ async def get(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -335,7 +331,6 @@ async def update(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(autoscale_setting_resource, 'AutoscaleSettingResourcePatch')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -374,6 +369,10 @@ def list_by_subscription(
api_version = "2015-04-01"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list_by_subscription.metadata['url'] # type: ignore
Expand All @@ -385,15 +384,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ def list(
api_version = "2015-04-01"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ async def list(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def list(
api_version = "2015-04-01"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -98,15 +102,11 @@ def prepare_request(next_link=None):
if select is not None:
query_parameters['$select'] = self._serialize.query("select", select, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from ._models_py3 import ScaleAction
from ._models_py3 import ScaleCapacity
from ._models_py3 import ScaleRule
from ._models_py3 import ScaleRuleMetricDimension
from ._models_py3 import SenderAuthorization
from ._models_py3 import TimeWindow
from ._models_py3 import WebhookNotification
Expand All @@ -55,6 +56,7 @@
from ._models import ScaleAction # type: ignore
from ._models import ScaleCapacity # type: ignore
from ._models import ScaleRule # type: ignore
from ._models import ScaleRuleMetricDimension # type: ignore
from ._models import SenderAuthorization # type: ignore
from ._models import TimeWindow # type: ignore
from ._models import WebhookNotification # type: ignore
Expand All @@ -65,6 +67,7 @@
MetricStatisticType,
RecurrenceFrequency,
ScaleDirection,
ScaleRuleMetricDimensionOperationType,
ScaleType,
TimeAggregationType,
)
Expand Down Expand Up @@ -92,6 +95,7 @@
'ScaleAction',
'ScaleCapacity',
'ScaleRule',
'ScaleRuleMetricDimension',
'SenderAuthorization',
'TimeWindow',
'WebhookNotification',
Expand All @@ -100,6 +104,7 @@
'MetricStatisticType',
'RecurrenceFrequency',
'ScaleDirection',
'ScaleRuleMetricDimensionOperationType',
'ScaleType',
'TimeAggregationType',
]
Loading