Skip to content

Commit

Permalink
Generated from b25259deeeab2bf814df2753de03407b9319b1fe
Browse files Browse the repository at this point in the history
fix operation schema
  • Loading branch information
SDK Automation committed Aug 18, 2020
1 parent 486db4c commit 351b141
Show file tree
Hide file tree
Showing 30 changed files with 952 additions and 144 deletions.
33 changes: 12 additions & 21 deletions sdk/applicationinsights/azure-mgmt-applicationinsights/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure Application Insights Management Client
Library.
This is the Microsoft Azure Application Insights Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

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.
# Usage

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.
For code examples, see [Application Insights Management](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.

For a more complete set of Azure libraries, see the
[azure sdk python release](https://aka.ms/azsdk/python/all).

## Usage
# Provide Feedback

For code examples, see [Application Insights
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)
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-applicationinsights%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-applicationinsights%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, SDKClient):
'ea_subscription_rollback_to_legacy_pricing_model': '2017-10-01',
'export_configurations': '2015-05-01',
'favorites': '2015-05-01',
'operations': '2015-05-01',
'operations': '2019-09-01-preview',
'proactive_detection_configurations': '2018-05-01-preview',
'queries': '2019-09-01-preview',
'query_packs': '2019-09-01-preview',
Expand Down Expand Up @@ -336,10 +336,13 @@ def operations(self):
"""Instance depends on the API version:
* 2015-05-01: :class:`Operations<azure.mgmt.applicationinsights.v2015_05_01.operations.Operations>`
* 2019-09-01-preview: :class:`Operations<azure.mgmt.applicationinsights.v2019_09_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2015-05-01':
from .v2015_05_01.operations import Operations as OperationClass
elif api_version == '2019-09-01-preview':
from .v2019_09_01_preview.operations import Operations 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)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
ApplicationType,
FlowType,
RequestSource,
IngestionMode,
PurgeState,
FavoriteType,
WebTestKind,
Expand Down Expand Up @@ -176,6 +177,7 @@
'ApplicationType',
'FlowType',
'RequestSource',
'IngestionMode',
'PurgeState',
'FavoriteType',
'WebTestKind',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class RequestSource(str, Enum):
rest = "rest"


class IngestionMode(str, Enum):

application_insights = "ApplicationInsights"
application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings"
log_analytics = "LogAnalytics"


class PurgeState(str, Enum):

pending = "pending"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ class ApplicationInsightsComponent(ComponentsResource):
resources.
:vartype private_link_scoped_resources:
list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource]
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "ApplicationInsights" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2015_05_01.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -280,6 +286,7 @@ class ApplicationInsightsComponent(ComponentsResource):
'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -302,6 +309,7 @@ def __init__(self, **kwargs):
self.disable_ip_masking = kwargs.get('disable_ip_masking', None)
self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None)
self.private_link_scoped_resources = None
self.ingestion_mode = kwargs.get('ingestion_mode', "ApplicationInsights")


class ApplicationInsightsComponentAnalyticsItem(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ class ApplicationInsightsComponent(ComponentsResource):
resources.
:vartype private_link_scoped_resources:
list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource]
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "ApplicationInsights" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2015_05_01.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -280,9 +286,10 @@ class ApplicationInsightsComponent(ComponentsResource):
'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'},
}

def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, **kwargs) -> None:
def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, ingestion_mode="ApplicationInsights", **kwargs) -> None:
super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.application_id = None
Expand All @@ -302,6 +309,7 @@ def __init__(self, *, location: str, kind: str, tags=None, application_type="web
self.disable_ip_masking = disable_ip_masking
self.immediate_purge_data_on30_days = immediate_purge_data_on30_days
self.private_link_scoped_resources = None
self.ingestion_mode = ingestion_mode


class ApplicationInsightsComponentAnalyticsItem(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def internal_paging(next_link=None):
deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict)

return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'}
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks'}

def get(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -183,7 +183,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def delete(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -237,7 +237,7 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def create_or_update(
self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -309,7 +309,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def update(
self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -379,4 +379,4 @@ def update(
return client_raw_response

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
FlowType,
RequestSource,
PublicNetworkAccessType,
IngestionMode,
PurgeState,
)

Expand All @@ -56,5 +57,6 @@
'FlowType',
'RequestSource',
'PublicNetworkAccessType',
'IngestionMode',
'PurgeState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class PublicNetworkAccessType(str, Enum):
disabled = "Disabled" #: Disables public connectivity to Application Insights through public DNS.


class IngestionMode(str, Enum):

application_insights = "ApplicationInsights"
application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings"
log_analytics = "LogAnalytics"


class PurgeState(str, Enum):

pending = "pending"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ class ApplicationInsightsComponent(ComponentsResource):
'Disabled'. Default value: "Enabled" .
:type public_network_access_for_query: str or
~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "ApplicationInsights" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2018_05_01_preview.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -192,6 +198,7 @@ class ApplicationInsightsComponent(ComponentsResource):
'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'},
'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'},
'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -216,6 +223,7 @@ def __init__(self, **kwargs):
self.private_link_scoped_resources = None
self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled")
self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled")
self.ingestion_mode = kwargs.get('ingestion_mode', "ApplicationInsights")


class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ class ApplicationInsightsComponent(ComponentsResource):
'Disabled'. Default value: "Enabled" .
:type public_network_access_for_query: str or
~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "ApplicationInsights" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2018_05_01_preview.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -192,9 +198,10 @@ class ApplicationInsightsComponent(ComponentsResource):
'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'},
'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'},
'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'},
}

def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", **kwargs) -> None:
def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", ingestion_mode="ApplicationInsights", **kwargs) -> None:
super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.application_id = None
Expand All @@ -216,6 +223,7 @@ def __init__(self, *, location: str, kind: str, tags=None, application_type="web
self.private_link_scoped_resources = None
self.public_network_access_for_ingestion = public_network_access_for_ingestion
self.public_network_access_for_query = public_network_access_for_query
self.ingestion_mode = ingestion_mode


class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def internal_paging(next_link=None):
deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict)

return deserialized
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'}
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks'}

def get(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -188,7 +188,7 @@ def get(
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def delete(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -242,7 +242,7 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def create_or_update(
self, resource_group_name, resource_name, source_id, workbook_properties, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -319,7 +319,7 @@ def create_or_update(
return client_raw_response

return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}

def update(
self, resource_group_name, resource_name, source_id, workbook_update_parameters=None, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -397,4 +397,4 @@ def update(
return client_raw_response

return deserialized
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from ._configuration import ApplicationInsightsManagementClientConfiguration
from .operations import QueriesOperations
from .operations import Operations
from .operations import QueryPacksOperations
from . import models

Expand All @@ -26,6 +27,8 @@ class ApplicationInsightsManagementClient(SDKClient):
:ivar queries: Queries operations
:vartype queries: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueriesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.Operations
:ivar query_packs: QueryPacks operations
:vartype query_packs: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueryPacksOperations
Expand All @@ -50,5 +53,7 @@ def __init__(

self.queries = QueriesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.query_packs = QueryPacksOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading

0 comments on commit 351b141

Please sign in to comment.