azure_mgmt_resources 0.2.1 → 0.3.0
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 +13 -5
- data/README.md +1 -27
- data/azure_mgmt_resources.gemspec +1 -1
- data/lib/azure_mgmt_resources.rb +7 -10
- data/lib/azure_mgmt_resources/deployment_operations.rb +117 -16
- data/lib/azure_mgmt_resources/deployments.rb +416 -51
- data/lib/azure_mgmt_resources/models/basic_dependency.rb +1 -1
- data/lib/azure_mgmt_resources/models/debug_setting.rb +56 -0
- data/lib/azure_mgmt_resources/models/dependency.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_export_result.rb +56 -0
- data/lib/azure_mgmt_resources/models/deployment_extended.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_extended_filter.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_mode.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_operation.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_operation_properties.rb +42 -1
- data/lib/azure_mgmt_resources/models/deployment_operations_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/deployment_properties.rb +18 -1
- data/lib/azure_mgmt_resources/models/deployment_properties_extended.rb +18 -1
- data/lib/azure_mgmt_resources/models/deployment_validate_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/export_template_request.rb +69 -0
- data/lib/azure_mgmt_resources/models/generic_resource.rb +1 -1
- data/lib/azure_mgmt_resources/models/generic_resource_filter.rb +1 -1
- data/lib/azure_mgmt_resources/models/http_message.rb +56 -0
- data/lib/azure_mgmt_resources/models/parameters_link.rb +1 -1
- data/lib/azure_mgmt_resources/models/plan.rb +1 -1
- data/lib/azure_mgmt_resources/models/provider.rb +1 -1
- data/lib/azure_mgmt_resources/models/provider_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/provider_resource_type.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_group.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_group_export_result.rb +71 -0
- data/lib/azure_mgmt_resources/models/resource_group_filter.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_group_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_group_properties.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_management_error_with_details.rb +18 -5
- data/lib/azure_mgmt_resources/models/resource_provider_operation_definition.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +1 -1
- data/lib/azure_mgmt_resources/models/resources_move_info.rb +1 -1
- data/lib/azure_mgmt_resources/models/tag_count.rb +1 -1
- data/lib/azure_mgmt_resources/models/tag_details.rb +1 -1
- data/lib/azure_mgmt_resources/models/tag_value.rb +1 -1
- data/lib/azure_mgmt_resources/models/tags_list_result.rb +1 -1
- data/lib/azure_mgmt_resources/models/target_resource.rb +1 -1
- data/lib/azure_mgmt_resources/models/template_link.rb +1 -1
- data/lib/azure_mgmt_resources/module_definition.rb +1 -1
- data/lib/azure_mgmt_resources/providers.rb +181 -26
- data/lib/azure_mgmt_resources/resource_groups.rb +461 -54
- data/lib/azure_mgmt_resources/resource_management_client.rb +2 -10
- data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +73 -11
- data/lib/azure_mgmt_resources/resources.rb +306 -57
- data/lib/azure_mgmt_resources/tags.rb +207 -31
- data/lib/azure_mgmt_resources/version.rb +2 -2
- metadata +31 -29
- data/lib/azure_mgmt_resources/models/policy_assignment.rb +0 -72
- data/lib/azure_mgmt_resources/models/policy_assignment_list_result.rb +0 -86
- data/lib/azure_mgmt_resources/models/policy_assignment_properties.rb +0 -74
- data/lib/azure_mgmt_resources/models/policy_definition.rb +0 -72
- data/lib/azure_mgmt_resources/models/policy_definition_properties.rb +0 -74
- data/lib/azure_mgmt_resources/models/resource_management_error.rb +0 -76
- data/lib/azure_mgmt_resources/policy_assignments.rb +0 -922
- data/lib/azure_mgmt_resources/policy_definitions.rb +0 -208
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTllYmEzYmI3ODVhM2IyYzVlZDUyYTdiZDEwYjI2NDg3ZTJlNTkwNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MmY5ZTg4MTVmZGU4NzM5OTQwNDg4MGNmMDA1ZGQ3YjlkZGQ2OGMzZQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ODBkNTU4ZGRmZWIzMDc3MmVjOWQ2YzliZGE3ZWY3YjU4ZWViMWFlYjY2Y2E2
|
10
|
+
OWRkZmIwZjJjNTBjOWRlNWQ1ZjU4M2VjYThkYzFhOGMzZTllZTIzYzE1NDQw
|
11
|
+
NTY3NzhlYjM5MDAwMjZhNjRjYTk2N2FkMWUwOTNjMDllNGE4ZjE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzI4ZThhMGQ5MDJkY2FmNzNiZTBmOTFhOGU0MTVlYWRmOGMzODM2ODNlY2Vk
|
14
|
+
MzhhZjg5N2JjMjI5NjRmYTM1YTk4NzQzZWJmNjg4YWEzMDlmZDdiNmZmNjVi
|
15
|
+
NDFmODEyOTcyMDEyYzViODdkYTdhMDdiOGExYjUxMDUyOWZkYzY=
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ client.subscription_id = subscription_id
|
|
51
51
|
resource_group = Azure::ARM::Resources::Models::ResourceGroup.new()
|
52
52
|
resource_group.location = 'westus'
|
53
53
|
|
54
|
-
promise = client.resource_groups.
|
54
|
+
promise = client.resource_groups.create_or_update_async('new_test_resource_group', resource_group)
|
55
55
|
```
|
56
56
|
|
57
57
|
The SDK method returns a promise which you can utilize depending on your needs. E.g. if you need to get result immediately via sync blocking call - do the following:
|
@@ -78,29 +78,3 @@ p resource_group.id # the id of resource group
|
|
78
78
|
```
|
79
79
|
|
80
80
|
Congrats, you've create an ARM resource group. We encourage you to try more stuff and let us know your feedback!
|
81
|
-
|
82
|
-
# Running tests
|
83
|
-
|
84
|
-
## Adding env variables
|
85
|
-
|
86
|
-
To run the tests you would need to set the following environment variables with your real Azure data:
|
87
|
-
|
88
|
-
* AZURE_TENANT_ID="your tenant id or domain"
|
89
|
-
* AZURE_CLIENT_ID="your client id / application id"
|
90
|
-
* AZURE_CLIENT_SECRET="your service principal secret"
|
91
|
-
* AZURE_SUBSCRIPTION_ID="your subscription id"
|
92
|
-
|
93
|
-
* run_long_tasks - set this to '1' only if you would like to run time consuming tests like VM creation.
|
94
|
-
|
95
|
-
## Starting tests
|
96
|
-
|
97
|
-
Just run 'rspec' command from the current gem folder.
|
98
|
-
|
99
|
-
# Contribution
|
100
|
-
|
101
|
-
All the SDK code was generated by tool 'AutoRest' - https://github.com/Azure/autorest
|
102
|
-
So if you have found a bug or have an idea for a new feature - suggest, discuss and contribute it into the AutoRest repository. After that SDK maintainers will update the sources and the gem.
|
103
|
-
|
104
|
-
# Provide feedback
|
105
|
-
|
106
|
-
Send email to the azsdkteam@microsoft.com or file new issue in this repository.
|
data/lib/azure_mgmt_resources.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 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,24 +27,19 @@ module Azure::ARM::Resources
|
|
27
27
|
autoload :Tags, 'azure_mgmt_resources/tags.rb'
|
28
28
|
autoload :DeploymentOperations, 'azure_mgmt_resources/deployment_operations.rb'
|
29
29
|
autoload :ResourceProviderOperationDetails, 'azure_mgmt_resources/resource_provider_operation_details.rb'
|
30
|
-
autoload :PolicyDefinitions, 'azure_mgmt_resources/policy_definitions.rb'
|
31
|
-
autoload :PolicyAssignments, 'azure_mgmt_resources/policy_assignments.rb'
|
32
30
|
autoload :ResourceManagementClient, 'azure_mgmt_resources/resource_management_client.rb'
|
33
31
|
|
34
32
|
module Models
|
35
|
-
autoload :PolicyAssignmentProperties, 'azure_mgmt_resources/models/policy_assignment_properties.rb'
|
36
|
-
autoload :PolicyAssignment, 'azure_mgmt_resources/models/policy_assignment.rb'
|
37
|
-
autoload :PolicyAssignmentListResult, 'azure_mgmt_resources/models/policy_assignment_list_result.rb'
|
38
|
-
autoload :PolicyDefinitionProperties, 'azure_mgmt_resources/models/policy_definition_properties.rb'
|
39
|
-
autoload :PolicyDefinition, 'azure_mgmt_resources/models/policy_definition.rb'
|
40
33
|
autoload :DeploymentExtendedFilter, 'azure_mgmt_resources/models/deployment_extended_filter.rb'
|
41
34
|
autoload :GenericResourceFilter, 'azure_mgmt_resources/models/generic_resource_filter.rb'
|
42
35
|
autoload :ResourceGroupFilter, 'azure_mgmt_resources/models/resource_group_filter.rb'
|
43
36
|
autoload :TemplateLink, 'azure_mgmt_resources/models/template_link.rb'
|
44
37
|
autoload :ParametersLink, 'azure_mgmt_resources/models/parameters_link.rb'
|
45
38
|
autoload :DeploymentProperties, 'azure_mgmt_resources/models/deployment_properties.rb'
|
39
|
+
autoload :DebugSetting, 'azure_mgmt_resources/models/debug_setting.rb'
|
46
40
|
autoload :Deployment, 'azure_mgmt_resources/models/deployment.rb'
|
47
|
-
autoload :
|
41
|
+
autoload :DeploymentExportResult, 'azure_mgmt_resources/models/deployment_export_result.rb'
|
42
|
+
autoload :ResourceManagementErrorWithDetails, 'azure_mgmt_resources/models/resource_management_error_with_details.rb'
|
48
43
|
autoload :ProviderResourceType, 'azure_mgmt_resources/models/provider_resource_type.rb'
|
49
44
|
autoload :Provider, 'azure_mgmt_resources/models/provider.rb'
|
50
45
|
autoload :BasicDependency, 'azure_mgmt_resources/models/basic_dependency.rb'
|
@@ -60,18 +55,20 @@ module Azure::ARM::Resources
|
|
60
55
|
autoload :ResourceGroupProperties, 'azure_mgmt_resources/models/resource_group_properties.rb'
|
61
56
|
autoload :ResourceGroupListResult, 'azure_mgmt_resources/models/resource_group_list_result.rb'
|
62
57
|
autoload :ResourcesMoveInfo, 'azure_mgmt_resources/models/resources_move_info.rb'
|
58
|
+
autoload :ExportTemplateRequest, 'azure_mgmt_resources/models/export_template_request.rb'
|
63
59
|
autoload :TagCount, 'azure_mgmt_resources/models/tag_count.rb'
|
64
60
|
autoload :TagValue, 'azure_mgmt_resources/models/tag_value.rb'
|
65
61
|
autoload :TagDetails, 'azure_mgmt_resources/models/tag_details.rb'
|
66
62
|
autoload :TagsListResult, 'azure_mgmt_resources/models/tags_list_result.rb'
|
67
63
|
autoload :TargetResource, 'azure_mgmt_resources/models/target_resource.rb'
|
64
|
+
autoload :HttpMessage, 'azure_mgmt_resources/models/http_message.rb'
|
68
65
|
autoload :DeploymentOperationProperties, 'azure_mgmt_resources/models/deployment_operation_properties.rb'
|
69
66
|
autoload :DeploymentOperation, 'azure_mgmt_resources/models/deployment_operation.rb'
|
70
67
|
autoload :DeploymentOperationsListResult, 'azure_mgmt_resources/models/deployment_operations_list_result.rb'
|
71
68
|
autoload :ResourceProviderOperationDisplayProperties, 'azure_mgmt_resources/models/resource_provider_operation_display_properties.rb'
|
72
69
|
autoload :ResourceProviderOperationDefinition, 'azure_mgmt_resources/models/resource_provider_operation_definition.rb'
|
73
70
|
autoload :ResourceProviderOperationDetailListResult, 'azure_mgmt_resources/models/resource_provider_operation_detail_list_result.rb'
|
74
|
-
autoload :
|
71
|
+
autoload :ResourceGroupExportResult, 'azure_mgmt_resources/models/resource_group_export_result.rb'
|
75
72
|
autoload :GenericResource, 'azure_mgmt_resources/models/generic_resource.rb'
|
76
73
|
autoload :DeploymentMode, 'azure_mgmt_resources/models/deployment_mode.rb'
|
77
74
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 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
|
|
@@ -29,13 +29,45 @@ module Azure::ARM::Resources
|
|
29
29
|
# is case insensitive.
|
30
30
|
# @param deployment_name [String] The name of the deployment.
|
31
31
|
# @param operation_id [String] Operation Id.
|
32
|
-
# @param [Hash{String => String}]
|
33
|
-
#
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
34
|
#
|
35
|
-
# @return [
|
36
|
-
# response.
|
35
|
+
# @return [DeploymentOperation] operation results.
|
37
36
|
#
|
38
37
|
def get(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
38
|
+
response = get_async(resource_group_name, deployment_name, operation_id, custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Get a list of deployments operations.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
46
|
+
# is case insensitive.
|
47
|
+
# @param deployment_name [String] The name of the deployment.
|
48
|
+
# @param operation_id [String] Operation Id.
|
49
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
50
|
+
# will be added to the HTTP request.
|
51
|
+
#
|
52
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
53
|
+
#
|
54
|
+
def get_with_http_info(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
55
|
+
get_async(resource_group_name, deployment_name, operation_id, custom_headers).value!
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Get a list of deployments operations.
|
60
|
+
#
|
61
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
62
|
+
# is case insensitive.
|
63
|
+
# @param deployment_name [String] The name of the deployment.
|
64
|
+
# @param operation_id [String] Operation Id.
|
65
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
66
|
+
# to the HTTP request.
|
67
|
+
#
|
68
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
69
|
+
#
|
70
|
+
def get_async(resource_group_name, deployment_name, operation_id, custom_headers = nil)
|
39
71
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
40
72
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
41
73
|
fail ArgumentError, 'operation_id is nil' if operation_id.nil?
|
@@ -53,7 +85,10 @@ module Azure::ARM::Resources
|
|
53
85
|
query_params: {'api-version' => @client.api_version},
|
54
86
|
headers: request_headers.merge(custom_headers || {})
|
55
87
|
}
|
56
|
-
|
88
|
+
|
89
|
+
request_url = @base_url || @client.base_url
|
90
|
+
|
91
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
57
92
|
promise = request.run_promise do |req|
|
58
93
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
59
94
|
end
|
@@ -95,13 +130,45 @@ module Azure::ARM::Resources
|
|
95
130
|
# is case insensitive.
|
96
131
|
# @param deployment_name [String] The name of the deployment.
|
97
132
|
# @param top [Integer] Query parameters.
|
98
|
-
# @param [Hash{String => String}]
|
99
|
-
#
|
133
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
134
|
+
# will be added to the HTTP request.
|
100
135
|
#
|
101
|
-
# @return [
|
102
|
-
# response.
|
136
|
+
# @return [DeploymentOperationsListResult] operation results.
|
103
137
|
#
|
104
138
|
def list(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
139
|
+
response = list_async(resource_group_name, deployment_name, top, custom_headers).value!
|
140
|
+
response.body unless response.nil?
|
141
|
+
end
|
142
|
+
|
143
|
+
#
|
144
|
+
# Gets a list of deployments operations.
|
145
|
+
#
|
146
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
147
|
+
# is case insensitive.
|
148
|
+
# @param deployment_name [String] The name of the deployment.
|
149
|
+
# @param top [Integer] Query parameters.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
154
|
+
#
|
155
|
+
def list_with_http_info(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
156
|
+
list_async(resource_group_name, deployment_name, top, custom_headers).value!
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Gets a list of deployments operations.
|
161
|
+
#
|
162
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
163
|
+
# is case insensitive.
|
164
|
+
# @param deployment_name [String] The name of the deployment.
|
165
|
+
# @param top [Integer] Query parameters.
|
166
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
167
|
+
# to the HTTP request.
|
168
|
+
#
|
169
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
170
|
+
#
|
171
|
+
def list_async(resource_group_name, deployment_name, top = nil, custom_headers = nil)
|
105
172
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
106
173
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
107
174
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -118,7 +185,10 @@ module Azure::ARM::Resources
|
|
118
185
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
119
186
|
headers: request_headers.merge(custom_headers || {})
|
120
187
|
}
|
121
|
-
|
188
|
+
|
189
|
+
request_url = @base_url || @client.base_url
|
190
|
+
|
191
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
122
192
|
promise = request.run_promise do |req|
|
123
193
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
124
194
|
end
|
@@ -158,13 +228,41 @@ module Azure::ARM::Resources
|
|
158
228
|
#
|
159
229
|
# @param next_page_link [String] The NextLink from the previous successful
|
160
230
|
# call to List operation.
|
161
|
-
# @param [Hash{String => String}]
|
162
|
-
#
|
231
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
232
|
+
# will be added to the HTTP request.
|
163
233
|
#
|
164
|
-
# @return [
|
165
|
-
# response.
|
234
|
+
# @return [DeploymentOperationsListResult] operation results.
|
166
235
|
#
|
167
236
|
def list_next(next_page_link, custom_headers = nil)
|
237
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
238
|
+
response.body unless response.nil?
|
239
|
+
end
|
240
|
+
|
241
|
+
#
|
242
|
+
# Gets a list of deployments operations.
|
243
|
+
#
|
244
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
245
|
+
# call to List operation.
|
246
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
247
|
+
# will be added to the HTTP request.
|
248
|
+
#
|
249
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
250
|
+
#
|
251
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
252
|
+
list_next_async(next_page_link, custom_headers).value!
|
253
|
+
end
|
254
|
+
|
255
|
+
#
|
256
|
+
# Gets a list of deployments operations.
|
257
|
+
#
|
258
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
259
|
+
# call to List operation.
|
260
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
261
|
+
# to the HTTP request.
|
262
|
+
#
|
263
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
264
|
+
#
|
265
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
168
266
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
169
267
|
request_headers = {}
|
170
268
|
|
@@ -177,7 +275,10 @@ module Azure::ARM::Resources
|
|
177
275
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
178
276
|
headers: request_headers.merge(custom_headers || {})
|
179
277
|
}
|
180
|
-
|
278
|
+
|
279
|
+
request_url = @base_url || @client.base_url
|
280
|
+
|
281
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
181
282
|
promise = request.run_promise do |req|
|
182
283
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
183
284
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 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
|
|
@@ -23,8 +23,7 @@ module Azure::ARM::Resources
|
|
23
23
|
attr_reader :client
|
24
24
|
|
25
25
|
#
|
26
|
-
#
|
27
|
-
# processing the request, call GetLongRunningOperationStatus.
|
26
|
+
# Delete deployment.
|
28
27
|
#
|
29
28
|
# @param resource_group_name [String] The name of the resource group. The name
|
30
29
|
# is case insensitive.
|
@@ -34,7 +33,7 @@ module Azure::ARM::Resources
|
|
34
33
|
#
|
35
34
|
def delete(resource_group_name, deployment_name, custom_headers = nil)
|
36
35
|
# Send request
|
37
|
-
promise =
|
36
|
+
promise = begin_delete_async(resource_group_name, deployment_name, custom_headers)
|
38
37
|
|
39
38
|
promise = promise.then do |response|
|
40
39
|
# Defining deserialization method.
|
@@ -42,26 +41,54 @@ module Azure::ARM::Resources
|
|
42
41
|
end
|
43
42
|
|
44
43
|
# Waiting for response.
|
45
|
-
@client.
|
44
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
46
45
|
end
|
47
46
|
|
48
47
|
promise
|
49
48
|
end
|
50
49
|
|
51
50
|
#
|
52
|
-
#
|
53
|
-
# processing the request, call GetLongRunningOperationStatus.
|
51
|
+
# Delete deployment.
|
54
52
|
#
|
55
53
|
# @param resource_group_name [String] The name of the resource group. The name
|
56
54
|
# is case insensitive.
|
57
55
|
# @param deployment_name [String] The name of the deployment to be deleted.
|
58
|
-
# @param [Hash{String => String}]
|
59
|
-
#
|
56
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
57
|
+
# will be added to the HTTP request.
|
60
58
|
#
|
61
|
-
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
62
|
-
# response.
|
63
59
|
#
|
64
60
|
def begin_delete(resource_group_name, deployment_name, custom_headers = nil)
|
61
|
+
response = begin_delete_async(resource_group_name, deployment_name, custom_headers).value!
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# Delete deployment.
|
67
|
+
#
|
68
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
69
|
+
# is case insensitive.
|
70
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
71
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
72
|
+
# will be added to the HTTP request.
|
73
|
+
#
|
74
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
75
|
+
#
|
76
|
+
def begin_delete_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
77
|
+
begin_delete_async(resource_group_name, deployment_name, custom_headers).value!
|
78
|
+
end
|
79
|
+
|
80
|
+
#
|
81
|
+
# Delete deployment.
|
82
|
+
#
|
83
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
84
|
+
# is case insensitive.
|
85
|
+
# @param deployment_name [String] The name of the deployment to be deleted.
|
86
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
87
|
+
# to the HTTP request.
|
88
|
+
#
|
89
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
90
|
+
#
|
91
|
+
def begin_delete_async(resource_group_name, deployment_name, custom_headers = nil)
|
65
92
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
66
93
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
67
94
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -78,7 +105,10 @@ module Azure::ARM::Resources
|
|
78
105
|
query_params: {'api-version' => @client.api_version},
|
79
106
|
headers: request_headers.merge(custom_headers || {})
|
80
107
|
}
|
81
|
-
|
108
|
+
|
109
|
+
request_url = @base_url || @client.base_url
|
110
|
+
|
111
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
82
112
|
promise = request.run_promise do |req|
|
83
113
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
84
114
|
end
|
@@ -107,13 +137,43 @@ module Azure::ARM::Resources
|
|
107
137
|
# @param resource_group_name [String] The name of the resource group to check.
|
108
138
|
# The name is case insensitive.
|
109
139
|
# @param deployment_name [String] The name of the deployment.
|
110
|
-
# @param [Hash{String => String}]
|
111
|
-
#
|
140
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
|
+
# will be added to the HTTP request.
|
112
142
|
#
|
113
|
-
# @return [
|
114
|
-
# response.
|
143
|
+
# @return [Boolean] operation results.
|
115
144
|
#
|
116
145
|
def check_existence(resource_group_name, deployment_name, custom_headers = nil)
|
146
|
+
response = check_existence_async(resource_group_name, deployment_name, custom_headers).value!
|
147
|
+
response.body unless response.nil?
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Checks whether deployment exists.
|
152
|
+
#
|
153
|
+
# @param resource_group_name [String] The name of the resource group to check.
|
154
|
+
# The name is case insensitive.
|
155
|
+
# @param deployment_name [String] The name of the deployment.
|
156
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
157
|
+
# will be added to the HTTP request.
|
158
|
+
#
|
159
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
160
|
+
#
|
161
|
+
def check_existence_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
162
|
+
check_existence_async(resource_group_name, deployment_name, custom_headers).value!
|
163
|
+
end
|
164
|
+
|
165
|
+
#
|
166
|
+
# Checks whether deployment exists.
|
167
|
+
#
|
168
|
+
# @param resource_group_name [String] The name of the resource group to check.
|
169
|
+
# The name is case insensitive.
|
170
|
+
# @param deployment_name [String] The name of the deployment.
|
171
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
172
|
+
# to the HTTP request.
|
173
|
+
#
|
174
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
175
|
+
#
|
176
|
+
def check_existence_async(resource_group_name, deployment_name, custom_headers = nil)
|
117
177
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
118
178
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
119
179
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -130,7 +190,10 @@ module Azure::ARM::Resources
|
|
130
190
|
query_params: {'api-version' => @client.api_version},
|
131
191
|
headers: request_headers.merge(custom_headers || {})
|
132
192
|
}
|
133
|
-
|
193
|
+
|
194
|
+
request_url = @base_url || @client.base_url
|
195
|
+
|
196
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :head, options)
|
134
197
|
promise = request.run_promise do |req|
|
135
198
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
136
199
|
end
|
@@ -174,7 +237,7 @@ module Azure::ARM::Resources
|
|
174
237
|
#
|
175
238
|
def create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
176
239
|
# Send request
|
177
|
-
promise =
|
240
|
+
promise = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers)
|
178
241
|
|
179
242
|
promise = promise.then do |response|
|
180
243
|
# Defining deserialization method.
|
@@ -185,7 +248,7 @@ module Azure::ARM::Resources
|
|
185
248
|
end
|
186
249
|
|
187
250
|
# Waiting for response.
|
188
|
-
@client.
|
251
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
189
252
|
end
|
190
253
|
|
191
254
|
promise
|
@@ -199,13 +262,47 @@ module Azure::ARM::Resources
|
|
199
262
|
# @param deployment_name [String] The name of the deployment.
|
200
263
|
# @param parameters [Deployment] Additional parameters supplied to the
|
201
264
|
# operation.
|
202
|
-
# @param [Hash{String => String}]
|
203
|
-
#
|
265
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
266
|
+
# will be added to the HTTP request.
|
204
267
|
#
|
205
|
-
# @return [
|
206
|
-
# response.
|
268
|
+
# @return [DeploymentExtended] operation results.
|
207
269
|
#
|
208
270
|
def begin_create_or_update(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
271
|
+
response = begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
272
|
+
response.body unless response.nil?
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# Create a named template deployment using a template.
|
277
|
+
#
|
278
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
279
|
+
# is case insensitive.
|
280
|
+
# @param deployment_name [String] The name of the deployment.
|
281
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
282
|
+
# operation.
|
283
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
284
|
+
# will be added to the HTTP request.
|
285
|
+
#
|
286
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
287
|
+
#
|
288
|
+
def begin_create_or_update_with_http_info(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
289
|
+
begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
290
|
+
end
|
291
|
+
|
292
|
+
#
|
293
|
+
# Create a named template deployment using a template.
|
294
|
+
#
|
295
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
296
|
+
# is case insensitive.
|
297
|
+
# @param deployment_name [String] The name of the deployment.
|
298
|
+
# @param parameters [Deployment] Additional parameters supplied to the
|
299
|
+
# operation.
|
300
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
301
|
+
# to the HTTP request.
|
302
|
+
#
|
303
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
304
|
+
#
|
305
|
+
def begin_create_or_update_async(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
209
306
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
210
307
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
211
308
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
@@ -223,7 +320,7 @@ module Azure::ARM::Resources
|
|
223
320
|
unless parameters.nil?
|
224
321
|
parameters = Deployment.serialize_object(parameters)
|
225
322
|
end
|
226
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
323
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
227
324
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
228
325
|
options = {
|
229
326
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -232,7 +329,10 @@ module Azure::ARM::Resources
|
|
232
329
|
body: request_content,
|
233
330
|
headers: request_headers.merge(custom_headers || {})
|
234
331
|
}
|
235
|
-
|
332
|
+
|
333
|
+
request_url = @base_url || @client.base_url
|
334
|
+
|
335
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
236
336
|
promise = request.run_promise do |req|
|
237
337
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
238
338
|
end
|
@@ -285,13 +385,43 @@ module Azure::ARM::Resources
|
|
285
385
|
# @param resource_group_name [String] The name of the resource group to get.
|
286
386
|
# The name is case insensitive.
|
287
387
|
# @param deployment_name [String] The name of the deployment.
|
288
|
-
# @param [Hash{String => String}]
|
289
|
-
#
|
388
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
389
|
+
# will be added to the HTTP request.
|
290
390
|
#
|
291
|
-
# @return [
|
292
|
-
# response.
|
391
|
+
# @return [DeploymentExtended] operation results.
|
293
392
|
#
|
294
393
|
def get(resource_group_name, deployment_name, custom_headers = nil)
|
394
|
+
response = get_async(resource_group_name, deployment_name, custom_headers).value!
|
395
|
+
response.body unless response.nil?
|
396
|
+
end
|
397
|
+
|
398
|
+
#
|
399
|
+
# Get a deployment.
|
400
|
+
#
|
401
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
402
|
+
# The name is case insensitive.
|
403
|
+
# @param deployment_name [String] The name of the deployment.
|
404
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
405
|
+
# will be added to the HTTP request.
|
406
|
+
#
|
407
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
408
|
+
#
|
409
|
+
def get_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
410
|
+
get_async(resource_group_name, deployment_name, custom_headers).value!
|
411
|
+
end
|
412
|
+
|
413
|
+
#
|
414
|
+
# Get a deployment.
|
415
|
+
#
|
416
|
+
# @param resource_group_name [String] The name of the resource group to get.
|
417
|
+
# The name is case insensitive.
|
418
|
+
# @param deployment_name [String] The name of the deployment.
|
419
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
420
|
+
# to the HTTP request.
|
421
|
+
#
|
422
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
423
|
+
#
|
424
|
+
def get_async(resource_group_name, deployment_name, custom_headers = nil)
|
295
425
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
296
426
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
297
427
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -308,7 +438,10 @@ module Azure::ARM::Resources
|
|
308
438
|
query_params: {'api-version' => @client.api_version},
|
309
439
|
headers: request_headers.merge(custom_headers || {})
|
310
440
|
}
|
311
|
-
|
441
|
+
|
442
|
+
request_url = @base_url || @client.base_url
|
443
|
+
|
444
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
312
445
|
promise = request.run_promise do |req|
|
313
446
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
314
447
|
end
|
@@ -349,13 +482,42 @@ module Azure::ARM::Resources
|
|
349
482
|
# @param resource_group_name [String] The name of the resource group. The name
|
350
483
|
# is case insensitive.
|
351
484
|
# @param deployment_name [String] The name of the deployment.
|
352
|
-
# @param [Hash{String => String}]
|
353
|
-
#
|
485
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
486
|
+
# will be added to the HTTP request.
|
354
487
|
#
|
355
|
-
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
356
|
-
# response.
|
357
488
|
#
|
358
489
|
def cancel(resource_group_name, deployment_name, custom_headers = nil)
|
490
|
+
response = cancel_async(resource_group_name, deployment_name, custom_headers).value!
|
491
|
+
nil
|
492
|
+
end
|
493
|
+
|
494
|
+
#
|
495
|
+
# Cancel a currently running template deployment.
|
496
|
+
#
|
497
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
498
|
+
# is case insensitive.
|
499
|
+
# @param deployment_name [String] The name of the deployment.
|
500
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
501
|
+
# will be added to the HTTP request.
|
502
|
+
#
|
503
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
504
|
+
#
|
505
|
+
def cancel_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
506
|
+
cancel_async(resource_group_name, deployment_name, custom_headers).value!
|
507
|
+
end
|
508
|
+
|
509
|
+
#
|
510
|
+
# Cancel a currently running template deployment.
|
511
|
+
#
|
512
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
513
|
+
# is case insensitive.
|
514
|
+
# @param deployment_name [String] The name of the deployment.
|
515
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
516
|
+
# to the HTTP request.
|
517
|
+
#
|
518
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
519
|
+
#
|
520
|
+
def cancel_async(resource_group_name, deployment_name, custom_headers = nil)
|
359
521
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
360
522
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
361
523
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -372,7 +534,10 @@ module Azure::ARM::Resources
|
|
372
534
|
query_params: {'api-version' => @client.api_version},
|
373
535
|
headers: request_headers.merge(custom_headers || {})
|
374
536
|
}
|
375
|
-
|
537
|
+
|
538
|
+
request_url = @base_url || @client.base_url
|
539
|
+
|
540
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
376
541
|
promise = request.run_promise do |req|
|
377
542
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
378
543
|
end
|
@@ -402,13 +567,45 @@ module Azure::ARM::Resources
|
|
402
567
|
# is case insensitive.
|
403
568
|
# @param deployment_name [String] The name of the deployment.
|
404
569
|
# @param parameters [Deployment] Deployment to validate.
|
405
|
-
# @param [Hash{String => String}]
|
406
|
-
#
|
570
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
571
|
+
# will be added to the HTTP request.
|
407
572
|
#
|
408
|
-
# @return [
|
409
|
-
# response.
|
573
|
+
# @return [DeploymentValidateResult] operation results.
|
410
574
|
#
|
411
575
|
def validate(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
576
|
+
response = validate_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
577
|
+
response.body unless response.nil?
|
578
|
+
end
|
579
|
+
|
580
|
+
#
|
581
|
+
# Validate a deployment template.
|
582
|
+
#
|
583
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
584
|
+
# is case insensitive.
|
585
|
+
# @param deployment_name [String] The name of the deployment.
|
586
|
+
# @param parameters [Deployment] Deployment to validate.
|
587
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
588
|
+
# will be added to the HTTP request.
|
589
|
+
#
|
590
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
591
|
+
#
|
592
|
+
def validate_with_http_info(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
593
|
+
validate_async(resource_group_name, deployment_name, parameters, custom_headers).value!
|
594
|
+
end
|
595
|
+
|
596
|
+
#
|
597
|
+
# Validate a deployment template.
|
598
|
+
#
|
599
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
600
|
+
# is case insensitive.
|
601
|
+
# @param deployment_name [String] The name of the deployment.
|
602
|
+
# @param parameters [Deployment] Deployment to validate.
|
603
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
604
|
+
# to the HTTP request.
|
605
|
+
#
|
606
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
607
|
+
#
|
608
|
+
def validate_async(resource_group_name, deployment_name, parameters, custom_headers = nil)
|
412
609
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
413
610
|
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
414
611
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
@@ -426,7 +623,7 @@ module Azure::ARM::Resources
|
|
426
623
|
unless parameters.nil?
|
427
624
|
parameters = Deployment.serialize_object(parameters)
|
428
625
|
end
|
429
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
626
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
430
627
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'
|
431
628
|
options = {
|
432
629
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -435,7 +632,10 @@ module Azure::ARM::Resources
|
|
435
632
|
body: request_content,
|
436
633
|
headers: request_headers.merge(custom_headers || {})
|
437
634
|
}
|
438
|
-
|
635
|
+
|
636
|
+
request_url = @base_url || @client.base_url
|
637
|
+
|
638
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
439
639
|
promise = request.run_promise do |req|
|
440
640
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
441
641
|
end
|
@@ -482,6 +682,103 @@ module Azure::ARM::Resources
|
|
482
682
|
promise.execute
|
483
683
|
end
|
484
684
|
|
685
|
+
#
|
686
|
+
# Exports a deployment template.
|
687
|
+
#
|
688
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
689
|
+
# is case insensitive.
|
690
|
+
# @param deployment_name [String] The name of the deployment.
|
691
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
692
|
+
# will be added to the HTTP request.
|
693
|
+
#
|
694
|
+
# @return [DeploymentExportResult] operation results.
|
695
|
+
#
|
696
|
+
def export_template(resource_group_name, deployment_name, custom_headers = nil)
|
697
|
+
response = export_template_async(resource_group_name, deployment_name, custom_headers).value!
|
698
|
+
response.body unless response.nil?
|
699
|
+
end
|
700
|
+
|
701
|
+
#
|
702
|
+
# Exports a deployment template.
|
703
|
+
#
|
704
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
705
|
+
# is case insensitive.
|
706
|
+
# @param deployment_name [String] The name of the deployment.
|
707
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
708
|
+
# will be added to the HTTP request.
|
709
|
+
#
|
710
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
711
|
+
#
|
712
|
+
def export_template_with_http_info(resource_group_name, deployment_name, custom_headers = nil)
|
713
|
+
export_template_async(resource_group_name, deployment_name, custom_headers).value!
|
714
|
+
end
|
715
|
+
|
716
|
+
#
|
717
|
+
# Exports a deployment template.
|
718
|
+
#
|
719
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
720
|
+
# is case insensitive.
|
721
|
+
# @param deployment_name [String] The name of the deployment.
|
722
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
723
|
+
# to the HTTP request.
|
724
|
+
#
|
725
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
726
|
+
#
|
727
|
+
def export_template_async(resource_group_name, deployment_name, custom_headers = nil)
|
728
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
729
|
+
fail ArgumentError, 'deployment_name is nil' if deployment_name.nil?
|
730
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
731
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
732
|
+
request_headers = {}
|
733
|
+
|
734
|
+
# Set Headers
|
735
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
736
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
737
|
+
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'
|
738
|
+
options = {
|
739
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
740
|
+
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
741
|
+
query_params: {'api-version' => @client.api_version},
|
742
|
+
headers: request_headers.merge(custom_headers || {})
|
743
|
+
}
|
744
|
+
|
745
|
+
request_url = @base_url || @client.base_url
|
746
|
+
|
747
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
748
|
+
promise = request.run_promise do |req|
|
749
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
750
|
+
end
|
751
|
+
|
752
|
+
promise = promise.then do |http_response|
|
753
|
+
status_code = http_response.status
|
754
|
+
response_content = http_response.body
|
755
|
+
unless status_code == 200
|
756
|
+
error_model = JSON.load(response_content)
|
757
|
+
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
758
|
+
end
|
759
|
+
|
760
|
+
# Create Result
|
761
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
762
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
763
|
+
# Deserialize Response
|
764
|
+
if status_code == 200
|
765
|
+
begin
|
766
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
767
|
+
unless parsed_response.nil?
|
768
|
+
parsed_response = DeploymentExportResult.deserialize_object(parsed_response)
|
769
|
+
end
|
770
|
+
result.body = parsed_response
|
771
|
+
rescue Exception => e
|
772
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
773
|
+
end
|
774
|
+
end
|
775
|
+
|
776
|
+
result
|
777
|
+
end
|
778
|
+
|
779
|
+
promise.execute
|
780
|
+
end
|
781
|
+
|
485
782
|
#
|
486
783
|
# Get a list of deployments.
|
487
784
|
#
|
@@ -490,13 +787,47 @@ module Azure::ARM::Resources
|
|
490
787
|
# @param filter [String] The filter to apply on the operation.
|
491
788
|
# @param top [Integer] Query parameters. If null is passed returns all
|
492
789
|
# deployments.
|
493
|
-
# @param [Hash{String => String}]
|
494
|
-
#
|
790
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
791
|
+
# will be added to the HTTP request.
|
495
792
|
#
|
496
|
-
# @return [
|
497
|
-
# response.
|
793
|
+
# @return [DeploymentListResult] operation results.
|
498
794
|
#
|
499
795
|
def list(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
796
|
+
response = list_async(resource_group_name, filter, top, custom_headers).value!
|
797
|
+
response.body unless response.nil?
|
798
|
+
end
|
799
|
+
|
800
|
+
#
|
801
|
+
# Get a list of deployments.
|
802
|
+
#
|
803
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
804
|
+
# by. The name is case insensitive.
|
805
|
+
# @param filter [String] The filter to apply on the operation.
|
806
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
807
|
+
# deployments.
|
808
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
809
|
+
# will be added to the HTTP request.
|
810
|
+
#
|
811
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
812
|
+
#
|
813
|
+
def list_with_http_info(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
814
|
+
list_async(resource_group_name, filter, top, custom_headers).value!
|
815
|
+
end
|
816
|
+
|
817
|
+
#
|
818
|
+
# Get a list of deployments.
|
819
|
+
#
|
820
|
+
# @param resource_group_name [String] The name of the resource group to filter
|
821
|
+
# by. The name is case insensitive.
|
822
|
+
# @param filter [String] The filter to apply on the operation.
|
823
|
+
# @param top [Integer] Query parameters. If null is passed returns all
|
824
|
+
# deployments.
|
825
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
826
|
+
# to the HTTP request.
|
827
|
+
#
|
828
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
829
|
+
#
|
830
|
+
def list_async(resource_group_name, filter = nil, top = nil, custom_headers = nil)
|
500
831
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
501
832
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
502
833
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
@@ -512,7 +843,10 @@ module Azure::ARM::Resources
|
|
512
843
|
query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
|
513
844
|
headers: request_headers.merge(custom_headers || {})
|
514
845
|
}
|
515
|
-
|
846
|
+
|
847
|
+
request_url = @base_url || @client.base_url
|
848
|
+
|
849
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
516
850
|
promise = request.run_promise do |req|
|
517
851
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
518
852
|
end
|
@@ -552,13 +886,41 @@ module Azure::ARM::Resources
|
|
552
886
|
#
|
553
887
|
# @param next_page_link [String] The NextLink from the previous successful
|
554
888
|
# call to List operation.
|
555
|
-
# @param [Hash{String => String}]
|
556
|
-
#
|
889
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
890
|
+
# will be added to the HTTP request.
|
557
891
|
#
|
558
|
-
# @return [
|
559
|
-
# response.
|
892
|
+
# @return [DeploymentListResult] operation results.
|
560
893
|
#
|
561
894
|
def list_next(next_page_link, custom_headers = nil)
|
895
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
896
|
+
response.body unless response.nil?
|
897
|
+
end
|
898
|
+
|
899
|
+
#
|
900
|
+
# Get a list of deployments.
|
901
|
+
#
|
902
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
903
|
+
# call to List operation.
|
904
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
905
|
+
# will be added to the HTTP request.
|
906
|
+
#
|
907
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
908
|
+
#
|
909
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
910
|
+
list_next_async(next_page_link, custom_headers).value!
|
911
|
+
end
|
912
|
+
|
913
|
+
#
|
914
|
+
# Get a list of deployments.
|
915
|
+
#
|
916
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
917
|
+
# call to List operation.
|
918
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
919
|
+
# to the HTTP request.
|
920
|
+
#
|
921
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
922
|
+
#
|
923
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
562
924
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
563
925
|
request_headers = {}
|
564
926
|
|
@@ -571,7 +933,10 @@ module Azure::ARM::Resources
|
|
571
933
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
572
934
|
headers: request_headers.merge(custom_headers || {})
|
573
935
|
}
|
574
|
-
|
936
|
+
|
937
|
+
request_url = @base_url || @client.base_url
|
938
|
+
|
939
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
575
940
|
promise = request.run_promise do |req|
|
576
941
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
577
942
|
end
|