azure_mgmt_policy 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-10-01-preview/generated/azure_mgmt_policy/models/policy_definition.rb +1 -0
  3. data/lib/2015-10-01-preview/generated/azure_mgmt_policy/policy_client.rb +7 -6
  4. data/lib/2016-04-01/generated/azure_mgmt_policy/models/policy_definition.rb +1 -0
  5. data/lib/2016-04-01/generated/azure_mgmt_policy/policy_client.rb +7 -6
  6. data/lib/2016-12-01/generated/azure_mgmt_policy/policy_client.rb +7 -6
  7. data/lib/2017-06-01-preview/generated/azure_mgmt_policy/policy_client.rb +7 -6
  8. data/lib/2018-03-01/generated/azure_mgmt_policy.rb +41 -0
  9. data/lib/2018-03-01/generated/azure_mgmt_policy/models/error_response.rb +69 -0
  10. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_assignment.rb +171 -0
  11. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb +98 -0
  12. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_definition.rb +153 -0
  13. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb +98 -0
  14. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb +58 -0
  15. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_mode.rb +17 -0
  16. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_set_definition.rb +151 -0
  17. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb +99 -0
  18. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_sku.rb +59 -0
  19. data/lib/2018-03-01/generated/azure_mgmt_policy/models/policy_type.rb +17 -0
  20. data/lib/2018-03-01/generated/azure_mgmt_policy/module_definition.rb +9 -0
  21. data/lib/2018-03-01/generated/azure_mgmt_policy/policy_assignments.rb +1885 -0
  22. data/lib/2018-03-01/generated/azure_mgmt_policy/policy_client.rb +139 -0
  23. data/lib/2018-03-01/generated/azure_mgmt_policy/policy_definitions.rb +1365 -0
  24. data/lib/2018-03-01/generated/azure_mgmt_policy/policy_set_definitions.rb +1388 -0
  25. data/lib/azure_mgmt_policy.rb +2 -1
  26. data/lib/profiles/latest/modules/policy_profile_module.rb +36 -44
  27. data/lib/version.rb +1 -1
  28. metadata +22 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 071b59a08764be99873e22c7b98f6ad765989d53
4
- data.tar.gz: 62d86f9b1ee0fc8f477958c07b7eed173a4ad933
3
+ metadata.gz: 17a2ddd5c080a8789f4d32c25811518389e5f57f
4
+ data.tar.gz: 86e9be123b5c83be3e47871a5641851ca41449ee
5
5
  SHA512:
6
- metadata.gz: 934f433954392083abcffc5eba85be393959c3dd3f417780c21dfe1bc2fe43f8acd700f0e4375e1beb7a462ce7b461c9fc07c67061d0ee2f8e665a5e34dab8a1
7
- data.tar.gz: 89511031dd7b1c6844aee30c87f150461c0b8381344c7d0936d6ca457ecd1886eea73a189dd88b42d1cc303155b9db8df3b2c0c937063f16618002f865894865
6
+ metadata.gz: 42358ce53b2ebddb54ffbc672861afabd18bfd174c281e0ab6a96e6f592efdb65b0f41872eee08f9e3239dc9b3ce5eaf3c8a85457c30e860c789fe4aa3c7d845
7
+ data.tar.gz: ce4cb193697fe8767955cc65a3f0333eeba2e8e9867e683f2e094ef57b949069390babfdde4bfbada291510cd618426ef7f8caa341ebb3eb6b642fffab5114b7
@@ -83,6 +83,7 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
83
83
  id: {
84
84
  client_side_validation: true,
85
85
  required: false,
86
+ read_only: true,
86
87
  serialized_name: 'id',
87
88
  type: {
88
89
  name: 'String'
@@ -23,15 +23,16 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
23
23
  # @return [String] The API version to use for the operation.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [PolicyAssignments] policy_assignments
@@ -127,7 +128,7 @@ module Azure::Policy::Mgmt::V2015_10_01_preview
127
128
  #
128
129
  def add_telemetry
129
130
  sdk_information = 'azure_mgmt_policy'
130
- sdk_information = "#{sdk_information}/0.16.0"
131
+ sdk_information = "#{sdk_information}/0.17.0"
131
132
  add_user_agent_information(sdk_information)
132
133
  end
133
134
  end
@@ -83,6 +83,7 @@ module Azure::Policy::Mgmt::V2016_04_01
83
83
  id: {
84
84
  client_side_validation: true,
85
85
  required: false,
86
+ read_only: true,
86
87
  serialized_name: 'id',
87
88
  type: {
88
89
  name: 'String'
@@ -23,15 +23,16 @@ module Azure::Policy::Mgmt::V2016_04_01
23
23
  # @return [String] The API version to use for the operation.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [PolicyAssignments] policy_assignments
@@ -127,7 +128,7 @@ module Azure::Policy::Mgmt::V2016_04_01
127
128
  #
128
129
  def add_telemetry
129
130
  sdk_information = 'azure_mgmt_policy'
130
- sdk_information = "#{sdk_information}/0.16.0"
131
+ sdk_information = "#{sdk_information}/0.17.0"
131
132
  add_user_agent_information(sdk_information)
132
133
  end
133
134
  end
@@ -23,15 +23,16 @@ module Azure::Policy::Mgmt::V2016_12_01
23
23
  # @return [String] The API version to use for the operation.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [PolicyDefinitions] policy_definitions
@@ -127,7 +128,7 @@ module Azure::Policy::Mgmt::V2016_12_01
127
128
  #
128
129
  def add_telemetry
129
130
  sdk_information = 'azure_mgmt_policy'
130
- sdk_information = "#{sdk_information}/0.16.0"
131
+ sdk_information = "#{sdk_information}/0.17.0"
131
132
  add_user_agent_information(sdk_information)
132
133
  end
133
134
  end
@@ -23,15 +23,16 @@ module Azure::Policy::Mgmt::V2017_06_01_preview
23
23
  # @return [String] The API version to use for the operation.
24
24
  attr_reader :api_version
25
25
 
26
- # @return [String] Gets or sets the preferred language for the response.
26
+ # @return [String] The preferred language for the response.
27
27
  attr_accessor :accept_language
28
28
 
29
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
30
- # Running Operations. Default value is 30.
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
31
  attr_accessor :long_running_operation_retry_timeout
32
32
 
33
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
34
- # is generated and included in each request. Default is true.
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
35
36
  attr_accessor :generate_client_request_id
36
37
 
37
38
  # @return [PolicyAssignments] policy_assignments
@@ -127,7 +128,7 @@ module Azure::Policy::Mgmt::V2017_06_01_preview
127
128
  #
128
129
  def add_telemetry
129
130
  sdk_information = 'azure_mgmt_policy'
130
- sdk_information = "#{sdk_information}/0.16.0"
131
+ sdk_information = "#{sdk_information}/0.17.0"
131
132
  add_user_agent_information(sdk_information)
132
133
  end
133
134
  end
@@ -0,0 +1,41 @@
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 '2018-03-01/generated/azure_mgmt_policy/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Policy::Mgmt::V2018_03_01
23
+ autoload :PolicyAssignments, '2018-03-01/generated/azure_mgmt_policy/policy_assignments.rb'
24
+ autoload :PolicyDefinitions, '2018-03-01/generated/azure_mgmt_policy/policy_definitions.rb'
25
+ autoload :PolicySetDefinitions, '2018-03-01/generated/azure_mgmt_policy/policy_set_definitions.rb'
26
+ autoload :PolicyClient, '2018-03-01/generated/azure_mgmt_policy/policy_client.rb'
27
+
28
+ module Models
29
+ autoload :PolicyDefinition, '2018-03-01/generated/azure_mgmt_policy/models/policy_definition.rb'
30
+ autoload :PolicyDefinitionListResult, '2018-03-01/generated/azure_mgmt_policy/models/policy_definition_list_result.rb'
31
+ autoload :PolicyAssignment, '2018-03-01/generated/azure_mgmt_policy/models/policy_assignment.rb'
32
+ autoload :PolicyDefinitionReference, '2018-03-01/generated/azure_mgmt_policy/models/policy_definition_reference.rb'
33
+ autoload :ErrorResponse, '2018-03-01/generated/azure_mgmt_policy/models/error_response.rb'
34
+ autoload :PolicySetDefinition, '2018-03-01/generated/azure_mgmt_policy/models/policy_set_definition.rb'
35
+ autoload :PolicyAssignmentListResult, '2018-03-01/generated/azure_mgmt_policy/models/policy_assignment_list_result.rb'
36
+ autoload :PolicySetDefinitionListResult, '2018-03-01/generated/azure_mgmt_policy/models/policy_set_definition_list_result.rb'
37
+ autoload :PolicySku, '2018-03-01/generated/azure_mgmt_policy/models/policy_sku.rb'
38
+ autoload :PolicyType, '2018-03-01/generated/azure_mgmt_policy/models/policy_type.rb'
39
+ autoload :PolicyMode, '2018-03-01/generated/azure_mgmt_policy/models/policy_mode.rb'
40
+ end
41
+ 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::V2018_03_01
7
+ module Models
8
+ #
9
+ # Error reponse indicates Azure Resource Manager is not able to process the
10
+ # 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,171 @@
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_03_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
+
52
+ #
53
+ # Mapper for PolicyAssignment class as Ruby Hash.
54
+ # This will be used for serialization/deserialization.
55
+ #
56
+ def self.mapper()
57
+ {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'PolicyAssignment',
61
+ type: {
62
+ name: 'Composite',
63
+ class_name: 'PolicyAssignment',
64
+ model_properties: {
65
+ display_name: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ serialized_name: 'properties.displayName',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ },
73
+ policy_definition_id: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'properties.policyDefinitionId',
77
+ type: {
78
+ name: 'String'
79
+ }
80
+ },
81
+ scope: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'properties.scope',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ },
89
+ not_scopes: {
90
+ client_side_validation: true,
91
+ required: false,
92
+ serialized_name: 'properties.notScopes',
93
+ type: {
94
+ name: 'Sequence',
95
+ element: {
96
+ client_side_validation: true,
97
+ required: false,
98
+ serialized_name: 'StringElementType',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ }
103
+ }
104
+ },
105
+ parameters: {
106
+ client_side_validation: true,
107
+ required: false,
108
+ serialized_name: 'properties.parameters',
109
+ type: {
110
+ name: 'Object'
111
+ }
112
+ },
113
+ description: {
114
+ client_side_validation: true,
115
+ required: false,
116
+ serialized_name: 'properties.description',
117
+ type: {
118
+ name: 'String'
119
+ }
120
+ },
121
+ metadata: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ serialized_name: 'properties.metadata',
125
+ type: {
126
+ name: 'Object'
127
+ }
128
+ },
129
+ id: {
130
+ client_side_validation: true,
131
+ required: false,
132
+ read_only: true,
133
+ serialized_name: 'id',
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
+ name: {
148
+ client_side_validation: true,
149
+ required: false,
150
+ read_only: true,
151
+ serialized_name: 'name',
152
+ type: {
153
+ name: 'String'
154
+ }
155
+ },
156
+ sku: {
157
+ client_side_validation: true,
158
+ required: false,
159
+ serialized_name: 'sku',
160
+ type: {
161
+ name: 'Composite',
162
+ class_name: 'PolicySku'
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ end
169
+ end
170
+ end
171
+ 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_03_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