azure_mgmt_policy 0.17.5 → 0.17.6
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 +4 -4
- 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_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2019-01-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2019-06-01/generated/azure_mgmt_policy.rb +43 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/enforcement_mode.rb +16 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/error_response.rb +69 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/identity.rb +72 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_assignment.rb +209 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +98 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_definition.rb +152 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +98 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb +58 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_set_definition.rb +151 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +99 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_sku.rb +59 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/models/resource_identity_type.rb +16 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/policy_assignments.rb +1902 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/policy_client.rb +139 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/policy_definitions.rb +1391 -0
- data/lib/2019-06-01/generated/azure_mgmt_policy/policy_set_definitions.rb +1414 -0
- data/lib/azure_mgmt_policy.rb +1 -0
- data/lib/profiles/latest/modules/policy_profile_module.rb +32 -28
- data/lib/version.rb +1 -1
- metadata +21 -2
@@ -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::V2019_06_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 && !page.next_link.strip.empty? 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,152 @@
|
|
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::V2019_06_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 [String] The policy definition mode. Some examples are All,
|
21
|
+
# Indexed, Microsoft.KeyVault.Data.
|
22
|
+
attr_accessor :mode
|
23
|
+
|
24
|
+
# @return [String] The display name of the policy definition.
|
25
|
+
attr_accessor :display_name
|
26
|
+
|
27
|
+
# @return [String] The policy definition description.
|
28
|
+
attr_accessor :description
|
29
|
+
|
30
|
+
# @return The policy rule.
|
31
|
+
attr_accessor :policy_rule
|
32
|
+
|
33
|
+
# @return The policy definition metadata.
|
34
|
+
attr_accessor :metadata
|
35
|
+
|
36
|
+
# @return Required if a parameter is used in policy rule.
|
37
|
+
attr_accessor :parameters
|
38
|
+
|
39
|
+
# @return [String] The ID of the policy definition.
|
40
|
+
attr_accessor :id
|
41
|
+
|
42
|
+
# @return [String] The name of the policy definition.
|
43
|
+
attr_accessor :name
|
44
|
+
|
45
|
+
# @return [String] The type of the resource
|
46
|
+
# (Microsoft.Authorization/policyDefinitions).
|
47
|
+
attr_accessor :type
|
48
|
+
|
49
|
+
|
50
|
+
#
|
51
|
+
# Mapper for PolicyDefinition class as Ruby Hash.
|
52
|
+
# This will be used for serialization/deserialization.
|
53
|
+
#
|
54
|
+
def self.mapper()
|
55
|
+
{
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'PolicyDefinition',
|
59
|
+
type: {
|
60
|
+
name: 'Composite',
|
61
|
+
class_name: 'PolicyDefinition',
|
62
|
+
model_properties: {
|
63
|
+
policy_type: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
serialized_name: 'properties.policyType',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
mode: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'properties.mode',
|
75
|
+
type: {
|
76
|
+
name: 'String'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
display_name: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
serialized_name: 'properties.displayName',
|
83
|
+
type: {
|
84
|
+
name: 'String'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
description: {
|
88
|
+
client_side_validation: true,
|
89
|
+
required: false,
|
90
|
+
serialized_name: 'properties.description',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
},
|
95
|
+
policy_rule: {
|
96
|
+
client_side_validation: true,
|
97
|
+
required: false,
|
98
|
+
serialized_name: 'properties.policyRule',
|
99
|
+
type: {
|
100
|
+
name: 'Object'
|
101
|
+
}
|
102
|
+
},
|
103
|
+
metadata: {
|
104
|
+
client_side_validation: true,
|
105
|
+
required: false,
|
106
|
+
serialized_name: 'properties.metadata',
|
107
|
+
type: {
|
108
|
+
name: 'Object'
|
109
|
+
}
|
110
|
+
},
|
111
|
+
parameters: {
|
112
|
+
client_side_validation: true,
|
113
|
+
required: false,
|
114
|
+
serialized_name: 'properties.parameters',
|
115
|
+
type: {
|
116
|
+
name: 'Object'
|
117
|
+
}
|
118
|
+
},
|
119
|
+
id: {
|
120
|
+
client_side_validation: true,
|
121
|
+
required: false,
|
122
|
+
read_only: true,
|
123
|
+
serialized_name: 'id',
|
124
|
+
type: {
|
125
|
+
name: 'String'
|
126
|
+
}
|
127
|
+
},
|
128
|
+
name: {
|
129
|
+
client_side_validation: true,
|
130
|
+
required: false,
|
131
|
+
read_only: true,
|
132
|
+
serialized_name: 'name',
|
133
|
+
type: {
|
134
|
+
name: 'String'
|
135
|
+
}
|
136
|
+
},
|
137
|
+
type: {
|
138
|
+
client_side_validation: true,
|
139
|
+
required: false,
|
140
|
+
read_only: true,
|
141
|
+
serialized_name: 'type',
|
142
|
+
type: {
|
143
|
+
name: 'String'
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
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::V2019_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of policy definitions.
|
10
|
+
#
|
11
|
+
class PolicyDefinitionListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<PolicyDefinition>] An array of policy definitions.
|
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<PolicyDefinition>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil && !page.next_link.strip.empty? 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 [PolicyDefinitionListResult] 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 PolicyDefinitionListResult 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: 'PolicyDefinitionListResult',
|
63
|
+
type: {
|
64
|
+
name: 'Composite',
|
65
|
+
class_name: 'PolicyDefinitionListResult',
|
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: 'PolicyDefinitionElementType',
|
77
|
+
type: {
|
78
|
+
name: 'Composite',
|
79
|
+
class_name: 'PolicyDefinition'
|
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,58 @@
|
|
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::V2019_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy definition reference.
|
10
|
+
#
|
11
|
+
class PolicyDefinitionReference
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The ID of the policy definition or policy set
|
16
|
+
# definition.
|
17
|
+
attr_accessor :policy_definition_id
|
18
|
+
|
19
|
+
# @return Required if a parameter is used in policy rule.
|
20
|
+
attr_accessor :parameters
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for PolicyDefinitionReference class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'PolicyDefinitionReference',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'PolicyDefinitionReference',
|
35
|
+
model_properties: {
|
36
|
+
policy_definition_id: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'policyDefinitionId',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
parameters: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'parameters',
|
48
|
+
type: {
|
49
|
+
name: 'Object'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,151 @@
|
|
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::V2019_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The policy set definition.
|
10
|
+
#
|
11
|
+
class PolicySetDefinition
|
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 [String] The display name of the policy set definition.
|
21
|
+
attr_accessor :display_name
|
22
|
+
|
23
|
+
# @return [String] The policy set definition description.
|
24
|
+
attr_accessor :description
|
25
|
+
|
26
|
+
# @return The policy set definition metadata.
|
27
|
+
attr_accessor :metadata
|
28
|
+
|
29
|
+
# @return The policy set definition parameters that can be used in policy
|
30
|
+
# definition references.
|
31
|
+
attr_accessor :parameters
|
32
|
+
|
33
|
+
# @return [Array<PolicyDefinitionReference>] An array of policy
|
34
|
+
# definition references.
|
35
|
+
attr_accessor :policy_definitions
|
36
|
+
|
37
|
+
# @return [String] The ID of the policy set definition.
|
38
|
+
attr_accessor :id
|
39
|
+
|
40
|
+
# @return [String] The name of the policy set definition.
|
41
|
+
attr_accessor :name
|
42
|
+
|
43
|
+
# @return [String] The type of the resource
|
44
|
+
# (Microsoft.Authorization/policySetDefinitions).
|
45
|
+
attr_accessor :type
|
46
|
+
|
47
|
+
|
48
|
+
#
|
49
|
+
# Mapper for PolicySetDefinition class as Ruby Hash.
|
50
|
+
# This will be used for serialization/deserialization.
|
51
|
+
#
|
52
|
+
def self.mapper()
|
53
|
+
{
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
serialized_name: 'PolicySetDefinition',
|
57
|
+
type: {
|
58
|
+
name: 'Composite',
|
59
|
+
class_name: 'PolicySetDefinition',
|
60
|
+
model_properties: {
|
61
|
+
policy_type: {
|
62
|
+
client_side_validation: true,
|
63
|
+
required: false,
|
64
|
+
serialized_name: 'properties.policyType',
|
65
|
+
type: {
|
66
|
+
name: 'String'
|
67
|
+
}
|
68
|
+
},
|
69
|
+
display_name: {
|
70
|
+
client_side_validation: true,
|
71
|
+
required: false,
|
72
|
+
serialized_name: 'properties.displayName',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
description: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: false,
|
80
|
+
serialized_name: 'properties.description',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
metadata: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'properties.metadata',
|
89
|
+
type: {
|
90
|
+
name: 'Object'
|
91
|
+
}
|
92
|
+
},
|
93
|
+
parameters: {
|
94
|
+
client_side_validation: true,
|
95
|
+
required: false,
|
96
|
+
serialized_name: 'properties.parameters',
|
97
|
+
type: {
|
98
|
+
name: 'Object'
|
99
|
+
}
|
100
|
+
},
|
101
|
+
policy_definitions: {
|
102
|
+
client_side_validation: true,
|
103
|
+
required: true,
|
104
|
+
serialized_name: 'properties.policyDefinitions',
|
105
|
+
type: {
|
106
|
+
name: 'Sequence',
|
107
|
+
element: {
|
108
|
+
client_side_validation: true,
|
109
|
+
required: false,
|
110
|
+
serialized_name: 'PolicyDefinitionReferenceElementType',
|
111
|
+
type: {
|
112
|
+
name: 'Composite',
|
113
|
+
class_name: 'PolicyDefinitionReference'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
id: {
|
119
|
+
client_side_validation: true,
|
120
|
+
required: false,
|
121
|
+
read_only: true,
|
122
|
+
serialized_name: 'id',
|
123
|
+
type: {
|
124
|
+
name: 'String'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
name: {
|
128
|
+
client_side_validation: true,
|
129
|
+
required: false,
|
130
|
+
read_only: true,
|
131
|
+
serialized_name: 'name',
|
132
|
+
type: {
|
133
|
+
name: 'String'
|
134
|
+
}
|
135
|
+
},
|
136
|
+
type: {
|
137
|
+
client_side_validation: true,
|
138
|
+
required: false,
|
139
|
+
read_only: true,
|
140
|
+
serialized_name: 'type',
|
141
|
+
type: {
|
142
|
+
name: 'String'
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|