azure_mgmt_resources 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/azure_mgmt_resources.gemspec +2 -7
  3. data/lib/azure_mgmt_resources.rb +21 -18
  4. data/lib/azure_mgmt_resources/deployment_operations.rb +54 -135
  5. data/lib/azure_mgmt_resources/deployments.rb +314 -305
  6. data/lib/azure_mgmt_resources/models/basic_dependency.rb +1 -3
  7. data/lib/azure_mgmt_resources/models/dependency.rb +4 -6
  8. data/lib/azure_mgmt_resources/models/deployment.rb +1 -3
  9. data/lib/azure_mgmt_resources/models/deployment_extended.rb +8 -9
  10. data/lib/azure_mgmt_resources/models/deployment_extended_filter.rb +1 -3
  11. data/lib/azure_mgmt_resources/models/deployment_list_result.rb +4 -6
  12. data/lib/azure_mgmt_resources/models/deployment_mode.rb +2 -1
  13. data/lib/azure_mgmt_resources/models/deployment_operation.rb +1 -3
  14. data/lib/azure_mgmt_resources/models/deployment_operation_properties.rb +1 -3
  15. data/lib/azure_mgmt_resources/models/deployment_operations_list_result.rb +4 -6
  16. data/lib/azure_mgmt_resources/models/deployment_properties.rb +3 -5
  17. data/lib/azure_mgmt_resources/models/deployment_properties_extended.rb +9 -11
  18. data/lib/azure_mgmt_resources/models/deployment_validate_result.rb +1 -3
  19. data/lib/azure_mgmt_resources/models/generic_resource.rb +1 -3
  20. data/lib/azure_mgmt_resources/models/generic_resource_filter.rb +1 -3
  21. data/lib/azure_mgmt_resources/models/parameters_link.rb +2 -4
  22. data/lib/azure_mgmt_resources/models/plan.rb +1 -3
  23. data/lib/azure_mgmt_resources/models/policy_assignment.rb +72 -0
  24. data/lib/azure_mgmt_resources/models/policy_assignment_list_result.rb +86 -0
  25. data/lib/azure_mgmt_resources/models/policy_assignment_properties.rb +74 -0
  26. data/lib/azure_mgmt_resources/models/policy_definition.rb +72 -0
  27. data/lib/azure_mgmt_resources/models/policy_definition_properties.rb +74 -0
  28. data/lib/azure_mgmt_resources/models/provider.rb +4 -6
  29. data/lib/azure_mgmt_resources/models/provider_list_result.rb +4 -6
  30. data/lib/azure_mgmt_resources/models/provider_resource_type.rb +1 -3
  31. data/lib/azure_mgmt_resources/models/resource_group.rb +8 -9
  32. data/lib/azure_mgmt_resources/models/resource_group_filter.rb +1 -3
  33. data/lib/azure_mgmt_resources/models/resource_group_list_result.rb +11 -12
  34. data/lib/azure_mgmt_resources/models/resource_group_properties.rb +1 -3
  35. data/lib/azure_mgmt_resources/models/resource_list_result.rb +11 -12
  36. data/lib/azure_mgmt_resources/models/resource_management_error.rb +3 -4
  37. data/lib/azure_mgmt_resources/models/resource_management_error_with_details.rb +23 -35
  38. data/lib/azure_mgmt_resources/models/resource_provider_operation_definition.rb +1 -3
  39. data/lib/azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb +4 -6
  40. data/lib/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +1 -3
  41. data/lib/azure_mgmt_resources/models/resources_move_info.rb +1 -3
  42. data/lib/azure_mgmt_resources/models/tag_count.rb +1 -3
  43. data/lib/azure_mgmt_resources/models/tag_details.rb +4 -6
  44. data/lib/azure_mgmt_resources/models/tag_value.rb +1 -3
  45. data/lib/azure_mgmt_resources/models/tags_list_result.rb +11 -12
  46. data/lib/azure_mgmt_resources/models/target_resource.rb +1 -3
  47. data/lib/azure_mgmt_resources/models/template_link.rb +2 -4
  48. data/lib/azure_mgmt_resources/module_definition.rb +5 -3
  49. data/lib/azure_mgmt_resources/policy_assignments.rb +922 -0
  50. data/lib/azure_mgmt_resources/policy_definitions.rb +208 -0
  51. data/lib/azure_mgmt_resources/providers.rb +90 -219
  52. data/lib/azure_mgmt_resources/resource_groups.rb +166 -434
  53. data/lib/azure_mgmt_resources/resource_management_client.rb +25 -10
  54. data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +88 -43
  55. data/lib/azure_mgmt_resources/resources.rb +162 -366
  56. data/lib/azure_mgmt_resources/tags.rb +110 -264
  57. data/lib/azure_mgmt_resources/version.rb +5 -3
  58. metadata +12 -86
  59. data/.travis.yml +0 -3
  60. data/Gemfile +0 -14
  61. data/lib/azure_mgmt_resources/models/resource_group_extended.rb +0 -113
  62. data/lib/azure_mgmt_resources/models/resource_group_extended_filter.rb +0 -63
  63. data/lib/azure_mgmt_resources/models/resource_group_format_resource_properties.rb +0 -54
@@ -0,0 +1,86 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Policy assignment list operation result.
10
+ #
11
+ class PolicyAssignmentListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<PolicyAssignment>] Policy assignment list.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Gets or sets the URL to get the next set of policy
19
+ # assignment results.
20
+ attr_accessor :next_link
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.value
39
+ unless serialized_property.nil?
40
+ serializedArray = []
41
+ serialized_property.each do |element|
42
+ unless element.nil?
43
+ element = PolicyAssignment.serialize_object(element)
44
+ end
45
+ serializedArray.push(element)
46
+ end
47
+ serialized_property = serializedArray
48
+ end
49
+ output_object['value'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.next_link
52
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
53
+
54
+ output_object
55
+ end
56
+
57
+ #
58
+ # Deserializes given Ruby Hash into Model object.
59
+ # @param object [Hash] Ruby Hash object to deserialize.
60
+ # @return [PolicyAssignmentListResult] Deserialized object.
61
+ #
62
+ def self.deserialize_object(object)
63
+ return if object.nil?
64
+ output_object = PolicyAssignmentListResult.new
65
+
66
+ deserialized_property = object['value']
67
+ unless deserialized_property.nil?
68
+ deserialized_array = []
69
+ deserialized_property.each do |element1|
70
+ unless element1.nil?
71
+ element1 = PolicyAssignment.deserialize_object(element1)
72
+ end
73
+ deserialized_array.push(element1)
74
+ end
75
+ deserialized_property = deserialized_array
76
+ end
77
+ output_object.value = deserialized_property
78
+
79
+ deserialized_property = object['nextLink']
80
+ output_object.next_link = deserialized_property
81
+
82
+ output_object
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,74 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Policy Assignment properties.
10
+ #
11
+ class PolicyAssignmentProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the policy assignment scope.
16
+ attr_accessor :scope
17
+
18
+ # @return [String] Gets or sets the policy assignment display name.
19
+ attr_accessor :display_name
20
+
21
+ # @return [String] Gets or sets the policy definition Id.
22
+ attr_accessor :policy_definition_id
23
+
24
+ #
25
+ # Validate the object. Throws ValidationError if validation fails.
26
+ #
27
+ def validate
28
+ # Nothing to validate
29
+ end
30
+
31
+ #
32
+ # Serializes given Model object into Ruby Hash.
33
+ # @param object Model object to serialize.
34
+ # @return [Hash] Serialized object in form of Ruby Hash.
35
+ #
36
+ def self.serialize_object(object)
37
+ object.validate
38
+ output_object = {}
39
+
40
+ serialized_property = object.scope
41
+ output_object['scope'] = serialized_property unless serialized_property.nil?
42
+
43
+ serialized_property = object.display_name
44
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.policy_definition_id
47
+ output_object['policyDefinitionId'] = serialized_property unless serialized_property.nil?
48
+
49
+ output_object
50
+ end
51
+
52
+ #
53
+ # Deserializes given Ruby Hash into Model object.
54
+ # @param object [Hash] Ruby Hash object to deserialize.
55
+ # @return [PolicyAssignmentProperties] Deserialized object.
56
+ #
57
+ def self.deserialize_object(object)
58
+ return if object.nil?
59
+ output_object = PolicyAssignmentProperties.new
60
+
61
+ deserialized_property = object['scope']
62
+ output_object.scope = deserialized_property
63
+
64
+ deserialized_property = object['displayName']
65
+ output_object.display_name = deserialized_property
66
+
67
+ deserialized_property = object['policyDefinitionId']
68
+ output_object.policy_definition_id = deserialized_property
69
+
70
+ output_object
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,72 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Policy definition.
10
+ #
11
+ class PolicyDefinition
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [PolicyDefinitionProperties] Gets or sets the policy
16
+ # definition properties.
17
+ attr_accessor :properties
18
+
19
+ # @return [String] Gets or sets the policy definition name.
20
+ attr_accessor :name
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @properties.validate unless @properties.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.properties
39
+ unless serialized_property.nil?
40
+ serialized_property = PolicyDefinitionProperties.serialize_object(serialized_property)
41
+ end
42
+ output_object['properties'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.name
45
+ output_object['name'] = serialized_property unless serialized_property.nil?
46
+
47
+ output_object
48
+ end
49
+
50
+ #
51
+ # Deserializes given Ruby Hash into Model object.
52
+ # @param object [Hash] Ruby Hash object to deserialize.
53
+ # @return [PolicyDefinition] Deserialized object.
54
+ #
55
+ def self.deserialize_object(object)
56
+ return if object.nil?
57
+ output_object = PolicyDefinition.new
58
+
59
+ deserialized_property = object['properties']
60
+ unless deserialized_property.nil?
61
+ deserialized_property = PolicyDefinitionProperties.deserialize_object(deserialized_property)
62
+ end
63
+ output_object.properties = deserialized_property
64
+
65
+ deserialized_property = object['name']
66
+ output_object.name = deserialized_property
67
+
68
+ output_object
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,74 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Resources
7
+ module Models
8
+ #
9
+ # Policy definition properties.
10
+ #
11
+ class PolicyDefinitionProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the policy definition description.
16
+ attr_accessor :description
17
+
18
+ # @return [String] Gets or sets the policy definition display name.
19
+ attr_accessor :display_name
20
+
21
+ # @return The policy rule json.
22
+ attr_accessor :policy_rule
23
+
24
+ #
25
+ # Validate the object. Throws ValidationError if validation fails.
26
+ #
27
+ def validate
28
+ # Nothing to validate
29
+ end
30
+
31
+ #
32
+ # Serializes given Model object into Ruby Hash.
33
+ # @param object Model object to serialize.
34
+ # @return [Hash] Serialized object in form of Ruby Hash.
35
+ #
36
+ def self.serialize_object(object)
37
+ object.validate
38
+ output_object = {}
39
+
40
+ serialized_property = object.description
41
+ output_object['description'] = serialized_property unless serialized_property.nil?
42
+
43
+ serialized_property = object.display_name
44
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.policy_rule
47
+ output_object['policyRule'] = serialized_property unless serialized_property.nil?
48
+
49
+ output_object
50
+ end
51
+
52
+ #
53
+ # Deserializes given Ruby Hash into Model object.
54
+ # @param object [Hash] Ruby Hash object to deserialize.
55
+ # @return [PolicyDefinitionProperties] Deserialized object.
56
+ #
57
+ def self.deserialize_object(object)
58
+ return if object.nil?
59
+ output_object = PolicyDefinitionProperties.new
60
+
61
+ deserialized_property = object['description']
62
+ output_object.description = deserialized_property
63
+
64
+ deserialized_property = object['displayName']
65
+ output_object.display_name = deserialized_property
66
+
67
+ deserialized_property = object['policyRule']
68
+ output_object.policy_rule = deserialized_property
69
+
70
+ output_object
71
+ end
72
+ end
73
+ end
74
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -86,19 +86,17 @@ module Azure::ARM::Resources
86
86
 
87
87
  deserialized_property = object['resourceTypes']
88
88
  unless deserialized_property.nil?
89
- deserializedArray = [];
89
+ deserialized_array = []
90
90
  deserialized_property.each do |element1|
91
91
  unless element1.nil?
92
92
  element1 = ProviderResourceType.deserialize_object(element1)
93
93
  end
94
- deserializedArray.push(element1);
94
+ deserialized_array.push(element1)
95
95
  end
96
- deserialized_property = deserializedArray;
96
+ deserialized_property = deserialized_array
97
97
  end
98
98
  output_object.resource_types = deserialized_property
99
99
 
100
- output_object.validate
101
-
102
100
  output_object
103
101
  end
104
102
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -64,22 +64,20 @@ module Azure::ARM::Resources
64
64
 
65
65
  deserialized_property = object['value']
66
66
  unless deserialized_property.nil?
67
- deserializedArray = [];
67
+ deserialized_array = []
68
68
  deserialized_property.each do |element1|
69
69
  unless element1.nil?
70
70
  element1 = Provider.deserialize_object(element1)
71
71
  end
72
- deserializedArray.push(element1);
72
+ deserialized_array.push(element1)
73
73
  end
74
- deserialized_property = deserializedArray;
74
+ deserialized_property = deserialized_array
75
75
  end
76
76
  output_object.value = deserialized_property
77
77
 
78
78
  deserialized_property = object['nextLink']
79
79
  output_object.next_link = deserialized_property
80
80
 
81
- output_object.validate
82
-
83
81
  output_object
84
82
  end
85
83
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -79,8 +79,6 @@ module Azure::ARM::Resources
79
79
  deserialized_property = object['properties']
80
80
  output_object.properties = deserialized_property
81
81
 
82
- output_object.validate
83
-
84
82
  output_object
85
83
  end
86
84
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -35,6 +35,7 @@ module Azure::ARM::Resources
35
35
  # Validate the object. Throws ValidationError if validation fails.
36
36
  #
37
37
  def validate
38
+ fail MsRest::ValidationError, 'property location is nil' if @location.nil?
38
39
  @properties.validate unless @properties.nil?
39
40
  @tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
40
41
  end
@@ -48,6 +49,9 @@ module Azure::ARM::Resources
48
49
  object.validate
49
50
  output_object = {}
50
51
 
52
+ serialized_property = object.location
53
+ output_object['location'] = serialized_property unless serialized_property.nil?
54
+
51
55
  serialized_property = object.id
52
56
  output_object['id'] = serialized_property unless serialized_property.nil?
53
57
 
@@ -60,9 +64,6 @@ module Azure::ARM::Resources
60
64
  end
61
65
  output_object['properties'] = serialized_property unless serialized_property.nil?
62
66
 
63
- serialized_property = object.location
64
- output_object['location'] = serialized_property unless serialized_property.nil?
65
-
66
67
  serialized_property = object.tags
67
68
  output_object['tags'] = serialized_property unless serialized_property.nil?
68
69
 
@@ -78,6 +79,9 @@ module Azure::ARM::Resources
78
79
  return if object.nil?
79
80
  output_object = ResourceGroup.new
80
81
 
82
+ deserialized_property = object['location']
83
+ output_object.location = deserialized_property
84
+
81
85
  deserialized_property = object['id']
82
86
  output_object.id = deserialized_property
83
87
 
@@ -90,14 +94,9 @@ module Azure::ARM::Resources
90
94
  end
91
95
  output_object.properties = deserialized_property
92
96
 
93
- deserialized_property = object['location']
94
- output_object.location = deserialized_property
95
-
96
97
  deserialized_property = object['tags']
97
98
  output_object.tags = deserialized_property
98
99
 
99
- output_object.validate
100
-
101
100
  output_object
102
101
  end
103
102
  end