azure_mgmt_resources 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +1 -27
  3. data/azure_mgmt_resources.gemspec +1 -1
  4. data/lib/azure_mgmt_resources.rb +7 -10
  5. data/lib/azure_mgmt_resources/deployment_operations.rb +117 -16
  6. data/lib/azure_mgmt_resources/deployments.rb +416 -51
  7. data/lib/azure_mgmt_resources/models/basic_dependency.rb +1 -1
  8. data/lib/azure_mgmt_resources/models/debug_setting.rb +56 -0
  9. data/lib/azure_mgmt_resources/models/dependency.rb +1 -1
  10. data/lib/azure_mgmt_resources/models/deployment.rb +1 -1
  11. data/lib/azure_mgmt_resources/models/deployment_export_result.rb +56 -0
  12. data/lib/azure_mgmt_resources/models/deployment_extended.rb +1 -1
  13. data/lib/azure_mgmt_resources/models/deployment_extended_filter.rb +1 -1
  14. data/lib/azure_mgmt_resources/models/deployment_list_result.rb +1 -1
  15. data/lib/azure_mgmt_resources/models/deployment_mode.rb +1 -1
  16. data/lib/azure_mgmt_resources/models/deployment_operation.rb +1 -1
  17. data/lib/azure_mgmt_resources/models/deployment_operation_properties.rb +42 -1
  18. data/lib/azure_mgmt_resources/models/deployment_operations_list_result.rb +1 -1
  19. data/lib/azure_mgmt_resources/models/deployment_properties.rb +18 -1
  20. data/lib/azure_mgmt_resources/models/deployment_properties_extended.rb +18 -1
  21. data/lib/azure_mgmt_resources/models/deployment_validate_result.rb +1 -1
  22. data/lib/azure_mgmt_resources/models/export_template_request.rb +69 -0
  23. data/lib/azure_mgmt_resources/models/generic_resource.rb +1 -1
  24. data/lib/azure_mgmt_resources/models/generic_resource_filter.rb +1 -1
  25. data/lib/azure_mgmt_resources/models/http_message.rb +56 -0
  26. data/lib/azure_mgmt_resources/models/parameters_link.rb +1 -1
  27. data/lib/azure_mgmt_resources/models/plan.rb +1 -1
  28. data/lib/azure_mgmt_resources/models/provider.rb +1 -1
  29. data/lib/azure_mgmt_resources/models/provider_list_result.rb +1 -1
  30. data/lib/azure_mgmt_resources/models/provider_resource_type.rb +1 -1
  31. data/lib/azure_mgmt_resources/models/resource_group.rb +1 -1
  32. data/lib/azure_mgmt_resources/models/resource_group_export_result.rb +71 -0
  33. data/lib/azure_mgmt_resources/models/resource_group_filter.rb +1 -1
  34. data/lib/azure_mgmt_resources/models/resource_group_list_result.rb +1 -1
  35. data/lib/azure_mgmt_resources/models/resource_group_properties.rb +1 -1
  36. data/lib/azure_mgmt_resources/models/resource_list_result.rb +1 -1
  37. data/lib/azure_mgmt_resources/models/resource_management_error_with_details.rb +18 -5
  38. data/lib/azure_mgmt_resources/models/resource_provider_operation_definition.rb +1 -1
  39. data/lib/azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb +1 -1
  40. data/lib/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +1 -1
  41. data/lib/azure_mgmt_resources/models/resources_move_info.rb +1 -1
  42. data/lib/azure_mgmt_resources/models/tag_count.rb +1 -1
  43. data/lib/azure_mgmt_resources/models/tag_details.rb +1 -1
  44. data/lib/azure_mgmt_resources/models/tag_value.rb +1 -1
  45. data/lib/azure_mgmt_resources/models/tags_list_result.rb +1 -1
  46. data/lib/azure_mgmt_resources/models/target_resource.rb +1 -1
  47. data/lib/azure_mgmt_resources/models/template_link.rb +1 -1
  48. data/lib/azure_mgmt_resources/module_definition.rb +1 -1
  49. data/lib/azure_mgmt_resources/providers.rb +181 -26
  50. data/lib/azure_mgmt_resources/resource_groups.rb +461 -54
  51. data/lib/azure_mgmt_resources/resource_management_client.rb +2 -10
  52. data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +73 -11
  53. data/lib/azure_mgmt_resources/resources.rb +306 -57
  54. data/lib/azure_mgmt_resources/tags.rb +207 -31
  55. data/lib/azure_mgmt_resources/version.rb +2 -2
  56. metadata +31 -29
  57. data/lib/azure_mgmt_resources/models/policy_assignment.rb +0 -72
  58. data/lib/azure_mgmt_resources/models/policy_assignment_list_result.rb +0 -86
  59. data/lib/azure_mgmt_resources/models/policy_assignment_properties.rb +0 -74
  60. data/lib/azure_mgmt_resources/models/policy_definition.rb +0 -72
  61. data/lib/azure_mgmt_resources/models/policy_definition_properties.rb +0 -74
  62. data/lib/azure_mgmt_resources/models/resource_management_error.rb +0 -76
  63. data/lib/azure_mgmt_resources/policy_assignments.rb +0 -922
  64. data/lib/azure_mgmt_resources/policy_definitions.rb +0 -208
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Model object.
10
+ #
11
+ class HttpMessage
12
+
13
+ include MsRestAzure
14
+
15
+ # @return Gets or sets HTTP message content.
16
+ attr_accessor :content
17
+
18
+ #
19
+ # Validate the object. Throws ValidationError if validation fails.
20
+ #
21
+ def validate
22
+ # Nothing to validate
23
+ end
24
+
25
+ #
26
+ # Serializes given Model object into Ruby Hash.
27
+ # @param object Model object to serialize.
28
+ # @return [Hash] Serialized object in form of Ruby Hash.
29
+ #
30
+ def self.serialize_object(object)
31
+ object.validate
32
+ output_object = {}
33
+
34
+ serialized_property = object.content
35
+ output_object['content'] = serialized_property unless serialized_property.nil?
36
+
37
+ output_object
38
+ end
39
+
40
+ #
41
+ # Deserializes given Ruby Hash into Model object.
42
+ # @param object [Hash] Ruby Hash object to deserialize.
43
+ # @return [HttpMessage] Deserialized object.
44
+ #
45
+ def self.deserialize_object(object)
46
+ return if object.nil?
47
+ output_object = HttpMessage.new
48
+
49
+ deserialized_property = object['content']
50
+ output_object.content = deserialized_property
51
+
52
+ output_object
53
+ end
54
+ end
55
+ end
56
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -0,0 +1,71 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Model object.
10
+ #
11
+ class ResourceGroupExportResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return Gets or sets the template content.
16
+ attr_accessor :template
17
+
18
+ # @return [ResourceManagementErrorWithDetails] Gets or sets the error.
19
+ attr_accessor :error
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ @error.validate unless @error.nil?
26
+ end
27
+
28
+ #
29
+ # Serializes given Model object into Ruby Hash.
30
+ # @param object Model object to serialize.
31
+ # @return [Hash] Serialized object in form of Ruby Hash.
32
+ #
33
+ def self.serialize_object(object)
34
+ object.validate
35
+ output_object = {}
36
+
37
+ serialized_property = object.template
38
+ output_object['template'] = serialized_property unless serialized_property.nil?
39
+
40
+ serialized_property = object.error
41
+ unless serialized_property.nil?
42
+ serialized_property = ResourceManagementErrorWithDetails.serialize_object(serialized_property)
43
+ end
44
+ output_object['error'] = serialized_property unless serialized_property.nil?
45
+
46
+ output_object
47
+ end
48
+
49
+ #
50
+ # Deserializes given Ruby Hash into Model object.
51
+ # @param object [Hash] Ruby Hash object to deserialize.
52
+ # @return [ResourceGroupExportResult] Deserialized object.
53
+ #
54
+ def self.deserialize_object(object)
55
+ return if object.nil?
56
+ output_object = ResourceGroupExportResult.new
57
+
58
+ deserialized_property = object['template']
59
+ output_object.template = deserialized_property
60
+
61
+ deserialized_property = object['error']
62
+ unless deserialized_property.nil?
63
+ deserialized_property = ResourceManagementErrorWithDetails.deserialize_object(deserialized_property)
64
+ end
65
+ output_object.error = deserialized_property
66
+
67
+ output_object
68
+ end
69
+ end
70
+ end
71
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -8,17 +8,30 @@ module Azure::ARM::Resources
8
8
  #
9
9
  # Model object.
10
10
  #
11
- class ResourceManagementErrorWithDetails < ResourceManagementError
11
+ class ResourceManagementErrorWithDetails
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<ResourceManagementError>] Gets or sets validation error.
15
+ # @return [String] Gets or sets the error code returned from the server.
16
+ attr_accessor :code
17
+
18
+ # @return [String] Gets or sets the error message returned from the
19
+ # server.
20
+ attr_accessor :message
21
+
22
+ # @return [String] Gets or sets the target of the error.
23
+ attr_accessor :target
24
+
25
+ # @return [Array<ResourceManagementErrorWithDetails>] Gets or sets
26
+ # validation error.
16
27
  attr_accessor :details
17
28
 
18
29
  #
19
30
  # Validate the object. Throws ValidationError if validation fails.
20
31
  #
21
32
  def validate
33
+ fail MsRest::ValidationError, 'property code is nil' if @code.nil?
34
+ fail MsRest::ValidationError, 'property message is nil' if @message.nil?
22
35
  @details.each{ |e| e.validate if e.respond_to?(:validate) } unless @details.nil?
23
36
  end
24
37
 
@@ -45,7 +58,7 @@ module Azure::ARM::Resources
45
58
  serializedArray = []
46
59
  serialized_property.each do |element|
47
60
  unless element.nil?
48
- element = ResourceManagementError.serialize_object(element)
61
+ element = ResourceManagementErrorWithDetails.serialize_object(element)
49
62
  end
50
63
  serializedArray.push(element)
51
64
  end
@@ -79,7 +92,7 @@ module Azure::ARM::Resources
79
92
  deserialized_array = []
80
93
  deserialized_property.each do |element1|
81
94
  unless element1.nil?
82
- element1 = ResourceManagementError.deserialize_object(element1)
95
+ element1 = ResourceManagementErrorWithDetails.deserialize_object(element1)
83
96
  end
84
97
  deserialized_array.push(element1)
85
98
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -27,13 +27,41 @@ module Azure::ARM::Resources
27
27
  #
28
28
  # @param resource_provider_namespace [String] Namespace of the resource
29
29
  # provider.
30
- # @param [Hash{String => String}] The hash of custom headers need to be
31
- # applied to HTTP request.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
32
  #
33
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
34
- # response.
33
+ # @return [Provider] operation results.
35
34
  #
36
35
  def unregister(resource_provider_namespace, custom_headers = nil)
36
+ response = unregister_async(resource_provider_namespace, custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Unregisters provider from a subscription.
42
+ #
43
+ # @param resource_provider_namespace [String] Namespace of the resource
44
+ # provider.
45
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
46
+ # will be added to the HTTP request.
47
+ #
48
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
49
+ #
50
+ def unregister_with_http_info(resource_provider_namespace, custom_headers = nil)
51
+ unregister_async(resource_provider_namespace, custom_headers).value!
52
+ end
53
+
54
+ #
55
+ # Unregisters provider from a subscription.
56
+ #
57
+ # @param resource_provider_namespace [String] Namespace of the resource
58
+ # provider.
59
+ # @param [Hash{String => String}] A hash of custom headers that will be added
60
+ # to the HTTP request.
61
+ #
62
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
63
+ #
64
+ def unregister_async(resource_provider_namespace, custom_headers = nil)
37
65
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
38
66
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
39
67
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -49,7 +77,10 @@ module Azure::ARM::Resources
49
77
  query_params: {'api-version' => @client.api_version},
50
78
  headers: request_headers.merge(custom_headers || {})
51
79
  }
52
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
53
84
  promise = request.run_promise do |req|
54
85
  @client.credentials.sign_request(req) unless @client.credentials.nil?
55
86
  end
@@ -89,13 +120,41 @@ module Azure::ARM::Resources
89
120
  #
90
121
  # @param resource_provider_namespace [String] Namespace of the resource
91
122
  # provider.
92
- # @param [Hash{String => String}] The hash of custom headers need to be
93
- # applied to HTTP request.
123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
+ # will be added to the HTTP request.
94
125
  #
95
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
96
- # response.
126
+ # @return [Provider] operation results.
97
127
  #
98
128
  def register(resource_provider_namespace, custom_headers = nil)
129
+ response = register_async(resource_provider_namespace, custom_headers).value!
130
+ response.body unless response.nil?
131
+ end
132
+
133
+ #
134
+ # Registers provider to be used with a subscription.
135
+ #
136
+ # @param resource_provider_namespace [String] Namespace of the resource
137
+ # provider.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
142
+ #
143
+ def register_with_http_info(resource_provider_namespace, custom_headers = nil)
144
+ register_async(resource_provider_namespace, custom_headers).value!
145
+ end
146
+
147
+ #
148
+ # Registers provider to be used with a subscription.
149
+ #
150
+ # @param resource_provider_namespace [String] Namespace of the resource
151
+ # provider.
152
+ # @param [Hash{String => String}] A hash of custom headers that will be added
153
+ # to the HTTP request.
154
+ #
155
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
156
+ #
157
+ def register_async(resource_provider_namespace, custom_headers = nil)
99
158
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
100
159
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
101
160
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -111,7 +170,10 @@ module Azure::ARM::Resources
111
170
  query_params: {'api-version' => @client.api_version},
112
171
  headers: request_headers.merge(custom_headers || {})
113
172
  }
114
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
173
+
174
+ request_url = @base_url || @client.base_url
175
+
176
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
115
177
  promise = request.run_promise do |req|
116
178
  @client.credentials.sign_request(req) unless @client.credentials.nil?
117
179
  end
@@ -151,13 +213,41 @@ module Azure::ARM::Resources
151
213
  #
152
214
  # @param top [Integer] Query parameters. If null is passed returns all
153
215
  # deployments.
154
- # @param [Hash{String => String}] The hash of custom headers need to be
155
- # applied to HTTP request.
216
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
217
+ # will be added to the HTTP request.
156
218
  #
157
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
158
- # response.
219
+ # @return [ProviderListResult] operation results.
159
220
  #
160
221
  def list(top = nil, custom_headers = nil)
222
+ response = list_async(top, custom_headers).value!
223
+ response.body unless response.nil?
224
+ end
225
+
226
+ #
227
+ # Gets a list of resource providers.
228
+ #
229
+ # @param top [Integer] Query parameters. If null is passed returns all
230
+ # deployments.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
+ #
236
+ def list_with_http_info(top = nil, custom_headers = nil)
237
+ list_async(top, custom_headers).value!
238
+ end
239
+
240
+ #
241
+ # Gets a list of resource providers.
242
+ #
243
+ # @param top [Integer] Query parameters. If null is passed returns all
244
+ # deployments.
245
+ # @param [Hash{String => String}] A hash of custom headers that will be added
246
+ # to the HTTP request.
247
+ #
248
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
249
+ #
250
+ def list_async(top = nil, custom_headers = nil)
161
251
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
162
252
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
163
253
  request_headers = {}
@@ -172,7 +262,10 @@ module Azure::ARM::Resources
172
262
  query_params: {'$top' => top,'api-version' => @client.api_version},
173
263
  headers: request_headers.merge(custom_headers || {})
174
264
  }
175
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
265
+
266
+ request_url = @base_url || @client.base_url
267
+
268
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
176
269
  promise = request.run_promise do |req|
177
270
  @client.credentials.sign_request(req) unless @client.credentials.nil?
178
271
  end
@@ -212,13 +305,41 @@ module Azure::ARM::Resources
212
305
  #
213
306
  # @param resource_provider_namespace [String] Namespace of the resource
214
307
  # provider.
215
- # @param [Hash{String => String}] The hash of custom headers need to be
216
- # applied to HTTP request.
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
217
310
  #
218
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
219
- # response.
311
+ # @return [Provider] operation results.
220
312
  #
221
313
  def get(resource_provider_namespace, custom_headers = nil)
314
+ response = get_async(resource_provider_namespace, custom_headers).value!
315
+ response.body unless response.nil?
316
+ end
317
+
318
+ #
319
+ # Gets a resource provider.
320
+ #
321
+ # @param resource_provider_namespace [String] Namespace of the resource
322
+ # provider.
323
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
324
+ # will be added to the HTTP request.
325
+ #
326
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
327
+ #
328
+ def get_with_http_info(resource_provider_namespace, custom_headers = nil)
329
+ get_async(resource_provider_namespace, custom_headers).value!
330
+ end
331
+
332
+ #
333
+ # Gets a resource provider.
334
+ #
335
+ # @param resource_provider_namespace [String] Namespace of the resource
336
+ # provider.
337
+ # @param [Hash{String => String}] A hash of custom headers that will be added
338
+ # to the HTTP request.
339
+ #
340
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
341
+ #
342
+ def get_async(resource_provider_namespace, custom_headers = nil)
222
343
  fail ArgumentError, 'resource_provider_namespace is nil' if resource_provider_namespace.nil?
223
344
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
224
345
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -234,7 +355,10 @@ module Azure::ARM::Resources
234
355
  query_params: {'api-version' => @client.api_version},
235
356
  headers: request_headers.merge(custom_headers || {})
236
357
  }
237
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
358
+
359
+ request_url = @base_url || @client.base_url
360
+
361
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
238
362
  promise = request.run_promise do |req|
239
363
  @client.credentials.sign_request(req) unless @client.credentials.nil?
240
364
  end
@@ -274,13 +398,41 @@ module Azure::ARM::Resources
274
398
  #
275
399
  # @param next_page_link [String] The NextLink from the previous successful
276
400
  # call to List operation.
277
- # @param [Hash{String => String}] The hash of custom headers need to be
278
- # applied to HTTP request.
401
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
402
+ # will be added to the HTTP request.
279
403
  #
280
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
281
- # response.
404
+ # @return [ProviderListResult] operation results.
282
405
  #
283
406
  def list_next(next_page_link, custom_headers = nil)
407
+ response = list_next_async(next_page_link, custom_headers).value!
408
+ response.body unless response.nil?
409
+ end
410
+
411
+ #
412
+ # Gets a list of resource providers.
413
+ #
414
+ # @param next_page_link [String] The NextLink from the previous successful
415
+ # call to List operation.
416
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
417
+ # will be added to the HTTP request.
418
+ #
419
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
420
+ #
421
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
422
+ list_next_async(next_page_link, custom_headers).value!
423
+ end
424
+
425
+ #
426
+ # Gets a list of resource providers.
427
+ #
428
+ # @param next_page_link [String] The NextLink from the previous successful
429
+ # call to List operation.
430
+ # @param [Hash{String => String}] A hash of custom headers that will be added
431
+ # to the HTTP request.
432
+ #
433
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
434
+ #
435
+ def list_next_async(next_page_link, custom_headers = nil)
284
436
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
285
437
  request_headers = {}
286
438
 
@@ -293,7 +445,10 @@ module Azure::ARM::Resources
293
445
  skip_encoding_path_params: {'nextLink' => next_page_link},
294
446
  headers: request_headers.merge(custom_headers || {})
295
447
  }
296
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
448
+
449
+ request_url = @base_url || @client.base_url
450
+
451
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
297
452
  promise = request.run_promise do |req|
298
453
  @client.credentials.sign_request(req) unless @client.credentials.nil?
299
454
  end