azure_mgmt_policy 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_assignments.rb +9 -9
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_assignments.rb +9 -9
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_assignments.rb +9 -9
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/models/error_response.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_assignments.rb +9 -9
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-03-01/generated/azure_mgmt_policy/models/error_response.rb +2 -2
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-05-01/generated/azure_mgmt_policy.rb +43 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/error_response.rb +69 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/identity.rb +72 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_assignment.rb +196 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +98 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_definition.rb +153 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +98 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb +58 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_mode.rb +17 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_set_definition.rb +151 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +99 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_sku.rb +59 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/models/resource_identity_type.rb +16 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_assignments.rb +1885 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_client.rb +139 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb +1365 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_set_definitions.rb +1388 -0
- data/lib/azure_mgmt_policy.rb +1 -0
- data/lib/profiles/latest/modules/policy_profile_module.rb +35 -27
- data/lib/version.rb +1 -1
- metadata +22 -3
@@ -0,0 +1,72 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Policy::Mgmt::V2018_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Identity for the resource.
|
10
|
+
#
|
11
|
+
class Identity
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The principal ID of the resource identity.
|
16
|
+
attr_accessor :principal_id
|
17
|
+
|
18
|
+
# @return [String] The tenant ID of the resource identity.
|
19
|
+
attr_accessor :tenant_id
|
20
|
+
|
21
|
+
# @return [ResourceIdentityType] The identity type. Possible values
|
22
|
+
# include: 'SystemAssigned', 'None'
|
23
|
+
attr_accessor :type
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for Identity class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
client_side_validation: true,
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'Identity',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'Identity',
|
38
|
+
model_properties: {
|
39
|
+
principal_id: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
read_only: true,
|
43
|
+
serialized_name: 'principalId',
|
44
|
+
type: {
|
45
|
+
name: 'String'
|
46
|
+
}
|
47
|
+
},
|
48
|
+
tenant_id: {
|
49
|
+
client_side_validation: true,
|
50
|
+
required: false,
|
51
|
+
read_only: true,
|
52
|
+
serialized_name: 'tenantId',
|
53
|
+
type: {
|
54
|
+
name: 'String'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
type: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: false,
|
60
|
+
serialized_name: 'type',
|
61
|
+
type: {
|
62
|
+
name: 'Enum',
|
63
|
+
module: 'ResourceIdentityType'
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,196 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Policy::Mgmt::V2018_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy assignment.
|
10
|
+
#
|
11
|
+
class PolicyAssignment
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The display name of the policy assignment.
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
# @return [String] The ID of the policy definition or policy set
|
19
|
+
# definition being assigned.
|
20
|
+
attr_accessor :policy_definition_id
|
21
|
+
|
22
|
+
# @return [String] The scope for the policy assignment.
|
23
|
+
attr_accessor :scope
|
24
|
+
|
25
|
+
# @return [Array<String>] The policy's excluded scopes.
|
26
|
+
attr_accessor :not_scopes
|
27
|
+
|
28
|
+
# @return Required if a parameter is used in policy rule.
|
29
|
+
attr_accessor :parameters
|
30
|
+
|
31
|
+
# @return [String] This message will be part of response in case of
|
32
|
+
# policy violation.
|
33
|
+
attr_accessor :description
|
34
|
+
|
35
|
+
# @return The policy assignment metadata.
|
36
|
+
attr_accessor :metadata
|
37
|
+
|
38
|
+
# @return [String] The ID of the policy assignment.
|
39
|
+
attr_accessor :id
|
40
|
+
|
41
|
+
# @return [String] The type of the policy assignment.
|
42
|
+
attr_accessor :type
|
43
|
+
|
44
|
+
# @return [String] The name of the policy assignment.
|
45
|
+
attr_accessor :name
|
46
|
+
|
47
|
+
# @return [PolicySku] The policy sku. This property is optional,
|
48
|
+
# obsolete, and will be ignored.
|
49
|
+
attr_accessor :sku
|
50
|
+
|
51
|
+
# @return [String] The location of the policy assignment. Only required
|
52
|
+
# when utilizing managed identity.
|
53
|
+
attr_accessor :location
|
54
|
+
|
55
|
+
# @return [Identity] The managed identity associated with the policy
|
56
|
+
# assignment.
|
57
|
+
attr_accessor :identity
|
58
|
+
|
59
|
+
|
60
|
+
#
|
61
|
+
# Mapper for PolicyAssignment class as Ruby Hash.
|
62
|
+
# This will be used for serialization/deserialization.
|
63
|
+
#
|
64
|
+
def self.mapper()
|
65
|
+
{
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'PolicyAssignment',
|
69
|
+
type: {
|
70
|
+
name: 'Composite',
|
71
|
+
class_name: 'PolicyAssignment',
|
72
|
+
model_properties: {
|
73
|
+
display_name: {
|
74
|
+
client_side_validation: true,
|
75
|
+
required: false,
|
76
|
+
serialized_name: 'properties.displayName',
|
77
|
+
type: {
|
78
|
+
name: 'String'
|
79
|
+
}
|
80
|
+
},
|
81
|
+
policy_definition_id: {
|
82
|
+
client_side_validation: true,
|
83
|
+
required: false,
|
84
|
+
serialized_name: 'properties.policyDefinitionId',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
},
|
89
|
+
scope: {
|
90
|
+
client_side_validation: true,
|
91
|
+
required: false,
|
92
|
+
serialized_name: 'properties.scope',
|
93
|
+
type: {
|
94
|
+
name: 'String'
|
95
|
+
}
|
96
|
+
},
|
97
|
+
not_scopes: {
|
98
|
+
client_side_validation: true,
|
99
|
+
required: false,
|
100
|
+
serialized_name: 'properties.notScopes',
|
101
|
+
type: {
|
102
|
+
name: 'Sequence',
|
103
|
+
element: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
serialized_name: 'StringElementType',
|
107
|
+
type: {
|
108
|
+
name: 'String'
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
},
|
113
|
+
parameters: {
|
114
|
+
client_side_validation: true,
|
115
|
+
required: false,
|
116
|
+
serialized_name: 'properties.parameters',
|
117
|
+
type: {
|
118
|
+
name: 'Object'
|
119
|
+
}
|
120
|
+
},
|
121
|
+
description: {
|
122
|
+
client_side_validation: true,
|
123
|
+
required: false,
|
124
|
+
serialized_name: 'properties.description',
|
125
|
+
type: {
|
126
|
+
name: 'String'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
metadata: {
|
130
|
+
client_side_validation: true,
|
131
|
+
required: false,
|
132
|
+
serialized_name: 'properties.metadata',
|
133
|
+
type: {
|
134
|
+
name: 'Object'
|
135
|
+
}
|
136
|
+
},
|
137
|
+
id: {
|
138
|
+
client_side_validation: true,
|
139
|
+
required: false,
|
140
|
+
read_only: true,
|
141
|
+
serialized_name: 'id',
|
142
|
+
type: {
|
143
|
+
name: 'String'
|
144
|
+
}
|
145
|
+
},
|
146
|
+
type: {
|
147
|
+
client_side_validation: true,
|
148
|
+
required: false,
|
149
|
+
read_only: true,
|
150
|
+
serialized_name: 'type',
|
151
|
+
type: {
|
152
|
+
name: 'String'
|
153
|
+
}
|
154
|
+
},
|
155
|
+
name: {
|
156
|
+
client_side_validation: true,
|
157
|
+
required: false,
|
158
|
+
read_only: true,
|
159
|
+
serialized_name: 'name',
|
160
|
+
type: {
|
161
|
+
name: 'String'
|
162
|
+
}
|
163
|
+
},
|
164
|
+
sku: {
|
165
|
+
client_side_validation: true,
|
166
|
+
required: false,
|
167
|
+
serialized_name: 'sku',
|
168
|
+
type: {
|
169
|
+
name: 'Composite',
|
170
|
+
class_name: 'PolicySku'
|
171
|
+
}
|
172
|
+
},
|
173
|
+
location: {
|
174
|
+
client_side_validation: true,
|
175
|
+
required: false,
|
176
|
+
serialized_name: 'location',
|
177
|
+
type: {
|
178
|
+
name: 'String'
|
179
|
+
}
|
180
|
+
},
|
181
|
+
identity: {
|
182
|
+
client_side_validation: true,
|
183
|
+
required: false,
|
184
|
+
serialized_name: 'identity',
|
185
|
+
type: {
|
186
|
+
name: 'Composite',
|
187
|
+
class_name: 'Identity'
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
}
|
192
|
+
}
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Policy::Mgmt::V2018_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy assignments.
|
10
|
+
#
|
11
|
+
class PolicyAssignmentListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<PolicyAssignment>] An array of policy assignments.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] The URL to use for getting the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<PolicyAssignment>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [PolicyAssignmentListResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for PolicyAssignmentListResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
serialized_name: 'PolicyAssignmentListResult',
|
63
|
+
type: {
|
64
|
+
name: 'Composite',
|
65
|
+
class_name: 'PolicyAssignmentListResult',
|
66
|
+
model_properties: {
|
67
|
+
value: {
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'value',
|
71
|
+
type: {
|
72
|
+
name: 'Sequence',
|
73
|
+
element: {
|
74
|
+
client_side_validation: true,
|
75
|
+
required: false,
|
76
|
+
serialized_name: 'PolicyAssignmentElementType',
|
77
|
+
type: {
|
78
|
+
name: 'Composite',
|
79
|
+
class_name: 'PolicyAssignment'
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
},
|
84
|
+
next_link: {
|
85
|
+
client_side_validation: true,
|
86
|
+
required: false,
|
87
|
+
serialized_name: 'nextLink',
|
88
|
+
type: {
|
89
|
+
name: 'String'
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Policy::Mgmt::V2018_05_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy definition.
|
10
|
+
#
|
11
|
+
class PolicyDefinition
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [PolicyType] The type of policy definition. Possible values are
|
16
|
+
# NotSpecified, BuiltIn, and Custom. Possible values include:
|
17
|
+
# 'NotSpecified', 'BuiltIn', 'Custom'
|
18
|
+
attr_accessor :policy_type
|
19
|
+
|
20
|
+
# @return [PolicyMode] The policy definition mode. Possible values are
|
21
|
+
# NotSpecified, Indexed, and All. Possible values include:
|
22
|
+
# 'NotSpecified', 'Indexed', 'All'
|
23
|
+
attr_accessor :mode
|
24
|
+
|
25
|
+
# @return [String] The display name of the policy definition.
|
26
|
+
attr_accessor :display_name
|
27
|
+
|
28
|
+
# @return [String] The policy definition description.
|
29
|
+
attr_accessor :description
|
30
|
+
|
31
|
+
# @return The policy rule.
|
32
|
+
attr_accessor :policy_rule
|
33
|
+
|
34
|
+
# @return The policy definition metadata.
|
35
|
+
attr_accessor :metadata
|
36
|
+
|
37
|
+
# @return Required if a parameter is used in policy rule.
|
38
|
+
attr_accessor :parameters
|
39
|
+
|
40
|
+
# @return [String] The ID of the policy definition.
|
41
|
+
attr_accessor :id
|
42
|
+
|
43
|
+
# @return [String] The name of the policy definition.
|
44
|
+
attr_accessor :name
|
45
|
+
|
46
|
+
# @return [String] The type of the resource
|
47
|
+
# (Microsoft.Authorization/policyDefinitions).
|
48
|
+
attr_accessor :type
|
49
|
+
|
50
|
+
|
51
|
+
#
|
52
|
+
# Mapper for PolicyDefinition class as Ruby Hash.
|
53
|
+
# This will be used for serialization/deserialization.
|
54
|
+
#
|
55
|
+
def self.mapper()
|
56
|
+
{
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
serialized_name: 'PolicyDefinition',
|
60
|
+
type: {
|
61
|
+
name: 'Composite',
|
62
|
+
class_name: 'PolicyDefinition',
|
63
|
+
model_properties: {
|
64
|
+
policy_type: {
|
65
|
+
client_side_validation: true,
|
66
|
+
required: false,
|
67
|
+
serialized_name: 'properties.policyType',
|
68
|
+
type: {
|
69
|
+
name: 'String'
|
70
|
+
}
|
71
|
+
},
|
72
|
+
mode: {
|
73
|
+
client_side_validation: true,
|
74
|
+
required: false,
|
75
|
+
serialized_name: 'properties.mode',
|
76
|
+
type: {
|
77
|
+
name: 'String'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
display_name: {
|
81
|
+
client_side_validation: true,
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'properties.displayName',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
},
|
88
|
+
description: {
|
89
|
+
client_side_validation: true,
|
90
|
+
required: false,
|
91
|
+
serialized_name: 'properties.description',
|
92
|
+
type: {
|
93
|
+
name: 'String'
|
94
|
+
}
|
95
|
+
},
|
96
|
+
policy_rule: {
|
97
|
+
client_side_validation: true,
|
98
|
+
required: false,
|
99
|
+
serialized_name: 'properties.policyRule',
|
100
|
+
type: {
|
101
|
+
name: 'Object'
|
102
|
+
}
|
103
|
+
},
|
104
|
+
metadata: {
|
105
|
+
client_side_validation: true,
|
106
|
+
required: false,
|
107
|
+
serialized_name: 'properties.metadata',
|
108
|
+
type: {
|
109
|
+
name: 'Object'
|
110
|
+
}
|
111
|
+
},
|
112
|
+
parameters: {
|
113
|
+
client_side_validation: true,
|
114
|
+
required: false,
|
115
|
+
serialized_name: 'properties.parameters',
|
116
|
+
type: {
|
117
|
+
name: 'Object'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
id: {
|
121
|
+
client_side_validation: true,
|
122
|
+
required: false,
|
123
|
+
read_only: true,
|
124
|
+
serialized_name: 'id',
|
125
|
+
type: {
|
126
|
+
name: 'String'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
name: {
|
130
|
+
client_side_validation: true,
|
131
|
+
required: false,
|
132
|
+
read_only: true,
|
133
|
+
serialized_name: 'name',
|
134
|
+
type: {
|
135
|
+
name: 'String'
|
136
|
+
}
|
137
|
+
},
|
138
|
+
type: {
|
139
|
+
client_side_validation: true,
|
140
|
+
required: false,
|
141
|
+
read_only: true,
|
142
|
+
serialized_name: 'type',
|
143
|
+
type: {
|
144
|
+
name: 'String'
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|