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] Microsoft.PolicyInsights/remediations API #3399

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
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