azure_mgmt_netapp 0.18.1 → 0.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
- data/lib/2019-05-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
- data/lib/2019-06-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
- data/lib/2019-07-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
- data/lib/2019-08-01/generated/azure_mgmt_netapp.rb +65 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/accounts.rb +651 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +157 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/active_directory.rb +127 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/mount_target.rb +230 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/replication_object.rb +81 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshot.rb +158 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +54 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume.rb +289 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +49 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/mount_targets.rb +136 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/operations.rb +115 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/pools.rb +675 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/snapshots.rb +708 -0
- data/lib/2019-08-01/generated/azure_mgmt_netapp/volumes.rb +694 -0
- data/lib/azure_mgmt_netapp.rb +1 -0
- data/lib/profiles/latest/modules/netapp_profile_module.rb +89 -79
- data/lib/version.rb +1 -1
- metadata +43 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec67ad1c2b91d5e62198bc94d594af02cfa2ec408adbaf69cbf5df7f71e25599
|
4
|
+
data.tar.gz: 67ccbc7d98adfd90225340a0ba71178610d2f25809294a23507ea5f8442594e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0d388ec9a5fbaa969439d57e3546fe59c3c50f2e0c3fdad95017405572bc0774ba0a05f936b3e4c7ad5afdaf254c70107b1a6967faf04c326b97cae822d5d89
|
7
|
+
data.tar.gz: 88ee84b4f21deec643711ec8ee4bab89165419ea00d2eb7282cf5feff7fe2f8e4e3d16b99dd25b8281ebf9d50ea15908e92503040c21bbfe32a61313105fec05
|
data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb
CHANGED
@@ -146,7 +146,7 @@ module Azure::NetApp::Mgmt::V2017_08_15_preview
|
|
146
146
|
#
|
147
147
|
def add_telemetry
|
148
148
|
sdk_information = 'azure_mgmt_netapp'
|
149
|
-
sdk_information = "#{sdk_information}/0.18.
|
149
|
+
sdk_information = "#{sdk_information}/0.18.2"
|
150
150
|
add_user_agent_information(sdk_information)
|
151
151
|
end
|
152
152
|
end
|
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_05_01
|
|
412
412
|
#
|
413
413
|
def add_telemetry
|
414
414
|
sdk_information = 'azure_mgmt_netapp'
|
415
|
-
sdk_information = "#{sdk_information}/0.18.
|
415
|
+
sdk_information = "#{sdk_information}/0.18.2"
|
416
416
|
add_user_agent_information(sdk_information)
|
417
417
|
end
|
418
418
|
end
|
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_06_01
|
|
412
412
|
#
|
413
413
|
def add_telemetry
|
414
414
|
sdk_information = 'azure_mgmt_netapp'
|
415
|
-
sdk_information = "#{sdk_information}/0.18.
|
415
|
+
sdk_information = "#{sdk_information}/0.18.2"
|
416
416
|
add_user_agent_information(sdk_information)
|
417
417
|
end
|
418
418
|
end
|
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_07_01
|
|
412
412
|
#
|
413
413
|
def add_telemetry
|
414
414
|
sdk_information = 'azure_mgmt_netapp'
|
415
|
-
sdk_information = "#{sdk_information}/0.18.
|
415
|
+
sdk_information = "#{sdk_information}/0.18.2"
|
416
416
|
add_user_agent_information(sdk_information)
|
417
417
|
end
|
418
418
|
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-08-01/generated/azure_mgmt_netapp/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::NetApp::Mgmt::V2019_08_01
|
23
|
+
autoload :Operations, '2019-08-01/generated/azure_mgmt_netapp/operations.rb'
|
24
|
+
autoload :NetAppResource, '2019-08-01/generated/azure_mgmt_netapp/net_app_resource.rb'
|
25
|
+
autoload :Accounts, '2019-08-01/generated/azure_mgmt_netapp/accounts.rb'
|
26
|
+
autoload :Pools, '2019-08-01/generated/azure_mgmt_netapp/pools.rb'
|
27
|
+
autoload :Volumes, '2019-08-01/generated/azure_mgmt_netapp/volumes.rb'
|
28
|
+
autoload :MountTargets, '2019-08-01/generated/azure_mgmt_netapp/mount_targets.rb'
|
29
|
+
autoload :Snapshots, '2019-08-01/generated/azure_mgmt_netapp/snapshots.rb'
|
30
|
+
autoload :AzureNetAppFilesManagementClient, '2019-08-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb'
|
31
|
+
|
32
|
+
module Models
|
33
|
+
autoload :CapacityPoolPatch, '2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb'
|
34
|
+
autoload :OperationDisplay, '2019-08-01/generated/azure_mgmt_netapp/models/operation_display.rb'
|
35
|
+
autoload :ExportPolicyRule, '2019-08-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb'
|
36
|
+
autoload :MetricSpecification, '2019-08-01/generated/azure_mgmt_netapp/models/metric_specification.rb'
|
37
|
+
autoload :VolumePropertiesExportPolicy, '2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb'
|
38
|
+
autoload :Operation, '2019-08-01/generated/azure_mgmt_netapp/models/operation.rb'
|
39
|
+
autoload :ReplicationObject, '2019-08-01/generated/azure_mgmt_netapp/models/replication_object.rb'
|
40
|
+
autoload :ResourceNameAvailability, '2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb'
|
41
|
+
autoload :VolumePropertiesDataProtection, '2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb'
|
42
|
+
autoload :ActiveDirectory, '2019-08-01/generated/azure_mgmt_netapp/models/active_directory.rb'
|
43
|
+
autoload :Volume, '2019-08-01/generated/azure_mgmt_netapp/models/volume.rb'
|
44
|
+
autoload :NetAppAccountList, '2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb'
|
45
|
+
autoload :VolumeList, '2019-08-01/generated/azure_mgmt_netapp/models/volume_list.rb'
|
46
|
+
autoload :CapacityPool, '2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool.rb'
|
47
|
+
autoload :VolumePatchPropertiesExportPolicy, '2019-08-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb'
|
48
|
+
autoload :Dimension, '2019-08-01/generated/azure_mgmt_netapp/models/dimension.rb'
|
49
|
+
autoload :VolumePatch, '2019-08-01/generated/azure_mgmt_netapp/models/volume_patch.rb'
|
50
|
+
autoload :OperationListResult, '2019-08-01/generated/azure_mgmt_netapp/models/operation_list_result.rb'
|
51
|
+
autoload :MountTarget, '2019-08-01/generated/azure_mgmt_netapp/models/mount_target.rb'
|
52
|
+
autoload :NetAppAccount, '2019-08-01/generated/azure_mgmt_netapp/models/net_app_account.rb'
|
53
|
+
autoload :MountTargetList, '2019-08-01/generated/azure_mgmt_netapp/models/mount_target_list.rb'
|
54
|
+
autoload :CapacityPoolList, '2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb'
|
55
|
+
autoload :Snapshot, '2019-08-01/generated/azure_mgmt_netapp/models/snapshot.rb'
|
56
|
+
autoload :ResourceNameAvailabilityRequest, '2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb'
|
57
|
+
autoload :SnapshotsList, '2019-08-01/generated/azure_mgmt_netapp/models/snapshots_list.rb'
|
58
|
+
autoload :ServiceSpecification, '2019-08-01/generated/azure_mgmt_netapp/models/service_specification.rb'
|
59
|
+
autoload :SnapshotPatch, '2019-08-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb'
|
60
|
+
autoload :NetAppAccountPatch, '2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb'
|
61
|
+
autoload :InAvailabilityReasonType, '2019-08-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb'
|
62
|
+
autoload :CheckNameResourceTypes, '2019-08-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb'
|
63
|
+
autoload :ServiceLevel, '2019-08-01/generated/azure_mgmt_netapp/models/service_level.rb'
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,651 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::NetApp::Mgmt::V2019_08_01
|
7
|
+
#
|
8
|
+
# Microsoft NetApp Azure Resource Provider specification
|
9
|
+
#
|
10
|
+
class Accounts
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Accounts class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Describe all NetApp Accounts in a resource group
|
26
|
+
#
|
27
|
+
# List and describe all NetApp accounts in the resource group.
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [NetAppAccountList] operation results.
|
34
|
+
#
|
35
|
+
def list(resource_group_name, custom_headers:nil)
|
36
|
+
response = list_async(resource_group_name, custom_headers:custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Describe all NetApp Accounts in a resource group
|
42
|
+
#
|
43
|
+
# List and describe all NetApp accounts in the resource group.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group.
|
46
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
47
|
+
# will be added to the HTTP request.
|
48
|
+
#
|
49
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
|
+
#
|
51
|
+
def list_with_http_info(resource_group_name, custom_headers:nil)
|
52
|
+
list_async(resource_group_name, custom_headers:custom_headers).value!
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Describe all NetApp Accounts in a resource group
|
57
|
+
#
|
58
|
+
# List and describe all NetApp accounts in the resource group.
|
59
|
+
#
|
60
|
+
# @param resource_group_name [String] The name of the resource group.
|
61
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
62
|
+
# to the HTTP request.
|
63
|
+
#
|
64
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
|
+
#
|
66
|
+
def list_async(resource_group_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
70
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
71
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
72
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
73
|
+
|
74
|
+
|
75
|
+
request_headers = {}
|
76
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
77
|
+
|
78
|
+
# Set Headers
|
79
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
80
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
81
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts'
|
82
|
+
|
83
|
+
request_url = @base_url || @client.base_url
|
84
|
+
|
85
|
+
options = {
|
86
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
87
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
88
|
+
query_params: {'api-version' => @client.api_version},
|
89
|
+
headers: request_headers.merge(custom_headers || {}),
|
90
|
+
base_url: request_url
|
91
|
+
}
|
92
|
+
promise = @client.make_request_async(:get, path_template, options)
|
93
|
+
|
94
|
+
promise = promise.then do |result|
|
95
|
+
http_response = result.response
|
96
|
+
status_code = http_response.status
|
97
|
+
response_content = http_response.body
|
98
|
+
unless status_code == 200
|
99
|
+
error_model = JSON.load(response_content)
|
100
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
101
|
+
end
|
102
|
+
|
103
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
104
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
105
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
106
|
+
# Deserialize Response
|
107
|
+
if status_code == 200
|
108
|
+
begin
|
109
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
110
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccountList.mapper()
|
111
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
112
|
+
rescue Exception => e
|
113
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
promise.execute
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Describe a NetApp Account
|
125
|
+
#
|
126
|
+
# Get the NetApp account
|
127
|
+
#
|
128
|
+
# @param resource_group_name [String] The name of the resource group.
|
129
|
+
# @param account_name [String] The name of the NetApp account
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [NetAppAccount] operation results.
|
134
|
+
#
|
135
|
+
def get(resource_group_name, account_name, custom_headers:nil)
|
136
|
+
response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
137
|
+
response.body unless response.nil?
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Describe a NetApp Account
|
142
|
+
#
|
143
|
+
# Get the NetApp account
|
144
|
+
#
|
145
|
+
# @param resource_group_name [String] The name of the resource group.
|
146
|
+
# @param account_name [String] The name of the NetApp account
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
148
|
+
# will be added to the HTTP request.
|
149
|
+
#
|
150
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
151
|
+
#
|
152
|
+
def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
153
|
+
get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
154
|
+
end
|
155
|
+
|
156
|
+
#
|
157
|
+
# Describe a NetApp Account
|
158
|
+
#
|
159
|
+
# Get the NetApp account
|
160
|
+
#
|
161
|
+
# @param resource_group_name [String] The name of the resource group.
|
162
|
+
# @param account_name [String] The name of the NetApp account
|
163
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
164
|
+
# to the HTTP request.
|
165
|
+
#
|
166
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
167
|
+
#
|
168
|
+
def get_async(resource_group_name, account_name, custom_headers:nil)
|
169
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
170
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
171
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
172
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
173
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
174
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
175
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
176
|
+
|
177
|
+
|
178
|
+
request_headers = {}
|
179
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
180
|
+
|
181
|
+
# Set Headers
|
182
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
183
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
184
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
185
|
+
|
186
|
+
request_url = @base_url || @client.base_url
|
187
|
+
|
188
|
+
options = {
|
189
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
190
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
191
|
+
query_params: {'api-version' => @client.api_version},
|
192
|
+
headers: request_headers.merge(custom_headers || {}),
|
193
|
+
base_url: request_url
|
194
|
+
}
|
195
|
+
promise = @client.make_request_async(:get, path_template, options)
|
196
|
+
|
197
|
+
promise = promise.then do |result|
|
198
|
+
http_response = result.response
|
199
|
+
status_code = http_response.status
|
200
|
+
response_content = http_response.body
|
201
|
+
unless status_code == 200
|
202
|
+
error_model = JSON.load(response_content)
|
203
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
204
|
+
end
|
205
|
+
|
206
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
207
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
208
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
209
|
+
# Deserialize Response
|
210
|
+
if status_code == 200
|
211
|
+
begin
|
212
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
213
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
214
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
215
|
+
rescue Exception => e
|
216
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
result
|
221
|
+
end
|
222
|
+
|
223
|
+
promise.execute
|
224
|
+
end
|
225
|
+
|
226
|
+
#
|
227
|
+
# Create or update a NetApp account
|
228
|
+
#
|
229
|
+
# Create or update the specified NetApp account within the resource group
|
230
|
+
#
|
231
|
+
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
232
|
+
# operation.
|
233
|
+
# @param resource_group_name [String] The name of the resource group.
|
234
|
+
# @param account_name [String] The name of the NetApp account
|
235
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
236
|
+
# will be added to the HTTP request.
|
237
|
+
#
|
238
|
+
# @return [NetAppAccount] operation results.
|
239
|
+
#
|
240
|
+
def create_or_update(body, resource_group_name, account_name, custom_headers:nil)
|
241
|
+
response = create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
242
|
+
response.body unless response.nil?
|
243
|
+
end
|
244
|
+
|
245
|
+
#
|
246
|
+
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
247
|
+
# operation.
|
248
|
+
# @param resource_group_name [String] The name of the resource group.
|
249
|
+
# @param account_name [String] The name of the NetApp account
|
250
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
251
|
+
# will be added to the HTTP request.
|
252
|
+
#
|
253
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
254
|
+
# response.
|
255
|
+
#
|
256
|
+
def create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
|
257
|
+
# Send request
|
258
|
+
promise = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers)
|
259
|
+
|
260
|
+
promise = promise.then do |response|
|
261
|
+
# Defining deserialization method.
|
262
|
+
deserialize_method = lambda do |parsed_response|
|
263
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
264
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Waiting for response.
|
268
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
269
|
+
end
|
270
|
+
|
271
|
+
promise
|
272
|
+
end
|
273
|
+
|
274
|
+
#
|
275
|
+
# Delete a NetApp account
|
276
|
+
#
|
277
|
+
# Delete the specified NetApp account
|
278
|
+
#
|
279
|
+
# @param resource_group_name [String] The name of the resource group.
|
280
|
+
# @param account_name [String] The name of the NetApp account
|
281
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
282
|
+
# will be added to the HTTP request.
|
283
|
+
#
|
284
|
+
def delete(resource_group_name, account_name, custom_headers:nil)
|
285
|
+
response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
286
|
+
nil
|
287
|
+
end
|
288
|
+
|
289
|
+
#
|
290
|
+
# @param resource_group_name [String] The name of the resource group.
|
291
|
+
# @param account_name [String] The name of the NetApp account
|
292
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
293
|
+
# will be added to the HTTP request.
|
294
|
+
#
|
295
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
296
|
+
# response.
|
297
|
+
#
|
298
|
+
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
299
|
+
# Send request
|
300
|
+
promise = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers)
|
301
|
+
|
302
|
+
promise = promise.then do |response|
|
303
|
+
# Defining deserialization method.
|
304
|
+
deserialize_method = lambda do |parsed_response|
|
305
|
+
end
|
306
|
+
|
307
|
+
# Waiting for response.
|
308
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
309
|
+
end
|
310
|
+
|
311
|
+
promise
|
312
|
+
end
|
313
|
+
|
314
|
+
#
|
315
|
+
# Update a NetApp account
|
316
|
+
#
|
317
|
+
# Patch the specified NetApp account
|
318
|
+
#
|
319
|
+
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
320
|
+
# of the operation.
|
321
|
+
# @param resource_group_name [String] The name of the resource group.
|
322
|
+
# @param account_name [String] The name of the NetApp account
|
323
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
324
|
+
# will be added to the HTTP request.
|
325
|
+
#
|
326
|
+
# @return [NetAppAccount] operation results.
|
327
|
+
#
|
328
|
+
def update(body, resource_group_name, account_name, custom_headers:nil)
|
329
|
+
response = update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
330
|
+
response.body unless response.nil?
|
331
|
+
end
|
332
|
+
|
333
|
+
#
|
334
|
+
# Update a NetApp account
|
335
|
+
#
|
336
|
+
# Patch the specified NetApp account
|
337
|
+
#
|
338
|
+
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
339
|
+
# of the operation.
|
340
|
+
# @param resource_group_name [String] The name of the resource group.
|
341
|
+
# @param account_name [String] The name of the NetApp account
|
342
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
343
|
+
# will be added to the HTTP request.
|
344
|
+
#
|
345
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
346
|
+
#
|
347
|
+
def update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
|
348
|
+
update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
349
|
+
end
|
350
|
+
|
351
|
+
#
|
352
|
+
# Update a NetApp account
|
353
|
+
#
|
354
|
+
# Patch the specified NetApp account
|
355
|
+
#
|
356
|
+
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
357
|
+
# of the operation.
|
358
|
+
# @param resource_group_name [String] The name of the resource group.
|
359
|
+
# @param account_name [String] The name of the NetApp account
|
360
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
361
|
+
# to the HTTP request.
|
362
|
+
#
|
363
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
364
|
+
#
|
365
|
+
def update_async(body, resource_group_name, account_name, custom_headers:nil)
|
366
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
367
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
368
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
369
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
370
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
371
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
372
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
373
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
374
|
+
|
375
|
+
|
376
|
+
request_headers = {}
|
377
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
378
|
+
|
379
|
+
# Set Headers
|
380
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
381
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
382
|
+
|
383
|
+
# Serialize Request
|
384
|
+
request_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccountPatch.mapper()
|
385
|
+
request_content = @client.serialize(request_mapper, body)
|
386
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
387
|
+
|
388
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
389
|
+
|
390
|
+
request_url = @base_url || @client.base_url
|
391
|
+
|
392
|
+
options = {
|
393
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
394
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
395
|
+
query_params: {'api-version' => @client.api_version},
|
396
|
+
body: request_content,
|
397
|
+
headers: request_headers.merge(custom_headers || {}),
|
398
|
+
base_url: request_url
|
399
|
+
}
|
400
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
401
|
+
|
402
|
+
promise = promise.then do |result|
|
403
|
+
http_response = result.response
|
404
|
+
status_code = http_response.status
|
405
|
+
response_content = http_response.body
|
406
|
+
unless status_code == 200 || status_code == 202
|
407
|
+
error_model = JSON.load(response_content)
|
408
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
409
|
+
end
|
410
|
+
|
411
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
412
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
413
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
414
|
+
# Deserialize Response
|
415
|
+
if status_code == 200
|
416
|
+
begin
|
417
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
418
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
419
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
420
|
+
rescue Exception => e
|
421
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
result
|
426
|
+
end
|
427
|
+
|
428
|
+
promise.execute
|
429
|
+
end
|
430
|
+
|
431
|
+
#
|
432
|
+
# Create or update a NetApp account
|
433
|
+
#
|
434
|
+
# Create or update the specified NetApp account within the resource group
|
435
|
+
#
|
436
|
+
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
437
|
+
# operation.
|
438
|
+
# @param resource_group_name [String] The name of the resource group.
|
439
|
+
# @param account_name [String] The name of the NetApp account
|
440
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
441
|
+
# will be added to the HTTP request.
|
442
|
+
#
|
443
|
+
# @return [NetAppAccount] operation results.
|
444
|
+
#
|
445
|
+
def begin_create_or_update(body, resource_group_name, account_name, custom_headers:nil)
|
446
|
+
response = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
447
|
+
response.body unless response.nil?
|
448
|
+
end
|
449
|
+
|
450
|
+
#
|
451
|
+
# Create or update a NetApp account
|
452
|
+
#
|
453
|
+
# Create or update the specified NetApp account within the resource group
|
454
|
+
#
|
455
|
+
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
456
|
+
# operation.
|
457
|
+
# @param resource_group_name [String] The name of the resource group.
|
458
|
+
# @param account_name [String] The name of the NetApp account
|
459
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
460
|
+
# will be added to the HTTP request.
|
461
|
+
#
|
462
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
463
|
+
#
|
464
|
+
def begin_create_or_update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
|
465
|
+
begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
466
|
+
end
|
467
|
+
|
468
|
+
#
|
469
|
+
# Create or update a NetApp account
|
470
|
+
#
|
471
|
+
# Create or update the specified NetApp account within the resource group
|
472
|
+
#
|
473
|
+
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
474
|
+
# operation.
|
475
|
+
# @param resource_group_name [String] The name of the resource group.
|
476
|
+
# @param account_name [String] The name of the NetApp account
|
477
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
478
|
+
# to the HTTP request.
|
479
|
+
#
|
480
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
481
|
+
#
|
482
|
+
def begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
|
483
|
+
fail ArgumentError, 'body is nil' if body.nil?
|
484
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
485
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
486
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
487
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
488
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
489
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
490
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
491
|
+
|
492
|
+
|
493
|
+
request_headers = {}
|
494
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
495
|
+
|
496
|
+
# Set Headers
|
497
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
498
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
499
|
+
|
500
|
+
# Serialize Request
|
501
|
+
request_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
502
|
+
request_content = @client.serialize(request_mapper, body)
|
503
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
504
|
+
|
505
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
506
|
+
|
507
|
+
request_url = @base_url || @client.base_url
|
508
|
+
|
509
|
+
options = {
|
510
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
511
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
512
|
+
query_params: {'api-version' => @client.api_version},
|
513
|
+
body: request_content,
|
514
|
+
headers: request_headers.merge(custom_headers || {}),
|
515
|
+
base_url: request_url
|
516
|
+
}
|
517
|
+
promise = @client.make_request_async(:put, path_template, options)
|
518
|
+
|
519
|
+
promise = promise.then do |result|
|
520
|
+
http_response = result.response
|
521
|
+
status_code = http_response.status
|
522
|
+
response_content = http_response.body
|
523
|
+
unless status_code == 200 || status_code == 201 || status_code == 202
|
524
|
+
error_model = JSON.load(response_content)
|
525
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
526
|
+
end
|
527
|
+
|
528
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
529
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
530
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
531
|
+
# Deserialize Response
|
532
|
+
if status_code == 200
|
533
|
+
begin
|
534
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
535
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
536
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
537
|
+
rescue Exception => e
|
538
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
539
|
+
end
|
540
|
+
end
|
541
|
+
# Deserialize Response
|
542
|
+
if status_code == 201
|
543
|
+
begin
|
544
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
545
|
+
result_mapper = Azure::NetApp::Mgmt::V2019_08_01::Models::NetAppAccount.mapper()
|
546
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
547
|
+
rescue Exception => e
|
548
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
result
|
553
|
+
end
|
554
|
+
|
555
|
+
promise.execute
|
556
|
+
end
|
557
|
+
|
558
|
+
#
|
559
|
+
# Delete a NetApp account
|
560
|
+
#
|
561
|
+
# Delete the specified NetApp account
|
562
|
+
#
|
563
|
+
# @param resource_group_name [String] The name of the resource group.
|
564
|
+
# @param account_name [String] The name of the NetApp account
|
565
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
566
|
+
# will be added to the HTTP request.
|
567
|
+
#
|
568
|
+
#
|
569
|
+
def begin_delete(resource_group_name, account_name, custom_headers:nil)
|
570
|
+
response = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
571
|
+
nil
|
572
|
+
end
|
573
|
+
|
574
|
+
#
|
575
|
+
# Delete a NetApp account
|
576
|
+
#
|
577
|
+
# Delete the specified NetApp account
|
578
|
+
#
|
579
|
+
# @param resource_group_name [String] The name of the resource group.
|
580
|
+
# @param account_name [String] The name of the NetApp account
|
581
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
582
|
+
# will be added to the HTTP request.
|
583
|
+
#
|
584
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
585
|
+
#
|
586
|
+
def begin_delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
587
|
+
begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
588
|
+
end
|
589
|
+
|
590
|
+
#
|
591
|
+
# Delete a NetApp account
|
592
|
+
#
|
593
|
+
# Delete the specified NetApp account
|
594
|
+
#
|
595
|
+
# @param resource_group_name [String] The name of the resource group.
|
596
|
+
# @param account_name [String] The name of the NetApp account
|
597
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
598
|
+
# to the HTTP request.
|
599
|
+
#
|
600
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
601
|
+
#
|
602
|
+
def begin_delete_async(resource_group_name, account_name, custom_headers:nil)
|
603
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
604
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
605
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
606
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
607
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
608
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
609
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
610
|
+
|
611
|
+
|
612
|
+
request_headers = {}
|
613
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
614
|
+
|
615
|
+
# Set Headers
|
616
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
617
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
618
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
619
|
+
|
620
|
+
request_url = @base_url || @client.base_url
|
621
|
+
|
622
|
+
options = {
|
623
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
624
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
625
|
+
query_params: {'api-version' => @client.api_version},
|
626
|
+
headers: request_headers.merge(custom_headers || {}),
|
627
|
+
base_url: request_url
|
628
|
+
}
|
629
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
630
|
+
|
631
|
+
promise = promise.then do |result|
|
632
|
+
http_response = result.response
|
633
|
+
status_code = http_response.status
|
634
|
+
response_content = http_response.body
|
635
|
+
unless status_code == 202 || status_code == 204
|
636
|
+
error_model = JSON.load(response_content)
|
637
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
638
|
+
end
|
639
|
+
|
640
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
641
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
642
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
643
|
+
|
644
|
+
result
|
645
|
+
end
|
646
|
+
|
647
|
+
promise.execute
|
648
|
+
end
|
649
|
+
|
650
|
+
end
|
651
|
+
end
|