Skip to content
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
6 changes: 3 additions & 3 deletions sdk/security/azure-mgmt-security/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "241e964afe675a7be98aa6a2e171a3c5f830816c",
"commit": "97ecec3490edf42beff5778542c457e8f94b02e7",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].0",
"@autorest/[email protected].3",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/security/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].3 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/security/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
'security_solutions_reference_data': '2020-01-01',
'server_vulnerability_assessment': '2020-01-01',
'software_inventories': '2021-05-01-preview',
'sql_vulnerability_assessment_baseline_rules': '2020-07-01-preview',
'sql_vulnerability_assessment_scan_results': '2020-07-01-preview',
'sql_vulnerability_assessment_scans': '2020-07-01-preview',
'sub_assessments': '2019-01-01-preview',
'tasks': '2015-06-01-preview',
'topology': '2020-01-01',
Expand Down Expand Up @@ -159,6 +156,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2022-05-01-preview: :mod:`v2022_05_01_preview.models<azure.mgmt.security.v2022_05_01_preview.models>`
* 2022-07-01-preview: :mod:`v2022_07_01_preview.models<azure.mgmt.security.v2022_07_01_preview.models>`
* 2022-08-01-preview: :mod:`v2022_08_01_preview.models<azure.mgmt.security.v2022_08_01_preview.models>`
* 2023-02-01-preview: :mod:`v2023_02_01_preview.models<azure.mgmt.security.v2023_02_01_preview.models>`
"""
if api_version == '2015-06-01-preview':
from .v2015_06_01_preview import models
Expand Down Expand Up @@ -232,6 +230,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-08-01-preview':
from .v2022_08_01_preview import models
return models
elif api_version == '2023-02-01-preview':
from .v2023_02_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -551,6 +552,34 @@ def governance_rules(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def health_report(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`HealthReportOperations<azure.mgmt.security.v2023_02_01_preview.operations.HealthReportOperations>`
"""
api_version = self._get_api_version('health_report')
if api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import HealthReportOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'health_report'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def health_reports(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`HealthReportsOperations<azure.mgmt.security.v2023_02_01_preview.operations.HealthReportsOperations>`
"""
api_version = self._get_api_version('health_reports')
if api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import HealthReportsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'health_reports'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def information_protection_policies(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -935,10 +964,13 @@ def sql_vulnerability_assessment_baseline_rules(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentBaselineRulesOperations<azure.mgmt.security.v2020_07_01_preview.operations.SqlVulnerabilityAssessmentBaselineRulesOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentBaselineRulesOperations<azure.mgmt.security.v2023_02_01_preview.operations.SqlVulnerabilityAssessmentBaselineRulesOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_baseline_rules')
if api_version == '2020-07-01-preview':
from .v2020_07_01_preview.operations import SqlVulnerabilityAssessmentBaselineRulesOperations as OperationClass
elif api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SqlVulnerabilityAssessmentBaselineRulesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_baseline_rules'".format(api_version))
self._config.api_version = api_version
Expand All @@ -949,10 +981,13 @@ def sql_vulnerability_assessment_scan_results(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentScanResultsOperations<azure.mgmt.security.v2020_07_01_preview.operations.SqlVulnerabilityAssessmentScanResultsOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentScanResultsOperations<azure.mgmt.security.v2023_02_01_preview.operations.SqlVulnerabilityAssessmentScanResultsOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_scan_results')
if api_version == '2020-07-01-preview':
from .v2020_07_01_preview.operations import SqlVulnerabilityAssessmentScanResultsOperations as OperationClass
elif api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SqlVulnerabilityAssessmentScanResultsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_scan_results'".format(api_version))
self._config.api_version = api_version
Expand All @@ -963,10 +998,13 @@ def sql_vulnerability_assessment_scans(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentScansOperations<azure.mgmt.security.v2020_07_01_preview.operations.SqlVulnerabilityAssessmentScansOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentScansOperations<azure.mgmt.security.v2023_02_01_preview.operations.SqlVulnerabilityAssessmentScansOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_scans')
if api_version == '2020-07-01-preview':
from .v2020_07_01_preview.operations import SqlVulnerabilityAssessmentScansOperations as OperationClass
elif api_version == '2023-02-01-preview':
from .v2023_02_01_preview.operations import SqlVulnerabilityAssessmentScansOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_scans'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "4.0.0b2"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ class SecurityCenter(MultiApiClientMixin, _SDKClient):
'security_solutions_reference_data': '2020-01-01',
'server_vulnerability_assessment': '2020-01-01',
'software_inventories': '2021-05-01-preview',
'sql_vulnerability_assessment_baseline_rules': '2020-07-01-preview',
'sql_vulnerability_assessment_scan_results': '2020-07-01-preview',
'sql_vulnerability_assessment_scans': '2020-07-01-preview',
'sub_assessments': '2019-01-01-preview',
'tasks': '2015-06-01-preview',
'topology': '2020-01-01',
Expand Down Expand Up @@ -159,6 +156,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2022-05-01-preview: :mod:`v2022_05_01_preview.models<azure.mgmt.security.v2022_05_01_preview.models>`
* 2022-07-01-preview: :mod:`v2022_07_01_preview.models<azure.mgmt.security.v2022_07_01_preview.models>`
* 2022-08-01-preview: :mod:`v2022_08_01_preview.models<azure.mgmt.security.v2022_08_01_preview.models>`
* 2023-02-01-preview: :mod:`v2023_02_01_preview.models<azure.mgmt.security.v2023_02_01_preview.models>`
"""
if api_version == '2015-06-01-preview':
from ..v2015_06_01_preview import models
Expand Down Expand Up @@ -232,6 +230,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-08-01-preview':
from ..v2022_08_01_preview import models
return models
elif api_version == '2023-02-01-preview':
from ..v2023_02_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -551,6 +552,34 @@ def governance_rules(self):
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def health_report(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`HealthReportOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.HealthReportOperations>`
"""
api_version = self._get_api_version('health_report')
if api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import HealthReportOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'health_report'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def health_reports(self):
"""Instance depends on the API version:

* 2023-02-01-preview: :class:`HealthReportsOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.HealthReportsOperations>`
"""
api_version = self._get_api_version('health_reports')
if api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import HealthReportsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'health_reports'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def information_protection_policies(self):
"""Instance depends on the API version:
Expand Down Expand Up @@ -935,10 +964,13 @@ def sql_vulnerability_assessment_baseline_rules(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentBaselineRulesOperations<azure.mgmt.security.v2020_07_01_preview.aio.operations.SqlVulnerabilityAssessmentBaselineRulesOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentBaselineRulesOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.SqlVulnerabilityAssessmentBaselineRulesOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_baseline_rules')
if api_version == '2020-07-01-preview':
from ..v2020_07_01_preview.aio.operations import SqlVulnerabilityAssessmentBaselineRulesOperations as OperationClass
elif api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SqlVulnerabilityAssessmentBaselineRulesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_baseline_rules'".format(api_version))
self._config.api_version = api_version
Expand All @@ -949,10 +981,13 @@ def sql_vulnerability_assessment_scan_results(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentScanResultsOperations<azure.mgmt.security.v2020_07_01_preview.aio.operations.SqlVulnerabilityAssessmentScanResultsOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentScanResultsOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.SqlVulnerabilityAssessmentScanResultsOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_scan_results')
if api_version == '2020-07-01-preview':
from ..v2020_07_01_preview.aio.operations import SqlVulnerabilityAssessmentScanResultsOperations as OperationClass
elif api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SqlVulnerabilityAssessmentScanResultsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_scan_results'".format(api_version))
self._config.api_version = api_version
Expand All @@ -963,10 +998,13 @@ def sql_vulnerability_assessment_scans(self):
"""Instance depends on the API version:

* 2020-07-01-preview: :class:`SqlVulnerabilityAssessmentScansOperations<azure.mgmt.security.v2020_07_01_preview.aio.operations.SqlVulnerabilityAssessmentScansOperations>`
* 2023-02-01-preview: :class:`SqlVulnerabilityAssessmentScansOperations<azure.mgmt.security.v2023_02_01_preview.aio.operations.SqlVulnerabilityAssessmentScansOperations>`
"""
api_version = self._get_api_version('sql_vulnerability_assessment_scans')
if api_version == '2020-07-01-preview':
from ..v2020_07_01_preview.aio.operations import SqlVulnerabilityAssessmentScansOperations as OperationClass
elif api_version == '2023-02-01-preview':
from ..v2023_02_01_preview.aio.operations import SqlVulnerabilityAssessmentScansOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'sql_vulnerability_assessment_scans'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .v2019_08_01.models import *
from .v2020_01_01.models import *
from .v2020_01_01_preview.models import *
from .v2020_07_01_preview.models import *
from .v2021_01_15_preview.models import *
from .v2021_05_01_preview.models import *
from .v2021_06_01.models import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
**kwargs: Any
) -> None:
self._config = SecurityCenterConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "4.0.0b2"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
**kwargs: Any
) -> None:
self._config = SecurityCenterConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down Expand Up @@ -181,8 +182,9 @@ async def get(self, asc_location: str, **kwargs: Any) -> _models.AscLocation:
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Loading