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
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,16 @@ class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
object<msrestazure.azure_active_directory>`
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param purge_id: In a purge status request, this is the Id of the
operation the status of which is returned.
:type purge_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, purge_id, base_url=None):
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if purge_id is None:
raise ValueError("Parameter 'purge_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

Expand All @@ -66,7 +61,6 @@ def __init__(

self.credentials = credentials
self.subscription_id = subscription_id
self.purge_id = purge_id


class ApplicationInsightsManagementClient(object):
Expand Down Expand Up @@ -111,16 +105,13 @@ class ApplicationInsightsManagementClient(object):
object<msrestazure.azure_active_directory>`
:param subscription_id: The Azure subscription ID.
:type subscription_id: str
:param purge_id: In a purge status request, this is the Id of the
operation the status of which is returned.
:type purge_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, purge_id, base_url=None):
self, credentials, subscription_id, base_url=None):

self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, purge_id, base_url)
self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def purge(
purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'}

def get_purge_status(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, resource_name, purge_id, custom_headers=None, raw=False, **operation_config):
"""Gets the status of a previously submitted purge using the id returned
from the original purge request.

Expand All @@ -523,6 +523,9 @@ def get_purge_status(
:param resource_name: The name of the Application Insights component
resource.
:type resource_name: str
:param purge_id: In a purge status request, this is the Id of the
operation the status of which is returned.
:type purge_id: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -540,7 +543,7 @@ def get_purge_status(
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'purgeId': self._serialize.url("self.config.purge_id", self.config.purge_id, 'str')
'purgeId': self._serialize.url("purge_id", purge_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

Expand Down