Skip to content

Commit

Permalink
[AutoPR] policyinsights/resource-manager (#3309)
Browse files Browse the repository at this point in the history
* Generated from c18c74ca2ae03cde8f1b57205dad83034c88401a (#3279)

Add swagger spec for new resource type in Microsoft.PolicyInsights

This commit adds a spec of a new preview resource type for the Microsoft.PolicyInsights- PolicyTrackedResources.
The new resource type is only avaliable in the 2018-07-01-preview API version.
The API itself is already deployed and passed an initial review by the ARM team.

* Packaging update of azure-mgmt-policyinsights

* Generated from 6982f4f1b938e9394399bd208181829c8302c880 (#3399)

Add cancel action to remediations API and fix QueryFailure ref

* Packaging update of azure-mgmt-policyinsights

* [AutoPR policyinsights/resource-manager] typo: policyinsights/resource-manager/Microsoft.PolicyInsights/policyEvents (#3854)

* Generated from 7a3358c7c4089d8ac5ae06951feef0f6fd321d34

typo: policyinsights/resource-manager/Microsoft.PolicyInsights/policyEvents

- seperated -> separated

* Packaging update of azure-mgmt-policyinsights

* Generated from 51fa2f481853859216756d799269111752dbc919 (#3963)

typo: policyinsights/resource-manager/Microsoft.PolicyInsights

- paramters -> parameters
- deplyoments -> deployments

* Packaging update of azure-mgmt-policyinsights

* 0.2.0
  • Loading branch information
AutorestCI authored and lmazuel committed Jan 2, 2019
1 parent 6089d22 commit 92d90e2
Show file tree
Hide file tree
Showing 42 changed files with 3,362 additions and 115 deletions.
8 changes: 8 additions & 0 deletions azure-mgmt-policyinsights/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

0.2.0 (2019-01-02)
++++++++++++++++++

**Features**

- Added operation group RemediationsOperations
- Added operation group PolicyTrackedResourcesOperations

0.1.0 (2018-05-04)
++++++++++++++++++

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-policyinsights/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@
# --------------------------------------------------------------------------

try:
from .policy_event_py3 import PolicyEvent
from .policy_events_query_results_py3 import PolicyEventsQueryResults
from .policy_details_py3 import PolicyDetails
from .tracked_resource_modification_details_py3 import TrackedResourceModificationDetails
from .policy_tracked_resource_py3 import PolicyTrackedResource
from .query_failure_error_py3 import QueryFailureError
from .query_failure_py3 import QueryFailure, QueryFailureException
from .remediation_filters_py3 import RemediationFilters
from .remediation_deployment_summary_py3 import RemediationDeploymentSummary
from .remediation_py3 import Remediation
from .typed_error_info_py3 import TypedErrorInfo
from .error_definition_py3 import ErrorDefinition
from .remediation_deployment_py3 import RemediationDeployment
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .policy_event_py3 import PolicyEvent
from .policy_events_query_results_py3 import PolicyEventsQueryResults
from .policy_state_py3 import PolicyState
from .policy_states_query_results_py3 import PolicyStatesQueryResults
from .summary_results_py3 import SummaryResults
Expand All @@ -26,10 +36,20 @@
from .operations_list_results_py3 import OperationsListResults
from .query_options_py3 import QueryOptions
except (SyntaxError, ImportError):
from .policy_event import PolicyEvent
from .policy_events_query_results import PolicyEventsQueryResults
from .policy_details import PolicyDetails
from .tracked_resource_modification_details import TrackedResourceModificationDetails
from .policy_tracked_resource import PolicyTrackedResource
from .query_failure_error import QueryFailureError
from .query_failure import QueryFailure, QueryFailureException
from .remediation_filters import RemediationFilters
from .remediation_deployment_summary import RemediationDeploymentSummary
from .remediation import Remediation
from .typed_error_info import TypedErrorInfo
from .error_definition import ErrorDefinition
from .remediation_deployment import RemediationDeployment
from .error_response import ErrorResponse, ErrorResponseException
from .policy_event import PolicyEvent
from .policy_events_query_results import PolicyEventsQueryResults
from .policy_state import PolicyState
from .policy_states_query_results import PolicyStatesQueryResults
from .summary_results import SummaryResults
Expand All @@ -41,15 +61,28 @@
from .operation import Operation
from .operations_list_results import OperationsListResults
from .query_options import QueryOptions
from .policy_tracked_resource_paged import PolicyTrackedResourcePaged
from .remediation_deployment_paged import RemediationDeploymentPaged
from .remediation_paged import RemediationPaged
from .policy_insights_client_enums import (
PolicyStatesResource,
)

__all__ = [
'PolicyEvent',
'PolicyEventsQueryResults',
'PolicyDetails',
'TrackedResourceModificationDetails',
'PolicyTrackedResource',
'QueryFailureError',
'QueryFailure', 'QueryFailureException',
'RemediationFilters',
'RemediationDeploymentSummary',
'Remediation',
'TypedErrorInfo',
'ErrorDefinition',
'RemediationDeployment',
'ErrorResponse', 'ErrorResponseException',
'PolicyEvent',
'PolicyEventsQueryResults',
'PolicyState',
'PolicyStatesQueryResults',
'SummaryResults',
Expand All @@ -61,5 +94,8 @@
'Operation',
'OperationsListResults',
'QueryOptions',
'PolicyTrackedResourcePaged',
'RemediationDeploymentPaged',
'RemediationPaged',
'PolicyStatesResource',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 ErrorDefinition(Model):
"""Error definition.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: Service specific error code which serves as the substatus for
the HTTP error code.
:vartype code: str
:ivar message: Description of the error.
:vartype message: str
:ivar target: The target of the error.
:vartype target: str
:ivar details: Internal error details.
:vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition]
:ivar additional_info: Additional scenario specific error details.
:vartype additional_info:
list[~azure.mgmt.policyinsights.models.TypedErrorInfo]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDefinition]'},
'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'},
}

def __init__(self, **kwargs):
super(ErrorDefinition, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 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 ErrorDefinition(Model):
"""Error definition.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar code: Service specific error code which serves as the substatus for
the HTTP error code.
:vartype code: str
:ivar message: Description of the error.
:vartype message: str
:ivar target: The target of the error.
:vartype target: str
:ivar details: Internal error details.
:vartype details: list[~azure.mgmt.policyinsights.models.ErrorDefinition]
:ivar additional_info: Additional scenario specific error details.
:vartype additional_info:
list[~azure.mgmt.policyinsights.models.TypedErrorInfo]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDefinition]'},
'additional_info': {'key': 'additionalInfo', 'type': '[TypedErrorInfo]'},
}

def __init__(self, **kwargs) -> None:
super(ErrorDefinition, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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
from msrest.exceptions import HttpOperationError


class ErrorResponse(Model):
"""Error response.
:param error: The error details.
:type error: ~azure.mgmt.policyinsights.models.ErrorDefinition
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorDefinition'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.error = kwargs.get('error', None)


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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
from msrest.exceptions import HttpOperationError


class ErrorResponse(Model):
"""Error response.
:param error: The error details.
:type error: ~azure.mgmt.policyinsights.models.ErrorDefinition
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorDefinition'},
}

def __init__(self, *, error=None, **kwargs) -> None:
super(ErrorResponse, self).__init__(**kwargs)
self.error = error


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 PolicyDetails(Model):
"""The policy details.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar policy_definition_id: The ID of the policy definition.
:vartype policy_definition_id: str
:ivar policy_assignment_id: The ID of the policy assignment.
:vartype policy_assignment_id: str
:ivar policy_assignment_display_name: The display name of the policy
assignment.
:vartype policy_assignment_display_name: str
:ivar policy_assignment_scope: The scope of the policy assignment.
:vartype policy_assignment_scope: str
:ivar policy_set_definition_id: The ID of the policy set definition.
:vartype policy_set_definition_id: str
:ivar policy_definition_reference_id: The policy definition reference ID
within the policy set definition.
:vartype policy_definition_reference_id: str
"""

_validation = {
'policy_definition_id': {'readonly': True},
'policy_assignment_id': {'readonly': True},
'policy_assignment_display_name': {'readonly': True},
'policy_assignment_scope': {'readonly': True},
'policy_set_definition_id': {'readonly': True},
'policy_definition_reference_id': {'readonly': True},
}

_attribute_map = {
'policy_definition_id': {'key': 'policyDefinitionId', 'type': 'str'},
'policy_assignment_id': {'key': 'policyAssignmentId', 'type': 'str'},
'policy_assignment_display_name': {'key': 'policyAssignmentDisplayName', 'type': 'str'},
'policy_assignment_scope': {'key': 'policyAssignmentScope', 'type': 'str'},
'policy_set_definition_id': {'key': 'policySetDefinitionId', 'type': 'str'},
'policy_definition_reference_id': {'key': 'policyDefinitionReferenceId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PolicyDetails, self).__init__(**kwargs)
self.policy_definition_id = None
self.policy_assignment_id = None
self.policy_assignment_display_name = None
self.policy_assignment_scope = None
self.policy_set_definition_id = None
self.policy_definition_reference_id = None
Loading

0 comments on commit 92d90e2

Please sign in to comment.