Skip to content

Commit

Permalink
Update from release/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Jun 25, 2020
1 parent deb77e6 commit 517e72e
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 30 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 [Github repo](https://github.com/Azure/azure-sdk-for-python/)

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](https://pypi.python.org/pypi/azure) bundle package.

## 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 @@ -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 @@ -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 @@ -33,6 +33,7 @@
FlowType,
RequestSource,
PublicNetworkAccessType,
IngestionMode,
PurgeState,
)

Expand All @@ -50,5 +51,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 @@ -149,6 +149,12 @@ class ApplicationInsightsComponent(ComponentsResource):
'Disabled'. Default value: "Enabled" .
:type public_network_access_for_query: str or
~azure.mgmt.applicationinsights.v2020_02_02_preview.models.PublicNetworkAccessType
:param ingestion_mode: Indicates the flow of the ingestion. Possible
values include: 'ApplicationInsights',
'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default
value: "LogAnalytics" .
:type ingestion_mode: str or
~azure.mgmt.applicationinsights.v2020_02_02_preview.models.IngestionMode
"""

_validation = {
Expand Down Expand Up @@ -198,6 +204,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 @@ -223,6 +230,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', "LogAnalytics")


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

_validation = {
Expand Down Expand Up @@ -198,9 +204,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, workspace_resource_id: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, 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, workspace_resource_id: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, 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="LogAnalytics", **kwargs) -> None:
super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.application_id = None
Expand All @@ -223,6 +230,7 @@ def __init__(self, *, location: str, kind: str, workspace_resource_id: str, tags
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 CloudError(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ def __init__(self, **kwargs):


class ErrorResponse(Model):
"""Describe the format of an Error response.
"""Error response indicates Insights service is not able to process the
incoming request. The reason is provided in the error message.
:param code: Error code
:param code: Error code.
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ def __init__(self, *, linked_storage_account: str=None, **kwargs) -> None:


class ErrorResponse(Model):
"""Describe the format of an Error response.
"""Error response indicates Insights service is not able to process the
incoming request. The reason is provided in the error message.
:param code: Error code
:param code: Error code.
:type code: str
:param message: Error message indicating why the operation failed.
:type message: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
with open(os.path.join(package_folder_path, 'version.py')
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

Expand Down Expand Up @@ -64,10 +66,10 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: MIT License',
],
zip_safe=False,
Expand Down

0 comments on commit 517e72e

Please sign in to comment.