azure.mgmt.policyinsights.operations module¶
-
class
azure.mgmt.policyinsights.operations.
AttestationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’sattestations
attribute.-
begin_create_or_update_at_resource
(resource_id: str, attestation_name: str, parameters: _models.Attestation, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation][source]¶ -
begin_create_or_update_at_resource
(resource_id: str, attestation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation] Creates or updates an attestation at resource scope.
- Parameters
resource_id (str) – Resource ID. Required.
attestation_name (str) – The name of the attestation. Required.
parameters (Attestation or IO) – The attestation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either Attestation or the result of cls(response)
- Return type
- Raises
-
begin_create_or_update_at_resource_group
(resource_group_name: str, attestation_name: str, parameters: _models.Attestation, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation][source]¶ -
begin_create_or_update_at_resource_group
(resource_group_name: str, attestation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation] Creates or updates an attestation at resource group scope.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
attestation_name (str) – The name of the attestation. Required.
parameters (Attestation or IO) – The attestation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either Attestation or the result of cls(response)
- Return type
- Raises
-
begin_create_or_update_at_subscription
(attestation_name: str, parameters: _models.Attestation, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation][source]¶ -
begin_create_or_update_at_subscription
(attestation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → LROPoller[_models.Attestation] Creates or updates an attestation at subscription scope.
- Parameters
attestation_name (str) – The name of the attestation. Required.
parameters (Attestation or IO) – The attestation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either Attestation or the result of cls(response)
- Return type
- Raises
-
delete_at_resource
(resource_id: str, attestation_name: str, **kwargs: Any) → None[source]¶ Deletes an existing attestation at individual resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
delete_at_resource_group
(resource_group_name: str, attestation_name: str, **kwargs: Any) → None[source]¶ Deletes an existing attestation at resource group scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
delete_at_subscription
(attestation_name: str, **kwargs: Any) → None[source]¶ Deletes an existing attestation at subscription scope.
-
get_at_resource
(resource_id: str, attestation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Attestation[source]¶ Gets an existing attestation at resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Attestation or the result of cls(response)
- Return type
- Raises
-
get_at_resource_group
(resource_group_name: str, attestation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Attestation[source]¶ Gets an existing attestation at resource group scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Attestation or the result of cls(response)
- Return type
- Raises
-
get_at_subscription
(attestation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Attestation[source]¶ Gets an existing attestation at subscription scope.
-
list_for_resource
(resource_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Attestation][source]¶ Gets all attestations for a resource.
- Parameters
resource_id (str) – Resource ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Attestation or the result of cls(response)
- Return type
- Raises
-
list_for_resource_group
(resource_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Attestation][source]¶ Gets all attestations for the resource group.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Attestation or the result of cls(response)
- Return type
- Raises
-
list_for_subscription
(query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Attestation][source]¶ Gets all attestations for the subscription.
- Parameters
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Attestation or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
ComponentPolicyStatesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’scomponent_policy_states
attribute.-
list_query_results_for_policy_definition
(subscription_id: str, policy_definition_name: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states for the subscription level policy definition.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_definition_name (str) – Policy definition name. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource
(resource_id: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, expand: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states for the resource.
- Parameters
resource_id (str) – Resource ID. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
expand (str) – The $expand query parameter. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group
(subscription_id: str, resource_group_name: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states under resource group scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group_level_policy_assignment
(subscription_id: str, resource_group_name: str, policy_assignment_name: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states for the resource group level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
policy_assignment_name (str) – Policy assignment name. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription
(subscription_id: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states under subscription scope.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription_level_policy_assignment
(subscription_id: str, policy_assignment_name: str, component_policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.ComponentPolicyStatesResource], top: Optional[int] = None, order_by: Optional[str] = None, select: Optional[str] = None, from_parameter: Optional[datetime.datetime] = None, to: Optional[datetime.datetime] = None, filter: Optional[str] = None, apply: Optional[str] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.ComponentPolicyStatesQueryResults[source]¶ Queries component policy states for the subscription level policy assignment.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_assignment_name (str) – Policy assignment name. Required.
component_policy_states_resource (str or ComponentPolicyStatesResource) – The virtual resource under ComponentPolicyStates resource type. In a given time range, ‘latest’ represents the latest component policy state(s). “latest” Required.
top (int) – Maximum number of records to return. Default value is None.
order_by (str) – Ordering expression using OData notation. One or more comma-separated column names with an optional “desc” (the default) or “asc”, e.g. “$orderby=PolicyAssignmentId, ResourceId asc”. Default value is None.
select (str) – Select expression using OData notation. Limits the columns on each record to just those requested, e.g. “$select=PolicyAssignmentId, ResourceId”. Default value is None.
from_parameter (datetime) – ISO 8601 formatted timestamp specifying the start time of the interval to query. When not specified, the service uses ($to - 1-day). Default value is None.
to (datetime) – ISO 8601 formatted timestamp specifying the end time of the interval to query. When not specified, the service uses request time. Default value is None.
filter (str) – OData filter expression. Default value is None.
apply (str) – OData apply expression for aggregations. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ComponentPolicyStatesQueryResults or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
Operations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’soperations
attribute.-
list
(**kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.OperationsListResults[source]¶ Lists available operations.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
OperationsListResults or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
PolicyEventsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’spolicy_events
attribute.-
list_query_results_for_management_group
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], management_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the resources under the management group.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
management_group_name (str) – Management group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_policy_definition
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, policy_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the subscription level policy definition.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_definition_name (str) – Policy definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_policy_set_definition
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, policy_set_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the subscription level policy set definition.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_set_definition_name (str) – Policy set definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], resource_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the resource.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
resource_id (str) – Resource ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, resource_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the resources under the resource group.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group_level_policy_assignment
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, resource_group_name: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the resource group level policy assignment.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the resources under the subscription.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription_level_policy_assignment
(policy_events_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyEventsResourceType], subscription_id: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyEvent][source]¶ Queries policy events for the subscription level policy assignment.
- Parameters
policy_events_resource (str or PolicyEventsResourceType) – The name of the virtual resource under PolicyEvents resource type; only “default” is allowed. “default” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyEvent or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
PolicyMetadataOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’spolicy_metadata
attribute.-
get_resource
(resource_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.PolicyMetadata[source]¶ Get policy metadata resource.
-
list
(query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.SlimPolicyMetadata][source]¶ Get a list of the policy metadata resources.
- Parameters
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either SlimPolicyMetadata or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
PolicyRestrictionsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’spolicy_restrictions
attribute.-
check_at_management_group_scope
(management_group_id: str, parameters: _models.CheckManagementGroupRestrictionsRequest, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult[source]¶ -
check_at_management_group_scope
(management_group_id: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult Checks what restrictions Azure Policy will place on resources within a management group.
- Parameters
management_group_id (str) – Management group ID. Required.
parameters (CheckManagementGroupRestrictionsRequest or IO) – The check policy restrictions parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
CheckRestrictionsResult or the result of cls(response)
- Return type
- Raises
-
check_at_resource_group_scope
(resource_group_name: str, parameters: _models.CheckRestrictionsRequest, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult[source]¶ -
check_at_resource_group_scope
(resource_group_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult Checks what restrictions Azure Policy will place on a resource within a resource group. Use this when the resource group the resource will be created in is already known.
- Parameters
resource_group_name (str) – The name of the resource group. The name is case insensitive. Required.
parameters (CheckRestrictionsRequest or IO) – The check policy restrictions parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
CheckRestrictionsResult or the result of cls(response)
- Return type
- Raises
-
check_at_subscription_scope
(parameters: _models.CheckRestrictionsRequest, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult[source]¶ -
check_at_subscription_scope
(parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.CheckRestrictionsResult Checks what restrictions Azure Policy will place on a resource within a subscription.
- Parameters
parameters (CheckRestrictionsRequest or IO) – The check policy restrictions parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
CheckRestrictionsResult or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
PolicyStatesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’spolicy_states
attribute.-
begin_trigger_resource_group_evaluation
(subscription_id: str, resource_group_name: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[None][source]¶ Triggers a policy evaluation scan for all the resources under the resource group.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either None or the result of cls(response)
- Return type
- Raises
-
begin_trigger_subscription_evaluation
(subscription_id: str, **kwargs: Any) → azure.core.polling._poller.LROPoller[None][source]¶ Triggers a policy evaluation scan for all the resources under the subscription.
- Parameters
subscription_id (str) – Microsoft Azure subscription ID. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
continuation_token (str) – A continuation token to restart a poller from a saved state.
polling (bool or PollingMethod) – By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.
- Returns
An instance of LROPoller that returns either None or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_management_group
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], management_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
management_group_name (str) – Management group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_policy_definition
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, policy_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_definition_name (str) – Policy definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_policy_set_definition
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, policy_set_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_set_definition_name (str) – Policy set definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], resource_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
resource_id (str) – Resource ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, resource_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group_level_policy_assignment
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, resource_group_name: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription_level_policy_assignment
(policy_states_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesResource], subscription_id: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyState][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). Known values are: “default” and “latest”. Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyState or the result of cls(response)
- Return type
- Raises
-
summarize_for_management_group
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], management_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the resources under the management group.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
management_group_name (str) – Management group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_policy_definition
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, policy_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the subscription level policy definition.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_definition_name (str) – Policy definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_policy_set_definition
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, policy_set_definition_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the subscription level policy set definition.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_set_definition_name (str) – Policy set definition name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_resource
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], resource_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the resource.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
resource_id (str) – Resource ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_resource_group
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, resource_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the resources under the resource group.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_resource_group_level_policy_assignment
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, resource_group_name: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the resource group level policy assignment.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
resource_group_name (str) – Resource group name. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_subscription
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the resources under the subscription.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
summarize_for_subscription_level_policy_assignment
(policy_states_summary_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyStatesSummaryResourceType], subscription_id: str, policy_assignment_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.SummarizeResults[source]¶ Summarizes policy states for the subscription level policy assignment.
- Parameters
policy_states_summary_resource (str or PolicyStatesSummaryResourceType) – 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. “latest” Required.
subscription_id (str) – Microsoft Azure subscription ID. Required.
policy_assignment_name (str) – Policy assignment name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
authorization_namespace (str) – The namespace for Microsoft Authorization resource provider; only “Microsoft.Authorization” is allowed. Default value is “Microsoft.Authorization”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SummarizeResults or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
PolicyTrackedResourcesOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’spolicy_tracked_resources
attribute.-
list_query_results_for_management_group
(management_group_name: str, policy_tracked_resources_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyTrackedResourcesResourceType], query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyTrackedResource][source]¶ Queries policy tracked resources under the management group.
- Parameters
management_group_name (str) – Management group name. Required.
policy_tracked_resources_resource (str or PolicyTrackedResourcesResourceType) – The name of the virtual resource under PolicyTrackedResources resource type; only “default” is allowed. “default” Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyTrackedResource or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource
(resource_id: str, policy_tracked_resources_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyTrackedResourcesResourceType], query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyTrackedResource][source]¶ Queries policy tracked resources under the resource.
- Parameters
resource_id (str) – Resource ID. Required.
policy_tracked_resources_resource (str or PolicyTrackedResourcesResourceType) – The name of the virtual resource under PolicyTrackedResources resource type; only “default” is allowed. “default” Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyTrackedResource or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_resource_group
(resource_group_name: str, policy_tracked_resources_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyTrackedResourcesResourceType], query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyTrackedResource][source]¶ Queries policy tracked resources under the resource group.
- Parameters
resource_group_name (str) – Resource group name. Required.
policy_tracked_resources_resource (str or PolicyTrackedResourcesResourceType) – The name of the virtual resource under PolicyTrackedResources resource type; only “default” is allowed. “default” Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyTrackedResource or the result of cls(response)
- Return type
- Raises
-
list_query_results_for_subscription
(policy_tracked_resources_resource: Union[str, azure.mgmt.policyinsights.models._policy_insights_client_enums.PolicyTrackedResourcesResourceType], query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.PolicyTrackedResource][source]¶ Queries policy tracked resources under the subscription.
- Parameters
policy_tracked_resources_resource (str or PolicyTrackedResourcesResourceType) – The name of the virtual resource under PolicyTrackedResources resource type; only “default” is allowed. “default” Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either PolicyTrackedResource or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-
-
class
azure.mgmt.policyinsights.operations.
RemediationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
PolicyInsightsClient
’sremediations
attribute.-
cancel_at_management_group
(management_group_id: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Cancels a remediation at management group scope.
- Parameters
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
cancel_at_resource
(resource_id: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Cancel a remediation at resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
cancel_at_resource_group
(resource_group_name: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Cancels a remediation at resource group scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
cancel_at_subscription
(remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Cancels a remediation at subscription scope.
-
create_or_update_at_management_group
(management_group_id: str, remediation_name: str, parameters: _models.Remediation, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation[source]¶ -
create_or_update_at_management_group
(management_group_id: str, remediation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation Creates or updates a remediation at management group scope.
- Parameters
management_group_id (str) – Management group ID. Required.
remediation_name (str) – The name of the remediation. Required.
parameters (Remediation or IO) – The remediation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
create_or_update_at_resource
(resource_id: str, remediation_name: str, parameters: _models.Remediation, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation[source]¶ -
create_or_update_at_resource
(resource_id: str, remediation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation Creates or updates a remediation at resource scope.
- Parameters
resource_id (str) – Resource ID. Required.
remediation_name (str) – The name of the remediation. Required.
parameters (Remediation or IO) – The remediation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
create_or_update_at_resource_group
(resource_group_name: str, remediation_name: str, parameters: _models.Remediation, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation[source]¶ -
create_or_update_at_resource_group
(resource_group_name: str, remediation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation Creates or updates a remediation at resource group scope.
- Parameters
resource_group_name (str) – Resource group name. Required.
remediation_name (str) – The name of the remediation. Required.
parameters (Remediation or IO) – The remediation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
create_or_update_at_subscription
(remediation_name: str, parameters: _models.Remediation, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation[source]¶ -
create_or_update_at_subscription
(remediation_name: str, parameters: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.Remediation Creates or updates a remediation at subscription scope.
- Parameters
remediation_name (str) – The name of the remediation. Required.
parameters (Remediation or IO) – The remediation parameters. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
delete_at_management_group
(management_group_id: str, remediation_name: str, **kwargs: Any) → Optional[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Deletes an existing remediation at management group scope.
- Parameters
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or None or the result of cls(response)
- Return type
Remediation or None
- Raises
-
delete_at_resource
(resource_id: str, remediation_name: str, **kwargs: Any) → Optional[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Deletes an existing remediation at individual resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or None or the result of cls(response)
- Return type
Remediation or None
- Raises
-
delete_at_resource_group
(resource_group_name: str, remediation_name: str, **kwargs: Any) → Optional[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Deletes an existing remediation at resource group scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or None or the result of cls(response)
- Return type
Remediation or None
- Raises
-
delete_at_subscription
(remediation_name: str, **kwargs: Any) → Optional[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Deletes an existing remediation at subscription scope.
- Parameters
remediation_name (str) – The name of the remediation. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or None or the result of cls(response)
- Return type
Remediation or None
- Raises
-
get_at_management_group
(management_group_id: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Gets an existing remediation at management group scope.
- Parameters
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
get_at_resource
(resource_id: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Gets an existing remediation at resource scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
get_at_resource_group
(resource_group_name: str, remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Gets an existing remediation at resource group scope.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
Remediation or the result of cls(response)
- Return type
- Raises
-
get_at_subscription
(remediation_name: str, **kwargs: Any) → azure.mgmt.policyinsights.models._models_py3.Remediation[source]¶ Gets an existing remediation at subscription scope.
-
list_deployments_at_management_group
(management_group_id: str, remediation_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.RemediationDeployment][source]¶ Gets all deployments for a remediation at management group scope.
- Parameters
management_group_id (str) – Management group ID. Required.
remediation_name (str) – The name of the remediation. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RemediationDeployment or the result of cls(response)
- Return type
- Raises
-
list_deployments_at_resource
(resource_id: str, remediation_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.RemediationDeployment][source]¶ Gets all deployments for a remediation at resource scope.
- Parameters
resource_id (str) – Resource ID. Required.
remediation_name (str) – The name of the remediation. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RemediationDeployment or the result of cls(response)
- Return type
- Raises
-
list_deployments_at_resource_group
(resource_group_name: str, remediation_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.RemediationDeployment][source]¶ Gets all deployments for a remediation at resource group scope.
- Parameters
resource_group_name (str) – Resource group name. Required.
remediation_name (str) – The name of the remediation. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RemediationDeployment or the result of cls(response)
- Return type
- Raises
-
list_deployments_at_subscription
(remediation_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.RemediationDeployment][source]¶ Gets all deployments for a remediation at subscription scope.
- Parameters
remediation_name (str) – The name of the remediation. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either RemediationDeployment or the result of cls(response)
- Return type
- Raises
-
list_for_management_group
(management_group_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Gets all remediations for the management group.
- Parameters
management_group_id (str) – Management group ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
management_groups_namespace (str) – The namespace for Microsoft Management RP; only “Microsoft.Management” is allowed. Default value is “Microsoft.Management”. Note that overriding this default value may result in unsupported behavior.
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Remediation or the result of cls(response)
- Return type
- Raises
-
list_for_resource
(resource_id: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Gets all remediations for a resource.
- Parameters
resource_id (str) – Resource ID. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Remediation or the result of cls(response)
- Return type
- Raises
-
list_for_resource_group
(resource_group_name: str, query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Gets all remediations for the subscription.
- Parameters
resource_group_name (str) – Resource group name. Required.
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Remediation or the result of cls(response)
- Return type
- Raises
-
list_for_subscription
(query_options: Optional[azure.mgmt.policyinsights.models._models_py3.QueryOptions] = None, **kwargs: Any) → Iterable[azure.mgmt.policyinsights.models._models_py3.Remediation][source]¶ Gets all remediations for the subscription.
- Parameters
query_options (QueryOptions) – Parameter group. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either Remediation or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.policyinsights.models' from '/mnt/vss/_work/1/s/sdk/policyinsights/azure-mgmt-policyinsights/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/policyinsights/models/__init__.py'>¶
-