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 azure-mgmt-security] Onboarding applicationWhitelistings to a new stable API version - 2020-01-01 #866

Closed
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 @@ -25,7 +25,6 @@
from .operations import IotSecuritySolutionsAnalyticsRecommendationOperations
from .operations import DiscoveredSecuritySolutionsOperations
from .operations import ExternalSecuritySolutionsOperations
from .operations import AdaptiveApplicationControlsOperations
from .operations import LocationsOperations
from .operations import Operations
from .operations import TasksOperations
Expand All @@ -42,6 +41,7 @@
from .operations import AutomationsOperations
from .operations import AssessmentsMetadataOperations
from .operations import AssessmentsOperations
from .operations import AdaptiveApplicationControlsOperations
from .operations import AdaptiveNetworkHardeningsOperations
from .operations import AllowedConnectionsOperations
from .operations import TopologyOperations
Expand Down Expand Up @@ -79,8 +79,6 @@ class SecurityCenter(SDKClient):
:vartype discovered_security_solutions: azure.mgmt.security.operations.DiscoveredSecuritySolutionsOperations
:ivar external_security_solutions: ExternalSecuritySolutions operations
:vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations
:ivar adaptive_application_controls: AdaptiveApplicationControls operations
:vartype adaptive_application_controls: azure.mgmt.security.operations.AdaptiveApplicationControlsOperations
:ivar locations: Locations operations
:vartype locations: azure.mgmt.security.operations.LocationsOperations
:ivar operations: Operations operations
Expand Down Expand Up @@ -113,6 +111,8 @@ class SecurityCenter(SDKClient):
:vartype assessments_metadata: azure.mgmt.security.operations.AssessmentsMetadataOperations
:ivar assessments: Assessments operations
:vartype assessments: azure.mgmt.security.operations.AssessmentsOperations
:ivar adaptive_application_controls: AdaptiveApplicationControls operations
:vartype adaptive_application_controls: azure.mgmt.security.operations.AdaptiveApplicationControlsOperations
:ivar adaptive_network_hardenings: AdaptiveNetworkHardenings operations
:vartype adaptive_network_hardenings: azure.mgmt.security.operations.AdaptiveNetworkHardeningsOperations
:ivar allowed_connections: AllowedConnections operations
Expand Down Expand Up @@ -167,8 +167,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.external_security_solutions = ExternalSecuritySolutionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.adaptive_application_controls = AdaptiveApplicationControlsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.locations = LocationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
Expand Down Expand Up @@ -201,6 +199,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.assessments = AssessmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.adaptive_application_controls = AdaptiveApplicationControlsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.adaptive_network_hardenings = AdaptiveNetworkHardeningsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.allowed_connections = AllowedConnectionsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from ._models_py3 import AppWhitelistingGroup
from ._models_py3 import AppWhitelistingGroups
from ._models_py3 import AppWhitelistingIssueSummary
from ._models_py3 import AppWhitelistingPutGroupData
from ._models_py3 import AscLocation
from ._models_py3 import AssessmentLinks
from ._models_py3 import AssessmentStatus
Expand Down Expand Up @@ -176,7 +175,6 @@
from ._models import AppWhitelistingGroup
from ._models import AppWhitelistingGroups
from ._models import AppWhitelistingIssueSummary
from ._models import AppWhitelistingPutGroupData
from ._models import AscLocation
from ._models import AssessmentLinks
from ._models import AssessmentStatus
Expand Down Expand Up @@ -391,7 +389,6 @@
'AppWhitelistingGroup',
'AppWhitelistingGroups',
'AppWhitelistingIssueSummary',
'AppWhitelistingPutGroupData',
'AscLocation',
'AssessmentLinks',
'AssessmentStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,18 +1089,18 @@ class AppWhitelistingGroup(Model):
:type enforcement_mode: str or ~azure.mgmt.security.models.enum
:param protection_mode:
:type protection_mode: ~azure.mgmt.security.models.ProtectionMode
:param configuration_status: Possible values include: 'Configured',
:ivar configuration_status: Possible values include: 'Configured',
'NotConfigured', 'InProgress', 'Failed', 'NoStatus'
:type configuration_status: str or ~azure.mgmt.security.models.enum
:param recommendation_status: Possible values include: 'Recommended',
:vartype configuration_status: str or ~azure.mgmt.security.models.enum
:ivar recommendation_status: Possible values include: 'Recommended',
'NotRecommended', 'NotAvailable', 'NoStatus'
:type recommendation_status: str or ~azure.mgmt.security.models.enum
:param issues:
:type issues:
:vartype recommendation_status: str or ~azure.mgmt.security.models.enum
:ivar issues:
:vartype issues:
list[~azure.mgmt.security.models.AppWhitelistingIssueSummary]
:param source_system: Possible values include: 'Azure_AppLocker',
:ivar source_system: Possible values include: 'Azure_AppLocker',
'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None'
:type source_system: str or ~azure.mgmt.security.models.enum
:vartype source_system: str or ~azure.mgmt.security.models.enum
:param vm_recommendations:
:type vm_recommendations:
list[~azure.mgmt.security.models.VmRecommendation]
Expand All @@ -1114,6 +1114,10 @@ class AppWhitelistingGroup(Model):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'readonly': True},
'configuration_status': {'readonly': True},
'recommendation_status': {'readonly': True},
'issues': {'readonly': True},
'source_system': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1139,10 +1143,10 @@ def __init__(self, **kwargs):
self.location = None
self.enforcement_mode = kwargs.get('enforcement_mode', None)
self.protection_mode = kwargs.get('protection_mode', None)
self.configuration_status = kwargs.get('configuration_status', None)
self.recommendation_status = kwargs.get('recommendation_status', None)
self.issues = kwargs.get('issues', None)
self.source_system = kwargs.get('source_system', None)
self.configuration_status = None
self.recommendation_status = None
self.issues = None
self.source_system = None
self.vm_recommendations = kwargs.get('vm_recommendations', None)
self.path_recommendations = kwargs.get('path_recommendations', None)

Expand Down Expand Up @@ -1188,40 +1192,6 @@ def __init__(self, **kwargs):
self.number_of_vms = kwargs.get('number_of_vms', None)


class AppWhitelistingPutGroupData(Model):
"""The altered data of the recommended VM/server group policy.

:param enforcement_mode: The enforcement mode of the group. Can also be
defined per collection type by using ProtectionMode. Possible values
include: 'Audit', 'Enforce', 'None'
:type enforcement_mode: str or ~azure.mgmt.security.models.enum
:param protection_mode: The protection mode of the group per collection
type. Can also be defined for all collection types by using
EnforcementMode
:type protection_mode: ~azure.mgmt.security.models.ProtectionMode
:param vm_recommendations:
:type vm_recommendations:
list[~azure.mgmt.security.models.VmRecommendation]
:param path_recommendations:
:type path_recommendations:
list[~azure.mgmt.security.models.PathRecommendation]
"""

_attribute_map = {
'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'},
'protection_mode': {'key': 'protectionMode', 'type': 'ProtectionMode'},
'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'},
'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'},
}

def __init__(self, **kwargs):
super(AppWhitelistingPutGroupData, self).__init__(**kwargs)
self.enforcement_mode = kwargs.get('enforcement_mode', None)
self.protection_mode = kwargs.get('protection_mode', None)
self.vm_recommendations = kwargs.get('vm_recommendations', None)
self.path_recommendations = kwargs.get('path_recommendations', None)


class AscLocation(Resource):
"""The ASC location of the subscription is in the "name" field.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,18 +1089,18 @@ class AppWhitelistingGroup(Model):
:type enforcement_mode: str or ~azure.mgmt.security.models.enum
:param protection_mode:
:type protection_mode: ~azure.mgmt.security.models.ProtectionMode
:param configuration_status: Possible values include: 'Configured',
:ivar configuration_status: Possible values include: 'Configured',
'NotConfigured', 'InProgress', 'Failed', 'NoStatus'
:type configuration_status: str or ~azure.mgmt.security.models.enum
:param recommendation_status: Possible values include: 'Recommended',
:vartype configuration_status: str or ~azure.mgmt.security.models.enum
:ivar recommendation_status: Possible values include: 'Recommended',
'NotRecommended', 'NotAvailable', 'NoStatus'
:type recommendation_status: str or ~azure.mgmt.security.models.enum
:param issues:
:type issues:
:vartype recommendation_status: str or ~azure.mgmt.security.models.enum
:ivar issues:
:vartype issues:
list[~azure.mgmt.security.models.AppWhitelistingIssueSummary]
:param source_system: Possible values include: 'Azure_AppLocker',
:ivar source_system: Possible values include: 'Azure_AppLocker',
'Azure_AuditD', 'NonAzure_AppLocker', 'NonAzure_AuditD', 'None'
:type source_system: str or ~azure.mgmt.security.models.enum
:vartype source_system: str or ~azure.mgmt.security.models.enum
:param vm_recommendations:
:type vm_recommendations:
list[~azure.mgmt.security.models.VmRecommendation]
Expand All @@ -1114,6 +1114,10 @@ class AppWhitelistingGroup(Model):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'readonly': True},
'configuration_status': {'readonly': True},
'recommendation_status': {'readonly': True},
'issues': {'readonly': True},
'source_system': {'readonly': True},
}

_attribute_map = {
Expand All @@ -1131,18 +1135,18 @@ class AppWhitelistingGroup(Model):
'path_recommendations': {'key': 'properties.pathRecommendations', 'type': '[PathRecommendation]'},
}

def __init__(self, *, enforcement_mode=None, protection_mode=None, configuration_status=None, recommendation_status=None, issues=None, source_system=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None:
def __init__(self, *, enforcement_mode=None, protection_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None:
super(AppWhitelistingGroup, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.location = None
self.enforcement_mode = enforcement_mode
self.protection_mode = protection_mode
self.configuration_status = configuration_status
self.recommendation_status = recommendation_status
self.issues = issues
self.source_system = source_system
self.configuration_status = None
self.recommendation_status = None
self.issues = None
self.source_system = None
self.vm_recommendations = vm_recommendations
self.path_recommendations = path_recommendations

Expand Down Expand Up @@ -1188,40 +1192,6 @@ def __init__(self, *, issue=None, number_of_vms: float=None, **kwargs) -> None:
self.number_of_vms = number_of_vms


class AppWhitelistingPutGroupData(Model):
"""The altered data of the recommended VM/server group policy.

:param enforcement_mode: The enforcement mode of the group. Can also be
defined per collection type by using ProtectionMode. Possible values
include: 'Audit', 'Enforce', 'None'
:type enforcement_mode: str or ~azure.mgmt.security.models.enum
:param protection_mode: The protection mode of the group per collection
type. Can also be defined for all collection types by using
EnforcementMode
:type protection_mode: ~azure.mgmt.security.models.ProtectionMode
:param vm_recommendations:
:type vm_recommendations:
list[~azure.mgmt.security.models.VmRecommendation]
:param path_recommendations:
:type path_recommendations:
list[~azure.mgmt.security.models.PathRecommendation]
"""

_attribute_map = {
'enforcement_mode': {'key': 'enforcementMode', 'type': 'str'},
'protection_mode': {'key': 'protectionMode', 'type': 'ProtectionMode'},
'vm_recommendations': {'key': 'vmRecommendations', 'type': '[VmRecommendation]'},
'path_recommendations': {'key': 'pathRecommendations', 'type': '[PathRecommendation]'},
}

def __init__(self, *, enforcement_mode=None, protection_mode=None, vm_recommendations=None, path_recommendations=None, **kwargs) -> None:
super(AppWhitelistingPutGroupData, self).__init__(**kwargs)
self.enforcement_mode = enforcement_mode
self.protection_mode = protection_mode
self.vm_recommendations = vm_recommendations
self.path_recommendations = path_recommendations


class AscLocation(Resource):
"""The ASC location of the subscription is in the "name" field.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from ._iot_security_solutions_analytics_recommendation_operations import IotSecuritySolutionsAnalyticsRecommendationOperations
from ._discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations
from ._external_security_solutions_operations import ExternalSecuritySolutionsOperations
from ._adaptive_application_controls_operations import AdaptiveApplicationControlsOperations
from ._locations_operations import LocationsOperations
from ._operations import Operations
from ._tasks_operations import TasksOperations
Expand All @@ -38,6 +37,7 @@
from ._automations_operations import AutomationsOperations
from ._assessments_metadata_operations import AssessmentsMetadataOperations
from ._assessments_operations import AssessmentsOperations
from ._adaptive_application_controls_operations import AdaptiveApplicationControlsOperations
from ._adaptive_network_hardenings_operations import AdaptiveNetworkHardeningsOperations
from ._allowed_connections_operations import AllowedConnectionsOperations
from ._topology_operations import TopologyOperations
Expand All @@ -56,7 +56,6 @@
'IotSecuritySolutionsAnalyticsRecommendationOperations',
'DiscoveredSecuritySolutionsOperations',
'ExternalSecuritySolutionsOperations',
'AdaptiveApplicationControlsOperations',
'LocationsOperations',
'Operations',
'TasksOperations',
Expand All @@ -73,6 +72,7 @@
'AutomationsOperations',
'AssessmentsMetadataOperations',
'AssessmentsOperations',
'AdaptiveApplicationControlsOperations',
'AdaptiveNetworkHardeningsOperations',
'AllowedConnectionsOperations',
'TopologyOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AdaptiveApplicationControlsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: API version for the operation. Constant value: "2015-06-01-preview".
:ivar api_version: API version for the operation. Constant value: "2020-01-01".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2015-06-01-preview"
self.api_version = "2020-01-01"

self.config = config

Expand Down Expand Up @@ -168,8 +168,8 @@ def put(

:param group_name: Name of an application control VM/server group
:type group_name: str
:param body: The updated VM/server group data
:type body: ~azure.mgmt.security.models.AppWhitelistingPutGroupData
:param body:
:type body: ~azure.mgmt.security.models.AppWhitelistingGroup
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand Down Expand Up @@ -205,7 +205,7 @@ def put(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct body
body_content = self._serialize.body(body, 'AppWhitelistingPutGroupData')
body_content = self._serialize.body(body, 'AppWhitelistingGroup')

# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
Expand Down