azure_mgmt_netapp 0.17.3 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/accounts.rb +10 -0
  3. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  4. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/mount_targets.rb +2 -0
  5. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/operations.rb +2 -0
  6. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/pools.rb +10 -0
  7. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb +10 -0
  8. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/volumes.rb +10 -0
  9. data/lib/2019-05-01/generated/azure_mgmt_netapp/accounts.rb +10 -0
  10. data/lib/2019-05-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +29 -25
  11. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +2 -2
  12. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +4 -4
  13. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +4 -4
  14. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume.rb +35 -5
  15. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_patch.rb +2 -2
  16. data/lib/2019-05-01/generated/azure_mgmt_netapp/mount_targets.rb +2 -0
  17. data/lib/2019-05-01/generated/azure_mgmt_netapp/operations.rb +2 -0
  18. data/lib/2019-05-01/generated/azure_mgmt_netapp/pools.rb +10 -0
  19. data/lib/2019-05-01/generated/azure_mgmt_netapp/snapshots.rb +10 -0
  20. data/lib/2019-05-01/generated/azure_mgmt_netapp/volumes.rb +10 -0
  21. data/lib/2019-06-01/generated/azure_mgmt_netapp/accounts.rb +651 -0
  22. data/lib/2019-06-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +419 -0
  23. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/active_directory.rb +127 -0
  24. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +153 -0
  25. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  26. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +125 -0
  27. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  28. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  29. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
  30. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  31. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  32. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/mount_target.rb +210 -0
  33. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +55 -0
  34. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account.rb +125 -0
  35. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  36. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +125 -0
  37. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  38. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  39. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  40. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  41. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  42. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  43. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  44. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshot.rb +150 -0
  45. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +46 -0
  46. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  47. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume.rb +257 -0
  48. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  49. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_patch.rb +139 -0
  50. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  51. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  52. data/lib/2019-06-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  53. data/lib/2019-06-01/generated/azure_mgmt_netapp/mount_targets.rb +136 -0
  54. data/lib/2019-06-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  55. data/lib/2019-06-01/generated/azure_mgmt_netapp/pools.rb +675 -0
  56. data/lib/2019-06-01/generated/azure_mgmt_netapp/snapshots.rb +708 -0
  57. data/lib/2019-06-01/generated/azure_mgmt_netapp/volumes.rb +694 -0
  58. data/lib/2019-06-01/generated/azure_mgmt_netapp.rb +62 -0
  59. data/lib/azure_mgmt_netapp.rb +1 -0
  60. data/lib/profiles/latest/modules/netapp_profile_module.rb +65 -65
  61. data/lib/version.rb +1 -1
  62. metadata +43 -5
@@ -0,0 +1,136 @@
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_06_01
7
+ #
8
+ # Microsoft NetApp Azure Resource Provider specification
9
+ #
10
+ class MountTargets
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the MountTargets 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 mount targets
26
+ #
27
+ # List all mount targets associated with the volume
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group.
30
+ # @param account_name [String] The name of the NetApp account
31
+ # @param pool_name [String] The name of the capacity pool
32
+ # @param volume_name [String] The name of the volume
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [MountTargetList] operation results.
37
+ #
38
+ def list(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
39
+ response = list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Describe all mount targets
45
+ #
46
+ # List all mount targets associated with the volume
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group.
49
+ # @param account_name [String] The name of the NetApp account
50
+ # @param pool_name [String] The name of the capacity pool
51
+ # @param volume_name [String] The name of the volume
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
58
+ list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Describe all mount targets
63
+ #
64
+ # List all mount targets associated with the volume
65
+ #
66
+ # @param resource_group_name [String] The name of the resource group.
67
+ # @param account_name [String] The name of the NetApp account
68
+ # @param pool_name [String] The name of the capacity pool
69
+ # @param volume_name [String] The name of the volume
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
80
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
81
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
82
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
83
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
84
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
85
+
86
+
87
+ request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
89
+
90
+ # Set Headers
91
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
92
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
93
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/mountTargets'
94
+
95
+ request_url = @base_url || @client.base_url
96
+
97
+ options = {
98
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
99
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
100
+ query_params: {'api-version' => @client.api_version},
101
+ headers: request_headers.merge(custom_headers || {}),
102
+ base_url: request_url
103
+ }
104
+ promise = @client.make_request_async(:get, path_template, options)
105
+
106
+ promise = promise.then do |result|
107
+ http_response = result.response
108
+ status_code = http_response.status
109
+ response_content = http_response.body
110
+ unless status_code == 200
111
+ error_model = JSON.load(response_content)
112
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
113
+ end
114
+
115
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
116
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
117
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
118
+ # Deserialize Response
119
+ if status_code == 200
120
+ begin
121
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
122
+ result_mapper = Azure::NetApp::Mgmt::V2019_06_01::Models::MountTargetList.mapper()
123
+ result.body = @client.deserialize(result_mapper, parsed_response)
124
+ rescue Exception => e
125
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
126
+ end
127
+ end
128
+
129
+ result
130
+ end
131
+
132
+ promise.execute
133
+ end
134
+
135
+ end
136
+ end
@@ -0,0 +1,115 @@
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_06_01
7
+ #
8
+ # Microsoft NetApp Azure Resource Provider specification
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations 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
+ # Describes the Resource Provider
26
+ #
27
+ # Lists all of the available Microsoft.NetApp Rest API operations
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [OperationListResult] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ response = list_async(custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Describes the Resource Provider
41
+ #
42
+ # Lists all of the available Microsoft.NetApp Rest API operations
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Describes the Resource Provider
55
+ #
56
+ # Lists all of the available Microsoft.NetApp Rest API operations
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'providers/Microsoft.NetApp/operations'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
96
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
97
+ # Deserialize Response
98
+ if status_code == 200
99
+ begin
100
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
+ result_mapper = Azure::NetApp::Mgmt::V2019_06_01::Models::OperationListResult.mapper()
102
+ result.body = @client.deserialize(result_mapper, parsed_response)
103
+ rescue Exception => e
104
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
+ end
106
+ end
107
+
108
+ result
109
+ end
110
+
111
+ promise.execute
112
+ end
113
+
114
+ end
115
+ end