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] security/resource-manager #7377

Closed
wants to merge 13 commits into from
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
34 changes: 34 additions & 0 deletions sdk/security/azure-mgmt-security/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
Release History
===============

0.3.0 (2019-08-01)
++++++++++++++++++

**Features**

- Model JitNetworkAccessPolicyVirtualMachine has a new parameter public_ip_address
- Model JitNetworkAccessRequestPort has a new parameter mapped_port
- Added operation group RegulatoryComplianceControlsOperations
- Added operation group ComplianceResultsOperations
- Added operation group ServerVulnerabilityAssessmentOperations
- Added operation group IoTSecuritySolutionsResourceGroupOperations
- Added operation group AdaptiveApplicationControlsOperations
- Added operation group IoTSecuritySolutionsOperations
- Added operation group IotSecuritySolutionOperations
- Added operation group RegulatoryComplianceStandardsOperations
- Added operation group IoTSecuritySolutionsAnalyticsOperations
- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertOperations
- Added operation group IoTSecuritySolutionsAnalyticsRecommendationsOperations
- Added operation group RegulatoryComplianceAssessmentsOperations
- Added operation group IoTSecuritySolutionsAnalyticsRecommendationOperations
- Added operation group IoTSecuritySolutionsAnalyticsAggregatedAlertsOperations

**General breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes if from some import.
In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.

- SecurityCenter cannot be imported from `azure.mgmt.security.security_center` anymore (import from `azure.mgmt.security` works like before)
- SecurityCenterConfiguration import has been moved from `azure.mgmt.security.security_center` to `azure.mgmt.security`
- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.security.models.my_class` (import from `azure.mgmt.security.models` works like before)
- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.security.operations.my_class_operations` (import from `azure.mgmt.security.operations` works like before)

Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.

0.2.0 (2019-04-16)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion sdk/security/azure-mgmt-security/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Security Center Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .security_center import SecurityCenter
from .version import VERSION
from ._configuration import SecurityCenterConfiguration
from ._security_center import SecurityCenter
__all__ = ['SecurityCenter', 'SecurityCenterConfiguration']

__all__ = ['SecurityCenter']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class SecurityCenterConfiguration(AzureConfiguration):
"""Configuration for SecurityCenter
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure subscription ID
:type subscription_id: str
:param asc_location: The location where ASC stores the data of the
subscription. can be retrieved from Get locations
:type asc_location: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, asc_location, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if asc_location is None:
raise ValueError("Parameter 'asc_location' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(SecurityCenterConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-security/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
self.asc_location = asc_location
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,38 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.pricings_operations import PricingsOperations
from .operations.alerts_operations import AlertsOperations
from .operations.settings_operations import SettingsOperations
from .operations.allowed_connections_operations import AllowedConnectionsOperations
from .operations.discovered_security_solutions_operations import DiscoveredSecuritySolutionsOperations
from .operations.external_security_solutions_operations import ExternalSecuritySolutionsOperations
from .operations.jit_network_access_policies_operations import JitNetworkAccessPoliciesOperations
from .operations.locations_operations import LocationsOperations
from .operations.operations import Operations
from .operations.tasks_operations import TasksOperations
from .operations.topology_operations import TopologyOperations
from .operations.advanced_threat_protection_operations import AdvancedThreatProtectionOperations
from .operations.auto_provisioning_settings_operations import AutoProvisioningSettingsOperations
from .operations.compliances_operations import CompliancesOperations
from .operations.information_protection_policies_operations import InformationProtectionPoliciesOperations
from .operations.security_contacts_operations import SecurityContactsOperations
from .operations.workspace_settings_operations import WorkspaceSettingsOperations
from . import models


class SecurityCenterConfiguration(AzureConfiguration):
"""Configuration for SecurityCenter
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Azure subscription ID
:type subscription_id: str
:param asc_location: The location where ASC stores the data of the
subscription. can be retrieved from Get locations
:type asc_location: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, asc_location, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if asc_location is None:
raise ValueError("Parameter 'asc_location' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(SecurityCenterConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-security/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
self.asc_location = asc_location
from ._configuration import SecurityCenterConfiguration
from .operations import ComplianceResultsOperations
from .operations import PricingsOperations
from .operations import AlertsOperations
from .operations import SettingsOperations
from .operations import DeviceSecurityGroupsOperations
from .operations import IotSecuritySolutionOperations
from .operations import IotSecuritySolutionAnalyticsOperations
from .operations import IotSecuritySolutionsAnalyticsAggregatedAlertOperations
from .operations import IotSecuritySolutionsAnalyticsRecommendationOperations
from .operations import AllowedConnectionsOperations
from .operations import DiscoveredSecuritySolutionsOperations
from .operations import ExternalSecuritySolutionsOperations
from .operations import JitNetworkAccessPoliciesOperations
from .operations import AdaptiveApplicationControlsOperations
from .operations import LocationsOperations
from .operations import Operations
from .operations import TasksOperations
from .operations import TopologyOperations
from .operations import AdvancedThreatProtectionOperations
from .operations import AutoProvisioningSettingsOperations
from .operations import CompliancesOperations
from .operations import InformationProtectionPoliciesOperations
from .operations import SecurityContactsOperations
from .operations import WorkspaceSettingsOperations
from .operations import RegulatoryComplianceStandardsOperations
from .operations import RegulatoryComplianceControlsOperations
from .operations import RegulatoryComplianceAssessmentsOperations
from .operations import ServerVulnerabilityAssessmentOperations
from .operations import SubAssessmentsOperations
from . import models


class SecurityCenter(SDKClient):
Expand All @@ -77,12 +51,24 @@ class SecurityCenter(SDKClient):
:ivar config: Configuration for client.
:vartype config: SecurityCenterConfiguration

:ivar compliance_results: ComplianceResults operations
:vartype compliance_results: azure.mgmt.security.operations.ComplianceResultsOperations
:ivar pricings: Pricings operations
:vartype pricings: azure.mgmt.security.operations.PricingsOperations
:ivar alerts: Alerts operations
:vartype alerts: azure.mgmt.security.operations.AlertsOperations
:ivar settings: Settings operations
:vartype settings: azure.mgmt.security.operations.SettingsOperations
:ivar device_security_groups: DeviceSecurityGroups operations
:vartype device_security_groups: azure.mgmt.security.operations.DeviceSecurityGroupsOperations
:ivar iot_security_solution: IotSecuritySolution operations
:vartype iot_security_solution: azure.mgmt.security.operations.IotSecuritySolutionOperations
:ivar iot_security_solution_analytics: IotSecuritySolutionAnalytics operations
:vartype iot_security_solution_analytics: azure.mgmt.security.operations.IotSecuritySolutionAnalyticsOperations
:ivar iot_security_solutions_analytics_aggregated_alert: IotSecuritySolutionsAnalyticsAggregatedAlert operations
:vartype iot_security_solutions_analytics_aggregated_alert: azure.mgmt.security.operations.IotSecuritySolutionsAnalyticsAggregatedAlertOperations
:ivar iot_security_solutions_analytics_recommendation: IotSecuritySolutionsAnalyticsRecommendation operations
:vartype iot_security_solutions_analytics_recommendation: azure.mgmt.security.operations.IotSecuritySolutionsAnalyticsRecommendationOperations
:ivar allowed_connections: AllowedConnections operations
:vartype allowed_connections: azure.mgmt.security.operations.AllowedConnectionsOperations
:ivar discovered_security_solutions: DiscoveredSecuritySolutions operations
Expand All @@ -91,6 +77,8 @@ class SecurityCenter(SDKClient):
:vartype external_security_solutions: azure.mgmt.security.operations.ExternalSecuritySolutionsOperations
:ivar jit_network_access_policies: JitNetworkAccessPolicies operations
:vartype jit_network_access_policies: azure.mgmt.security.operations.JitNetworkAccessPoliciesOperations
: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 All @@ -111,6 +99,16 @@ class SecurityCenter(SDKClient):
:vartype security_contacts: azure.mgmt.security.operations.SecurityContactsOperations
:ivar workspace_settings: WorkspaceSettings operations
:vartype workspace_settings: azure.mgmt.security.operations.WorkspaceSettingsOperations
:ivar regulatory_compliance_standards: RegulatoryComplianceStandards operations
:vartype regulatory_compliance_standards: azure.mgmt.security.operations.RegulatoryComplianceStandardsOperations
:ivar regulatory_compliance_controls: RegulatoryComplianceControls operations
:vartype regulatory_compliance_controls: azure.mgmt.security.operations.RegulatoryComplianceControlsOperations
:ivar regulatory_compliance_assessments: RegulatoryComplianceAssessments operations
:vartype regulatory_compliance_assessments: azure.mgmt.security.operations.RegulatoryComplianceAssessmentsOperations
:ivar server_vulnerability_assessment: ServerVulnerabilityAssessment operations
:vartype server_vulnerability_assessment: azure.mgmt.security.operations.ServerVulnerabilityAssessmentOperations
:ivar sub_assessments: SubAssessments operations
:vartype sub_assessments: azure.mgmt.security.operations.SubAssessmentsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -133,12 +131,24 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.compliance_results = ComplianceResultsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.pricings = PricingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.settings = SettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.device_security_groups = DeviceSecurityGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_security_solution = IotSecuritySolutionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_security_solution_analytics = IotSecuritySolutionAnalyticsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_security_solutions_analytics_aggregated_alert = IotSecuritySolutionsAnalyticsAggregatedAlertOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_security_solutions_analytics_recommendation = IotSecuritySolutionsAnalyticsRecommendationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.allowed_connections = AllowedConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.discovered_security_solutions = DiscoveredSecuritySolutionsOperations(
Expand All @@ -147,6 +157,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.jit_network_access_policies = JitNetworkAccessPoliciesOperations(
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 All @@ -167,3 +179,13 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.workspace_settings = WorkspaceSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.regulatory_compliance_standards = RegulatoryComplianceStandardsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.regulatory_compliance_controls = RegulatoryComplianceControlsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.regulatory_compliance_assessments = RegulatoryComplianceAssessmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_vulnerability_assessment = ServerVulnerabilityAssessmentOperations(
self._client, self.config, self._serialize, self._deserialize)
self.sub_assessments = SubAssessmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading