Skip to content

Commit 7619ab8

Browse files
authored
[AutoPR security/resource-manager] New security Regulatory compliance API (#4502)
* Generated from 60b311c10c1de2583d21065332a28f65b6025e8b Regulatory compliance API * Packaging update of azure-mgmt-security * Generated from f2f06c6cb708b078507ff93bb5bd338416b27de7 Merge branch 'master' of https://github.com/himarkov/azure-rest-api-specs * Generated from 57997a34834cb3e70253fc7573647886666edb4f Update regulatoryCompliance.json
1 parent 418e8ac commit 7619ab8

16 files changed

+1147
-6
lines changed

azure-mgmt-security/azure/mgmt/security/models/__init__.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
# --------------------------------------------------------------------------
1111

1212
try:
13-
from .pricing_py3 import Pricing
14-
from .pricing_list_py3 import PricingList
13+
from .regulatory_compliance_standard_py3 import RegulatoryComplianceStandard
14+
from .regulatory_compliance_control_py3 import RegulatoryComplianceControl
15+
from .regulatory_compliance_assessment_py3 import RegulatoryComplianceAssessment
1516
from .asc_location_py3 import AscLocation
1617
from .resource_py3 import Resource
18+
from .pricing_py3 import Pricing
19+
from .pricing_list_py3 import PricingList
1720
from .security_contact_py3 import SecurityContact
1821
from .workspace_setting_py3 import WorkspaceSetting
1922
from .auto_provisioning_setting_py3 import AutoProvisioningSetting
@@ -65,10 +68,13 @@
6568
from .connectable_resource_py3 import ConnectableResource
6669
from .allowed_connections_resource_py3 import AllowedConnectionsResource
6770
except (SyntaxError, ImportError):
68-
from .pricing import Pricing
69-
from .pricing_list import PricingList
71+
from .regulatory_compliance_standard import RegulatoryComplianceStandard
72+
from .regulatory_compliance_control import RegulatoryComplianceControl
73+
from .regulatory_compliance_assessment import RegulatoryComplianceAssessment
7074
from .asc_location import AscLocation
7175
from .resource import Resource
76+
from .pricing import Pricing
77+
from .pricing_list import PricingList
7278
from .security_contact import SecurityContact
7379
from .workspace_setting import WorkspaceSetting
7480
from .auto_provisioning_setting import AutoProvisioningSetting
@@ -119,6 +125,9 @@
119125
from .connected_resource import ConnectedResource
120126
from .connectable_resource import ConnectableResource
121127
from .allowed_connections_resource import AllowedConnectionsResource
128+
from .regulatory_compliance_standard_paged import RegulatoryComplianceStandardPaged
129+
from .regulatory_compliance_control_paged import RegulatoryComplianceControlPaged
130+
from .regulatory_compliance_assessment_paged import RegulatoryComplianceAssessmentPaged
122131
from .security_contact_paged import SecurityContactPaged
123132
from .workspace_setting_paged import WorkspaceSettingPaged
124133
from .auto_provisioning_setting_paged import AutoProvisioningSettingPaged
@@ -135,6 +144,7 @@
135144
from .topology_resource_paged import TopologyResourcePaged
136145
from .allowed_connections_resource_paged import AllowedConnectionsResourcePaged
137146
from .security_center_enums import (
147+
State,
138148
PricingTier,
139149
AlertNotifications,
140150
AlertsToAdmins,
@@ -151,10 +161,13 @@
151161
)
152162

153163
__all__ = [
154-
'Pricing',
155-
'PricingList',
164+
'RegulatoryComplianceStandard',
165+
'RegulatoryComplianceControl',
166+
'RegulatoryComplianceAssessment',
156167
'AscLocation',
157168
'Resource',
169+
'Pricing',
170+
'PricingList',
158171
'SecurityContact',
159172
'WorkspaceSetting',
160173
'AutoProvisioningSetting',
@@ -205,6 +218,9 @@
205218
'ConnectedResource',
206219
'ConnectableResource',
207220
'AllowedConnectionsResource',
221+
'RegulatoryComplianceStandardPaged',
222+
'RegulatoryComplianceControlPaged',
223+
'RegulatoryComplianceAssessmentPaged',
208224
'SecurityContactPaged',
209225
'WorkspaceSettingPaged',
210226
'AutoProvisioningSettingPaged',
@@ -220,6 +236,7 @@
220236
'ExternalSecuritySolutionPaged',
221237
'TopologyResourcePaged',
222238
'AllowedConnectionsResourcePaged',
239+
'State',
223240
'PricingTier',
224241
'AlertNotifications',
225242
'AlertsToAdmins',
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource import Resource
13+
14+
15+
class RegulatoryComplianceAssessment(Resource):
16+
"""Regulatory compliance assessment details and state.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:ivar description: The description of the regulatory compliance assessment
28+
:vartype description: str
29+
:ivar assessment_type: The expected type of assessment contained in the
30+
AssessmentDetailsLink
31+
:vartype assessment_type: str
32+
:ivar assessment_details_link: Link to more detailed assessment results
33+
data. The response type will be according to the assessmentType field
34+
:vartype assessment_details_link: str
35+
:param state: Aggregative state based on the assessment's scanned
36+
resources states. Possible values include: 'Passed', 'Failed', 'Skipped',
37+
'Unsupported'
38+
:type state: str or ~azure.mgmt.security.models.State
39+
:ivar passed_resources: The given assessment's related resources count
40+
with passed state.
41+
:vartype passed_resources: int
42+
:ivar failed_resources: The given assessment's related resources count
43+
with failed state.
44+
:vartype failed_resources: int
45+
:ivar skipped_resources: The given assessment's related resources count
46+
with skipped state.
47+
:vartype skipped_resources: int
48+
:ivar unsupported_resources: The given assessment's related resources
49+
count with unsupported state.
50+
:vartype unsupported_resources: int
51+
"""
52+
53+
_validation = {
54+
'id': {'readonly': True},
55+
'name': {'readonly': True},
56+
'type': {'readonly': True},
57+
'description': {'readonly': True},
58+
'assessment_type': {'readonly': True},
59+
'assessment_details_link': {'readonly': True},
60+
'passed_resources': {'readonly': True},
61+
'failed_resources': {'readonly': True},
62+
'skipped_resources': {'readonly': True},
63+
'unsupported_resources': {'readonly': True},
64+
}
65+
66+
_attribute_map = {
67+
'id': {'key': 'id', 'type': 'str'},
68+
'name': {'key': 'name', 'type': 'str'},
69+
'type': {'key': 'type', 'type': 'str'},
70+
'description': {'key': 'properties.description', 'type': 'str'},
71+
'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'},
72+
'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'},
73+
'state': {'key': 'properties.state', 'type': 'str'},
74+
'passed_resources': {'key': 'properties.passedResources', 'type': 'int'},
75+
'failed_resources': {'key': 'properties.failedResources', 'type': 'int'},
76+
'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'},
77+
'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'},
78+
}
79+
80+
def __init__(self, **kwargs):
81+
super(RegulatoryComplianceAssessment, self).__init__(**kwargs)
82+
self.description = None
83+
self.assessment_type = None
84+
self.assessment_details_link = None
85+
self.state = kwargs.get('state', None)
86+
self.passed_resources = None
87+
self.failed_resources = None
88+
self.skipped_resources = None
89+
self.unsupported_resources = None
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class RegulatoryComplianceAssessmentPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`RegulatoryComplianceAssessment <azure.mgmt.security.models.RegulatoryComplianceAssessment>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[RegulatoryComplianceAssessment]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(RegulatoryComplianceAssessmentPaged, self).__init__(*args, **kwargs)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource_py3 import Resource
13+
14+
15+
class RegulatoryComplianceAssessment(Resource):
16+
"""Regulatory compliance assessment details and state.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:ivar description: The description of the regulatory compliance assessment
28+
:vartype description: str
29+
:ivar assessment_type: The expected type of assessment contained in the
30+
AssessmentDetailsLink
31+
:vartype assessment_type: str
32+
:ivar assessment_details_link: Link to more detailed assessment results
33+
data. The response type will be according to the assessmentType field
34+
:vartype assessment_details_link: str
35+
:param state: Aggregative state based on the assessment's scanned
36+
resources states. Possible values include: 'Passed', 'Failed', 'Skipped',
37+
'Unsupported'
38+
:type state: str or ~azure.mgmt.security.models.State
39+
:ivar passed_resources: The given assessment's related resources count
40+
with passed state.
41+
:vartype passed_resources: int
42+
:ivar failed_resources: The given assessment's related resources count
43+
with failed state.
44+
:vartype failed_resources: int
45+
:ivar skipped_resources: The given assessment's related resources count
46+
with skipped state.
47+
:vartype skipped_resources: int
48+
:ivar unsupported_resources: The given assessment's related resources
49+
count with unsupported state.
50+
:vartype unsupported_resources: int
51+
"""
52+
53+
_validation = {
54+
'id': {'readonly': True},
55+
'name': {'readonly': True},
56+
'type': {'readonly': True},
57+
'description': {'readonly': True},
58+
'assessment_type': {'readonly': True},
59+
'assessment_details_link': {'readonly': True},
60+
'passed_resources': {'readonly': True},
61+
'failed_resources': {'readonly': True},
62+
'skipped_resources': {'readonly': True},
63+
'unsupported_resources': {'readonly': True},
64+
}
65+
66+
_attribute_map = {
67+
'id': {'key': 'id', 'type': 'str'},
68+
'name': {'key': 'name', 'type': 'str'},
69+
'type': {'key': 'type', 'type': 'str'},
70+
'description': {'key': 'properties.description', 'type': 'str'},
71+
'assessment_type': {'key': 'properties.assessmentType', 'type': 'str'},
72+
'assessment_details_link': {'key': 'properties.assessmentDetailsLink', 'type': 'str'},
73+
'state': {'key': 'properties.state', 'type': 'str'},
74+
'passed_resources': {'key': 'properties.passedResources', 'type': 'int'},
75+
'failed_resources': {'key': 'properties.failedResources', 'type': 'int'},
76+
'skipped_resources': {'key': 'properties.skippedResources', 'type': 'int'},
77+
'unsupported_resources': {'key': 'properties.unsupportedResources', 'type': 'int'},
78+
}
79+
80+
def __init__(self, *, state=None, **kwargs) -> None:
81+
super(RegulatoryComplianceAssessment, self).__init__(**kwargs)
82+
self.description = None
83+
self.assessment_type = None
84+
self.assessment_details_link = None
85+
self.state = state
86+
self.passed_resources = None
87+
self.failed_resources = None
88+
self.skipped_resources = None
89+
self.unsupported_resources = None
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource import Resource
13+
14+
15+
class RegulatoryComplianceControl(Resource):
16+
"""Regulatory compliance control details and state.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:ivar description: The description of the regulatory compliance control
28+
:vartype description: str
29+
:param state: Aggregative state based on the control's supported
30+
assessments states. Possible values include: 'Passed', 'Failed',
31+
'Skipped', 'Unsupported'
32+
:type state: str or ~azure.mgmt.security.models.State
33+
:ivar passed_assessments: The number of supported regulatory compliance
34+
assessments of the given control with a passed state
35+
:vartype passed_assessments: int
36+
:ivar failed_assessments: The number of supported regulatory compliance
37+
assessments of the given control with a failed state
38+
:vartype failed_assessments: int
39+
:ivar skipped_assessments: The number of supported regulatory compliance
40+
assessments of the given control with a skipped state
41+
:vartype skipped_assessments: int
42+
"""
43+
44+
_validation = {
45+
'id': {'readonly': True},
46+
'name': {'readonly': True},
47+
'type': {'readonly': True},
48+
'description': {'readonly': True},
49+
'passed_assessments': {'readonly': True},
50+
'failed_assessments': {'readonly': True},
51+
'skipped_assessments': {'readonly': True},
52+
}
53+
54+
_attribute_map = {
55+
'id': {'key': 'id', 'type': 'str'},
56+
'name': {'key': 'name', 'type': 'str'},
57+
'type': {'key': 'type', 'type': 'str'},
58+
'description': {'key': 'properties.description', 'type': 'str'},
59+
'state': {'key': 'properties.state', 'type': 'str'},
60+
'passed_assessments': {'key': 'properties.passedAssessments', 'type': 'int'},
61+
'failed_assessments': {'key': 'properties.failedAssessments', 'type': 'int'},
62+
'skipped_assessments': {'key': 'properties.skippedAssessments', 'type': 'int'},
63+
}
64+
65+
def __init__(self, **kwargs):
66+
super(RegulatoryComplianceControl, self).__init__(**kwargs)
67+
self.description = None
68+
self.state = kwargs.get('state', None)
69+
self.passed_assessments = None
70+
self.failed_assessments = None
71+
self.skipped_assessments = None
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class RegulatoryComplianceControlPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`RegulatoryComplianceControl <azure.mgmt.security.models.RegulatoryComplianceControl>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[RegulatoryComplianceControl]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(RegulatoryComplianceControlPaged, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)