Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR policyinsights/resource-manager] [Hub Generated] Review request for Microsoft.PolicyInsights to add version 2018-07-01-preview #4286

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions azure-mgmt-policyinsights/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .policy_event_py3 import PolicyEvent
from .policy_events_query_results_py3 import PolicyEventsQueryResults
from .expression_evaluation_details_py3 import ExpressionEvaluationDetails
from .if_not_exists_evaluation_details_py3 import IfNotExistsEvaluationDetails
from .policy_evaluation_details_py3 import PolicyEvaluationDetails
from .policy_state_py3 import PolicyState
from .policy_states_query_results_py3 import PolicyStatesQueryResults
from .summary_results_py3 import SummaryResults
Expand All @@ -50,6 +53,9 @@
from .error_response import ErrorResponse, ErrorResponseException
from .policy_event import PolicyEvent
from .policy_events_query_results import PolicyEventsQueryResults
from .expression_evaluation_details import ExpressionEvaluationDetails
from .if_not_exists_evaluation_details import IfNotExistsEvaluationDetails
from .policy_evaluation_details import PolicyEvaluationDetails
from .policy_state import PolicyState
from .policy_states_query_results import PolicyStatesQueryResults
from .summary_results import SummaryResults
Expand Down Expand Up @@ -83,6 +89,9 @@
'ErrorResponse', 'ErrorResponseException',
'PolicyEvent',
'PolicyEventsQueryResults',
'ExpressionEvaluationDetails',
'IfNotExistsEvaluationDetails',
'PolicyEvaluationDetails',
'PolicyState',
'PolicyStatesQueryResults',
'SummaryResults',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ExpressionEvaluationDetails(Model):
"""Evaluation details of policy language expressions.

:param result: Evaluation result.
:type result: str
:param expression: Expression evaluated.
:type expression: str
:param path: Property path if the expression is a field or an aliase.
:type path: str
:param expression_value: Value of the expression.
:type expression_value: str
:param target_value: Target value to be compared with the expression
value.
:type target_value: str
:param operator: Operator to compare the expression value and the target
value.
:type operator: str
"""

_attribute_map = {
'result': {'key': 'result', 'type': 'str'},
'expression': {'key': 'expression', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'},
'expression_value': {'key': 'expressionValue', 'type': 'str'},
'target_value': {'key': 'targetValue', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ExpressionEvaluationDetails, self).__init__(**kwargs)
self.result = kwargs.get('result', None)
self.expression = kwargs.get('expression', None)
self.path = kwargs.get('path', None)
self.expression_value = kwargs.get('expression_value', None)
self.target_value = kwargs.get('target_value', None)
self.operator = kwargs.get('operator', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ExpressionEvaluationDetails(Model):
"""Evaluation details of policy language expressions.

:param result: Evaluation result.
:type result: str
:param expression: Expression evaluated.
:type expression: str
:param path: Property path if the expression is a field or an aliase.
:type path: str
:param expression_value: Value of the expression.
:type expression_value: str
:param target_value: Target value to be compared with the expression
value.
:type target_value: str
:param operator: Operator to compare the expression value and the target
value.
:type operator: str
"""

_attribute_map = {
'result': {'key': 'result', 'type': 'str'},
'expression': {'key': 'expression', 'type': 'str'},
'path': {'key': 'path', 'type': 'str'},
'expression_value': {'key': 'expressionValue', 'type': 'str'},
'target_value': {'key': 'targetValue', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
}

def __init__(self, *, result: str=None, expression: str=None, path: str=None, expression_value: str=None, target_value: str=None, operator: str=None, **kwargs) -> None:
super(ExpressionEvaluationDetails, self).__init__(**kwargs)
self.result = result
self.expression = expression
self.path = path
self.expression_value = expression_value
self.target_value = target_value
self.operator = operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class IfNotExistsEvaluationDetails(Model):
"""Evaluation details of IfNotExists effect.

:param resource_id: ID of the last evaluated resource for IfNotExists
effect.
:type resource_id: str
:param total_resources: Total number of resources to which the existence
condition is applicable.
:type total_resources: int
"""

_attribute_map = {
'resource_id': {'key': 'resourceId', 'type': 'str'},
'total_resources': {'key': 'totalResources', 'type': 'int'},
}

def __init__(self, **kwargs):
super(IfNotExistsEvaluationDetails, self).__init__(**kwargs)
self.resource_id = kwargs.get('resource_id', None)
self.total_resources = kwargs.get('total_resources', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class IfNotExistsEvaluationDetails(Model):
"""Evaluation details of IfNotExists effect.

:param resource_id: ID of the last evaluated resource for IfNotExists
effect.
:type resource_id: str
:param total_resources: Total number of resources to which the existence
condition is applicable.
:type total_resources: int
"""

_attribute_map = {
'resource_id': {'key': 'resourceId', 'type': 'str'},
'total_resources': {'key': 'totalResources', 'type': 'int'},
}

def __init__(self, *, resource_id: str=None, total_resources: int=None, **kwargs) -> None:
super(IfNotExistsEvaluationDetails, self).__init__(**kwargs)
self.resource_id = resource_id
self.total_resources = total_resources
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PolicyEvaluationDetails(Model):
"""Policy evaluation details.

:param evaluated_expressions: Details of the evaluated expressions.
:type evaluated_expressions:
list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails]
:param if_not_exists_details: Evaluation details of IfNotExists effect.
:type if_not_exists_details:
~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails
"""

_attribute_map = {
'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'},
'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'},
}

def __init__(self, **kwargs):
super(PolicyEvaluationDetails, self).__init__(**kwargs)
self.evaluated_expressions = kwargs.get('evaluated_expressions', None)
self.if_not_exists_details = kwargs.get('if_not_exists_details', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PolicyEvaluationDetails(Model):
"""Policy evaluation details.

:param evaluated_expressions: Details of the evaluated expressions.
:type evaluated_expressions:
list[~azure.mgmt.policyinsights.models.ExpressionEvaluationDetails]
:param if_not_exists_details: Evaluation details of IfNotExists effect.
:type if_not_exists_details:
~azure.mgmt.policyinsights.models.IfNotExistsEvaluationDetails
"""

_attribute_map = {
'evaluated_expressions': {'key': 'evaluatedExpressions', 'type': '[ExpressionEvaluationDetails]'},
'if_not_exists_details': {'key': 'ifNotExistsDetails', 'type': 'IfNotExistsEvaluationDetails'},
}

def __init__(self, *, evaluated_expressions=None, if_not_exists_details=None, **kwargs) -> None:
super(PolicyEvaluationDetails, self).__init__(**kwargs)
self.evaluated_expressions = evaluated_expressions
self.if_not_exists_details = if_not_exists_details
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ class PolicyState(Model):
definition inside the policy set, if the policy assignment is for a policy
set.
:type policy_definition_reference_id: str
:param compliance_state: Compliance state of the resource.
:type compliance_state: str
:param policy_evaluation_details: Policy evaluation details.
:type policy_evaluation_details:
~azure.mgmt.policyinsights.models.PolicyEvaluationDetails
"""

_attribute_map = {
Expand Down Expand Up @@ -116,6 +121,8 @@ class PolicyState(Model):
'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'},
'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'},
'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'},
'compliance_state': {'key': 'complianceState', 'type': 'str'},
'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -148,3 +155,5 @@ def __init__(self, **kwargs):
self.policy_set_definition_parameters = kwargs.get('policy_set_definition_parameters', None)
self.management_group_ids = kwargs.get('management_group_ids', None)
self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None)
self.compliance_state = kwargs.get('compliance_state', None)
self.policy_evaluation_details = kwargs.get('policy_evaluation_details', None)
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ class PolicyState(Model):
definition inside the policy set, if the policy assignment is for a policy
set.
:type policy_definition_reference_id: str
:param compliance_state: Compliance state of the resource.
:type compliance_state: str
:param policy_evaluation_details: Policy evaluation details.
:type policy_evaluation_details:
~azure.mgmt.policyinsights.models.PolicyEvaluationDetails
"""

_attribute_map = {
Expand Down Expand Up @@ -116,9 +121,11 @@ class PolicyState(Model):
'policy_set_definition_parameters': {'key': 'policySetDefinitionParameters', 'type': 'str'},
'management_group_ids': {'key': 'managementGroupIds', 'type': 'str'},
'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'},
'compliance_state': {'key': 'complianceState', 'type': 'str'},
'policy_evaluation_details': {'key': 'policyEvaluationDetails', 'type': 'PolicyEvaluationDetails'},
}

def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, **kwargs) -> None:
def __init__(self, *, additional_properties=None, odataid: str=None, odatacontext: str=None, timestamp=None, resource_id: str=None, policy_assignment_id: str=None, policy_definition_id: str=None, effective_parameters: str=None, is_compliant: bool=None, subscription_id: str=None, resource_type: str=None, resource_location: str=None, resource_group: str=None, resource_tags: str=None, policy_assignment_name: str=None, policy_assignment_owner: str=None, policy_assignment_parameters: str=None, policy_assignment_scope: str=None, policy_definition_name: str=None, policy_definition_action: str=None, policy_definition_category: str=None, policy_set_definition_id: str=None, policy_set_definition_name: str=None, policy_set_definition_owner: str=None, policy_set_definition_category: str=None, policy_set_definition_parameters: str=None, management_group_ids: str=None, policy_definition_reference_id: str=None, compliance_state: str=None, policy_evaluation_details=None, **kwargs) -> None:
super(PolicyState, self).__init__(**kwargs)
self.additional_properties = additional_properties
self.odataid = odataid
Expand Down Expand Up @@ -148,3 +155,5 @@ def __init__(self, *, additional_properties=None, odataid: str=None, odatacontex
self.policy_set_definition_parameters = policy_set_definition_parameters
self.management_group_ids = management_group_ids
self.policy_definition_reference_id = policy_definition_reference_id
self.compliance_state = compliance_state
self.policy_evaluation_details = policy_evaluation_details
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class QueryOptions(Model):
:type to: datetime
:param apply: OData apply expression for aggregations.
:type apply: str
:param expand: The $expand query parameter. For example, to expand
policyEvaluationDetails, use $expand=policyEvaluationDetails
:type expand: str
"""

_attribute_map = {
Expand All @@ -46,6 +49,7 @@ class QueryOptions(Model):
'from_property': {'key': '', 'type': 'iso-8601'},
'to': {'key': '', 'type': 'iso-8601'},
'apply': {'key': '', 'type': 'str'},
'expand': {'key': '', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -57,3 +61,4 @@ def __init__(self, **kwargs):
self.from_property = kwargs.get('from_property', None)
self.to = kwargs.get('to', None)
self.apply = kwargs.get('apply', None)
self.expand = kwargs.get('expand', None)
Loading