azure_mgmt_policy 0.17.4 → 0.17.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_assignments.rb +24 -0
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_definitions.rb +10 -0
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_assignments.rb +24 -0
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2016-04-01/generated/azure_mgmt_policy/policy_definitions.rb +10 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_assignments.rb +24 -0
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_policy/policy_definitions.rb +26 -0
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_assignments.rb +24 -0
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_set_definitions.rb +26 -0
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_assignments.rb +101 -84
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_definitions.rb +26 -0
- data/lib/2018-03-01/generated/azure_mgmt_policy/policy_set_definitions.rb +26 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_assignments.rb +101 -84
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_client.rb +1 -1
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_definitions.rb +26 -0
- data/lib/2018-05-01/generated/azure_mgmt_policy/policy_set_definitions.rb +26 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy.rb +42 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/error_response.rb +69 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/identity.rb +72 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_assignment.rb +196 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +98 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_definition.rb +152 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +98 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb +58 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_set_definition.rb +151 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +99 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_sku.rb +59 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/models/resource_identity_type.rb +16 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/policy_assignments.rb +1902 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/policy_client.rb +139 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/policy_definitions.rb +1391 -0
- data/lib/2019-01-01/generated/azure_mgmt_policy/policy_set_definitions.rb +1414 -0
- 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/2019-09-01/generated/azure_mgmt_policy.rb +49 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/enforcement_mode.rb +16 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/error_additional_info.rb +59 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/error_response.rb +113 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/identity.rb +73 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/parameter_definitions_value.rb +91 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/parameter_definitions_value_metadata.rb +76 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/parameter_type.rb +21 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/parameter_values_value.rb +46 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_assignment.rb +220 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +98 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_definition.rb +164 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_definition_group.rb +91 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +98 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb +100 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_set_definition.rb +182 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +99 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_sku.rb +59 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/policy_type.rb +18 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/models/resource_identity_type.rb +16 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/policy_assignments.rb +2179 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/policy_client.rb +139 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/policy_definitions.rb +1391 -0
- data/lib/2019-09-01/generated/azure_mgmt_policy/policy_set_definitions.rb +1414 -0
- data/lib/azure_mgmt_policy.rb +6 -3
- data/lib/profiles/latest/modules/policy_profile_module.rb +32 -32
- data/lib/version.rb +1 -1
- metadata +67 -5
@@ -0,0 +1,43 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-06-01/generated/azure_mgmt_policy/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Policy::Mgmt::V2019_06_01
|
23
|
+
autoload :PolicyAssignments, '2019-06-01/generated/azure_mgmt_policy/policy_assignments.rb'
|
24
|
+
autoload :PolicyDefinitions, '2019-06-01/generated/azure_mgmt_policy/policy_definitions.rb'
|
25
|
+
autoload :PolicySetDefinitions, '2019-06-01/generated/azure_mgmt_policy/policy_set_definitions.rb'
|
26
|
+
autoload :PolicyClient, '2019-06-01/generated/azure_mgmt_policy/policy_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :PolicyDefinition, '2019-06-01/generated/azure_mgmt_policy/models/policy_definition.rb'
|
30
|
+
autoload :PolicySku, '2019-06-01/generated/azure_mgmt_policy/models/policy_sku.rb'
|
31
|
+
autoload :PolicyDefinitionListResult, '2019-06-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
|
32
|
+
autoload :PolicyAssignment, '2019-06-01/generated/azure_mgmt_policy/models/policy_assignment.rb'
|
33
|
+
autoload :PolicyDefinitionReference, '2019-06-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb'
|
34
|
+
autoload :ErrorResponse, '2019-06-01/generated/azure_mgmt_policy/models/error_response.rb'
|
35
|
+
autoload :PolicySetDefinition, '2019-06-01/generated/azure_mgmt_policy/models/policy_set_definition.rb'
|
36
|
+
autoload :PolicyAssignmentListResult, '2019-06-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
|
37
|
+
autoload :PolicySetDefinitionListResult, '2019-06-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb'
|
38
|
+
autoload :Identity, '2019-06-01/generated/azure_mgmt_policy/models/identity.rb'
|
39
|
+
autoload :EnforcementMode, '2019-06-01/generated/azure_mgmt_policy/models/enforcement_mode.rb'
|
40
|
+
autoload :ResourceIdentityType, '2019-06-01/generated/azure_mgmt_policy/models/resource_identity_type.rb'
|
41
|
+
autoload :PolicyType, '2019-06-01/generated/azure_mgmt_policy/models/policy_type.rb'
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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
|
+
# Defines values for EnforcementMode
|
10
|
+
#
|
11
|
+
module EnforcementMode
|
12
|
+
Default = "Default"
|
13
|
+
DoNotEnforce = "DoNotEnforce"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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
|
+
# Error response indicates Azure Resource Manager is not able to process
|
10
|
+
# the incoming request. The reason is provided in the error message.
|
11
|
+
#
|
12
|
+
class ErrorResponse
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Http status code.
|
17
|
+
attr_accessor :http_status
|
18
|
+
|
19
|
+
# @return [String] Error code.
|
20
|
+
attr_accessor :error_code
|
21
|
+
|
22
|
+
# @return [String] Error message indicating why the operation failed.
|
23
|
+
attr_accessor :error_message
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for ErrorResponse 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: 'ErrorResponse',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'ErrorResponse',
|
38
|
+
model_properties: {
|
39
|
+
http_status: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'httpStatus',
|
43
|
+
type: {
|
44
|
+
name: 'String'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
error_code: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
serialized_name: 'errorCode',
|
51
|
+
type: {
|
52
|
+
name: 'String'
|
53
|
+
}
|
54
|
+
},
|
55
|
+
error_message: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'errorMessage',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -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::V2019_06_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,209 @@
|
|
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 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 [EnforcementMode] The policy assignment enforcement mode.
|
39
|
+
# Possible values are Default and DoNotEnforce. Possible values include:
|
40
|
+
# 'Default', 'DoNotEnforce'
|
41
|
+
attr_accessor :enforcement_mode
|
42
|
+
|
43
|
+
# @return [String] The ID of the policy assignment.
|
44
|
+
attr_accessor :id
|
45
|
+
|
46
|
+
# @return [String] The type of the policy assignment.
|
47
|
+
attr_accessor :type
|
48
|
+
|
49
|
+
# @return [String] The name of the policy assignment.
|
50
|
+
attr_accessor :name
|
51
|
+
|
52
|
+
# @return [PolicySku] The policy sku. This property is optional,
|
53
|
+
# obsolete, and will be ignored.
|
54
|
+
attr_accessor :sku
|
55
|
+
|
56
|
+
# @return [String] The location of the policy assignment. Only required
|
57
|
+
# when utilizing managed identity.
|
58
|
+
attr_accessor :location
|
59
|
+
|
60
|
+
# @return [Identity] The managed identity associated with the policy
|
61
|
+
# assignment.
|
62
|
+
attr_accessor :identity
|
63
|
+
|
64
|
+
|
65
|
+
#
|
66
|
+
# Mapper for PolicyAssignment class as Ruby Hash.
|
67
|
+
# This will be used for serialization/deserialization.
|
68
|
+
#
|
69
|
+
def self.mapper()
|
70
|
+
{
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'PolicyAssignment',
|
74
|
+
type: {
|
75
|
+
name: 'Composite',
|
76
|
+
class_name: 'PolicyAssignment',
|
77
|
+
model_properties: {
|
78
|
+
display_name: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: false,
|
81
|
+
serialized_name: 'properties.displayName',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
},
|
86
|
+
policy_definition_id: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
serialized_name: 'properties.policyDefinitionId',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
scope: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: 'properties.scope',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
},
|
102
|
+
not_scopes: {
|
103
|
+
client_side_validation: true,
|
104
|
+
required: false,
|
105
|
+
serialized_name: 'properties.notScopes',
|
106
|
+
type: {
|
107
|
+
name: 'Sequence',
|
108
|
+
element: {
|
109
|
+
client_side_validation: true,
|
110
|
+
required: false,
|
111
|
+
serialized_name: 'StringElementType',
|
112
|
+
type: {
|
113
|
+
name: 'String'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
parameters: {
|
119
|
+
client_side_validation: true,
|
120
|
+
required: false,
|
121
|
+
serialized_name: 'properties.parameters',
|
122
|
+
type: {
|
123
|
+
name: 'Object'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
description: {
|
127
|
+
client_side_validation: true,
|
128
|
+
required: false,
|
129
|
+
serialized_name: 'properties.description',
|
130
|
+
type: {
|
131
|
+
name: 'String'
|
132
|
+
}
|
133
|
+
},
|
134
|
+
metadata: {
|
135
|
+
client_side_validation: true,
|
136
|
+
required: false,
|
137
|
+
serialized_name: 'properties.metadata',
|
138
|
+
type: {
|
139
|
+
name: 'Object'
|
140
|
+
}
|
141
|
+
},
|
142
|
+
enforcement_mode: {
|
143
|
+
client_side_validation: true,
|
144
|
+
required: false,
|
145
|
+
serialized_name: 'properties.enforcementMode',
|
146
|
+
type: {
|
147
|
+
name: 'String'
|
148
|
+
}
|
149
|
+
},
|
150
|
+
id: {
|
151
|
+
client_side_validation: true,
|
152
|
+
required: false,
|
153
|
+
read_only: true,
|
154
|
+
serialized_name: 'id',
|
155
|
+
type: {
|
156
|
+
name: 'String'
|
157
|
+
}
|
158
|
+
},
|
159
|
+
type: {
|
160
|
+
client_side_validation: true,
|
161
|
+
required: false,
|
162
|
+
read_only: true,
|
163
|
+
serialized_name: 'type',
|
164
|
+
type: {
|
165
|
+
name: 'String'
|
166
|
+
}
|
167
|
+
},
|
168
|
+
name: {
|
169
|
+
client_side_validation: true,
|
170
|
+
required: false,
|
171
|
+
read_only: true,
|
172
|
+
serialized_name: 'name',
|
173
|
+
type: {
|
174
|
+
name: 'String'
|
175
|
+
}
|
176
|
+
},
|
177
|
+
sku: {
|
178
|
+
client_side_validation: true,
|
179
|
+
required: false,
|
180
|
+
serialized_name: 'sku',
|
181
|
+
type: {
|
182
|
+
name: 'Composite',
|
183
|
+
class_name: 'PolicySku'
|
184
|
+
}
|
185
|
+
},
|
186
|
+
location: {
|
187
|
+
client_side_validation: true,
|
188
|
+
required: false,
|
189
|
+
serialized_name: 'location',
|
190
|
+
type: {
|
191
|
+
name: 'String'
|
192
|
+
}
|
193
|
+
},
|
194
|
+
identity: {
|
195
|
+
client_side_validation: true,
|
196
|
+
required: false,
|
197
|
+
serialized_name: 'identity',
|
198
|
+
type: {
|
199
|
+
name: 'Composite',
|
200
|
+
class_name: 'Identity'
|
201
|
+
}
|
202
|
+
}
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
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 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
|