azure.mgmt.policyinsights.operations module¶
-
class
azure.mgmt.policyinsights.operations.
PolicyTrackedResourcesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
PolicyTrackedResourcesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
management_groups_namespace – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Constant value: “Microsoft.Management”.
policy_tracked_resources_resource – The name of the virtual resource under PolicyTrackedResources resource type; only “default” is allowed. Constant value: “default”.
api_version – Client Api Version. Constant value: “2018-07-01-preview”.
-
list_query_results_for_management_group
(management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy tracked resources under the management group.
- Parameters
management_group_name (str) – Management group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of PolicyTrackedResource
- Return type
- Raises
-
list_query_results_for_resource
(resource_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy tracked resources under the resource.
- Parameters
resource_id (str) – Resource ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of PolicyTrackedResource
- Return type
- Raises
-
list_query_results_for_resource_group
(resource_group_name, subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy tracked resources under the resource group.
- Parameters
resource_group_name (str) – Resource group name.
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of PolicyTrackedResource
- Return type
- Raises
-
list_query_results_for_subscription
(subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy tracked resources under the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of PolicyTrackedResource
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
class
azure.mgmt.policyinsights.operations.
RemediationsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
RemediationsOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
management_groups_namespace – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Constant value: “Microsoft.Management”.
api_version – Client Api Version. Constant value: “2019-07-01”.
-
cancel_at_management_group
(management_group_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Cancels a remediation at management group scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
cancel_at_resource
(resource_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Cancel a remediation at resource scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
cancel_at_resource_group
(subscription_id, resource_group_name, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Cancels a remediation at resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
cancel_at_subscription
(subscription_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Cancels a remediation at subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
create_or_update_at_management_group
(management_group_id, remediation_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Creates or updates a remediation at management group scope.
- Parameters
management_group_id (str) – Management group ID.
remediation_name (str) – The name of the remediation.
parameters (Remediation) – The remediation parameters.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
create_or_update_at_resource
(resource_id, remediation_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Creates or updates a remediation at resource scope.
- Parameters
resource_id (str) – Resource ID.
remediation_name (str) – The name of the remediation.
parameters (Remediation) – The remediation parameters.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
create_or_update_at_resource_group
(subscription_id, resource_group_name, remediation_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Creates or updates a remediation at resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
remediation_name (str) – The name of the remediation.
parameters (Remediation) – The remediation parameters.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
create_or_update_at_subscription
(subscription_id, remediation_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Creates or updates a remediation at subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
remediation_name (str) – The name of the remediation.
parameters (Remediation) – The remediation parameters.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
delete_at_management_group
(management_group_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes an existing remediation at management group scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
delete_at_resource
(resource_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes an existing remediation at individual resource scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
delete_at_resource_group
(subscription_id, resource_group_name, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes an existing remediation at resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
delete_at_subscription
(subscription_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes an existing remediation at subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
get_at_management_group
(management_group_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets an existing remediation at management group scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
get_at_resource
(resource_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets an existing remediation at resource scope.
- Parameters
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
get_at_resource_group
(subscription_id, resource_group_name, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets an existing remediation at resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
get_at_subscription
(subscription_id, remediation_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets an existing remediation at subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
remediation_name (str) – The name of the remediation.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Remediation or ClientRawResponse if raw=true
- Return type
Remediation or ClientRawResponse
- Raises
-
list_deployments_at_management_group
(management_group_id, remediation_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all deployments for a remediation at management group scope.
- Parameters
management_group_id (str) – Management group ID.
remediation_name (str) – The name of the remediation.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of RemediationDeployment
- Return type
- Raises
-
list_deployments_at_resource
(resource_id, remediation_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all deployments for a remediation at resource scope.
- Parameters
resource_id (str) – Resource ID.
remediation_name (str) – The name of the remediation.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of RemediationDeployment
- Return type
- Raises
-
list_deployments_at_resource_group
(subscription_id, resource_group_name, remediation_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all deployments for a remediation at resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
remediation_name (str) – The name of the remediation.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of RemediationDeployment
- Return type
- Raises
-
list_deployments_at_subscription
(subscription_id, remediation_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all deployments for a remediation at subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
remediation_name (str) – The name of the remediation.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of RemediationDeployment
- Return type
- Raises
-
list_for_management_group
(management_group_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all remediations for the management group.
- Parameters
management_group_id (str) – Management group ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of Remediation
- Return type
- Raises
-
list_for_resource
(resource_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all remediations for a resource.
- Parameters
resource_id (str) – Resource ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of Remediation
- Return type
- Raises
-
list_for_resource_group
(subscription_id, resource_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all remediations for the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of Remediation
- Return type
- Raises
-
list_for_subscription
(subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets all remediations for the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of Remediation
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
class
azure.mgmt.policyinsights.operations.
PolicyEventsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
PolicyEventsOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
policy_events_resource – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. Constant value: “default”.
management_groups_namespace – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Constant value: “Microsoft.Management”.
api_version – API version to use with the client requests. Constant value: “2018-04-04”.
authorization_namespace – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Constant value: “Microsoft.Authorization”.
-
get_metadata
(scope, custom_headers=None, raw=False, **operation_config)[source]¶ Gets OData metadata XML document.
- Parameters
scope (str) – A valid scope, i.e. management group, subscription, resource group, or resource ID. Scope used has no effect on metadata returned.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
str or ClientRawResponse if raw=true
- Return type
str or ClientRawResponse
- Raises
-
list_query_results_for_management_group
(management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the resources under the management group.
- Parameters
management_group_name (str) – Management group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_policy_definition
(subscription_id, policy_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the subscription level policy definition.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_definition_name (str) – Policy definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_policy_set_definition
(subscription_id, policy_set_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the subscription level policy set definition.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_set_definition_name (str) – Policy set definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource
(resource_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the resource.
- Parameters
resource_id (str) – Resource ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource_group
(subscription_id, resource_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the resources under the resource group.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource_group_level_policy_assignment
(subscription_id, resource_group_name, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the resource group level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_subscription
(subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the resources under the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_subscription_level_policy_assignment
(subscription_id, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy events for the subscription level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyEventsQueryResults or ClientRawResponse if raw=true
- Return type
PolicyEventsQueryResults or ClientRawResponse
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
class
azure.mgmt.policyinsights.operations.
PolicyStatesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
PolicyStatesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
management_groups_namespace – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Constant value: “Microsoft.Management”.
api_version – Client Api Version. Constant value: “2019-10-01”.
policy_states_summary_resource – The virtual resource under PolicyStates resource type for summarize action. In a given time range, ‘latest’ represents the latest policy state(s) and is the only allowed value. Constant value: “latest”.
authorization_namespace – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Constant value: “Microsoft.Authorization”.
-
list_query_results_for_management_group
(policy_states_resource, management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the resources under the management group.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
management_group_name (str) – Management group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_policy_definition
(policy_states_resource, subscription_id, policy_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the subscription level policy definition.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
policy_definition_name (str) – Policy definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_policy_set_definition
(policy_states_resource, subscription_id, policy_set_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the subscription level policy set definition.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
policy_set_definition_name (str) – Policy set definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource
(policy_states_resource, resource_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the resource.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
resource_id (str) – Resource ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource_group
(policy_states_resource, subscription_id, resource_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the resources under the resource group.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_resource_group_level_policy_assignment
(policy_states_resource, subscription_id, resource_group_name, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the resource group level policy assignment.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_subscription
(policy_states_resource, subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the resources under the subscription.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
list_query_results_for_subscription_level_policy_assignment
(policy_states_resource, subscription_id, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Queries policy states for the subscription level policy assignment.
- Parameters
policy_states_resource (str or PolicyStatesResource) – The virtual resource under PolicyStates resource type. In a given time range, ‘latest’ represents the latest policy state(s), whereas ‘default’ represents all policy state(s). Possible values include: ‘default’, ‘latest’
subscription_id (str) – Microsoft Azure subscription ID.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
PolicyStatesQueryResults or ClientRawResponse if raw=true
- Return type
PolicyStatesQueryResults or ClientRawResponse
- Raises
-
summarize_for_management_group
(management_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the resources under the management group.
- Parameters
management_group_name (str) – Management group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_policy_definition
(subscription_id, policy_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the subscription level policy definition.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_definition_name (str) – Policy definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_policy_set_definition
(subscription_id, policy_set_definition_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the subscription level policy set definition.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_set_definition_name (str) – Policy set definition name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_resource
(resource_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the resource.
- Parameters
resource_id (str) – Resource ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_resource_group
(subscription_id, resource_group_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the resources under the resource group.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_resource_group_level_policy_assignment
(subscription_id, resource_group_name, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the resource group level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_subscription
(subscription_id, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the resources under the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
summarize_for_subscription_level_policy_assignment
(subscription_id, policy_assignment_name, query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Summarizes policy states for the subscription level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
policy_assignment_name (str) – Policy assignment name.
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
SummarizeResults or ClientRawResponse if raw=true
- Return type
SummarizeResults or ClientRawResponse
- Raises
-
trigger_resource_group_evaluation
(subscription_id, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Triggers a policy evaluation scan for all the resources under the resource group.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
resource_group_name (str) – Resource group name.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
-
trigger_subscription_evaluation
(subscription_id, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Triggers a policy evaluation scan for all the resources under the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID.
custom_headers (dict) – headers that will be added to the request
raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
- Returns
An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
- Return type
AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
class
azure.mgmt.policyinsights.operations.
Operations
(client, config, serializer, deserializer)[source]¶ Bases:
object
Operations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
api_version – Client Api Version. Constant value: “2019-10-01”.
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists available operations.
- Parameters
- Returns
OperationsListResults or ClientRawResponse if raw=true
- Return type
OperationsListResults or ClientRawResponse
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
class
azure.mgmt.policyinsights.operations.
PolicyMetadataOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
PolicyMetadataOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
- Variables
api_version – Client Api Version. Constant value: “2019-10-01”.
-
get_resource
(resource_name, custom_headers=None, raw=False, **operation_config)[source]¶ Get policy metadata resource.
- Parameters
- Returns
PolicyMetadata or ClientRawResponse if raw=true
- Return type
PolicyMetadata or ClientRawResponse
- Raises
-
list
(query_options=None, custom_headers=None, raw=False, **operation_config)[source]¶ Get a list of the policy metadata resources.
- Parameters
query_options (QueryOptions) – Additional parameters for the operation
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
An iterator like instance of SlimPolicyMetadata
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/home/vsts/work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶