azure_mgmt_recovery_services 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_recovery_services.rb +40 -1
  3. data/lib/generated/azure_mgmt_recovery_services/backup_storage_configs.rb +215 -0
  4. data/lib/generated/azure_mgmt_recovery_services/backup_vault_configs.rb +226 -0
  5. data/lib/generated/azure_mgmt_recovery_services/models/auth_type.rb +19 -0
  6. data/lib/generated/azure_mgmt_recovery_services/models/backup_storage_config.rb +100 -0
  7. data/lib/generated/azure_mgmt_recovery_services/models/backup_vault_config.rb +100 -0
  8. data/lib/generated/azure_mgmt_recovery_services/models/certificate_request.rb +46 -0
  9. data/lib/generated/azure_mgmt_recovery_services/models/client_discovery_display.rb +79 -0
  10. data/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_log_specification.rb +68 -0
  11. data/lib/generated/azure_mgmt_recovery_services/models/client_discovery_for_service_specification.rb +55 -0
  12. data/lib/generated/azure_mgmt_recovery_services/models/client_discovery_response.rb +97 -0
  13. data/lib/generated/azure_mgmt_recovery_services/models/client_discovery_value_for_single_api.rb +82 -0
  14. data/lib/generated/azure_mgmt_recovery_services/models/enhanced_security_state.rb +17 -0
  15. data/lib/generated/azure_mgmt_recovery_services/models/jobs_summary.rb +65 -0
  16. data/lib/generated/azure_mgmt_recovery_services/models/monitoring_summary.rb +97 -0
  17. data/lib/generated/azure_mgmt_recovery_services/models/name_info.rb +55 -0
  18. data/lib/generated/azure_mgmt_recovery_services/models/raw_certificate_data.rb +57 -0
  19. data/lib/generated/azure_mgmt_recovery_services/models/replication_usage.rb +100 -0
  20. data/lib/generated/azure_mgmt_recovery_services/models/replication_usage_list.rb +54 -0
  21. data/lib/generated/azure_mgmt_recovery_services/models/resource.rb +7 -29
  22. data/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_aad_details.rb +155 -0
  23. data/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_and_acs_details.rb +135 -0
  24. data/lib/generated/azure_mgmt_recovery_services/models/resource_certificate_details.rb +128 -0
  25. data/lib/generated/azure_mgmt_recovery_services/models/sku.rb +2 -1
  26. data/lib/generated/azure_mgmt_recovery_services/models/sku_name.rb +1 -1
  27. data/lib/generated/azure_mgmt_recovery_services/models/storage_model_type.rb +17 -0
  28. data/lib/generated/azure_mgmt_recovery_services/models/storage_type.rb +17 -0
  29. data/lib/generated/azure_mgmt_recovery_services/models/storage_type_state.rb +17 -0
  30. data/lib/generated/azure_mgmt_recovery_services/models/tracked_resource.rb +93 -0
  31. data/lib/generated/azure_mgmt_recovery_services/models/trigger_type.rb +16 -0
  32. data/lib/generated/azure_mgmt_recovery_services/models/upgrade_details.rb +138 -0
  33. data/lib/generated/azure_mgmt_recovery_services/models/usages_unit.rb +20 -0
  34. data/lib/generated/azure_mgmt_recovery_services/models/vault.rb +19 -19
  35. data/lib/generated/azure_mgmt_recovery_services/models/vault_certificate_response.rb +79 -0
  36. data/lib/generated/azure_mgmt_recovery_services/models/vault_extended_info_resource.rb +106 -0
  37. data/lib/generated/azure_mgmt_recovery_services/models/vault_list.rb +13 -32
  38. data/lib/generated/azure_mgmt_recovery_services/models/vault_properties.rb +13 -1
  39. data/lib/generated/azure_mgmt_recovery_services/models/vault_upgrade_state.rb +18 -0
  40. data/lib/generated/azure_mgmt_recovery_services/models/vault_usage.rb +98 -0
  41. data/lib/generated/azure_mgmt_recovery_services/models/vault_usage_list.rb +53 -0
  42. data/lib/generated/azure_mgmt_recovery_services/module_definition.rb +1 -1
  43. data/lib/generated/azure_mgmt_recovery_services/operations.rb +224 -0
  44. data/lib/generated/azure_mgmt_recovery_services/recovery_services_client.rb +33 -5
  45. data/lib/generated/azure_mgmt_recovery_services/registered_identities.rb +112 -0
  46. data/lib/generated/azure_mgmt_recovery_services/replication_usages.rb +119 -0
  47. data/lib/generated/azure_mgmt_recovery_services/usages.rb +119 -0
  48. data/lib/generated/azure_mgmt_recovery_services/vault_certificates.rb +139 -0
  49. data/lib/generated/azure_mgmt_recovery_services/vault_extended_info_operations.rb +339 -0
  50. data/lib/generated/azure_mgmt_recovery_services/vaults.rb +230 -139
  51. data/lib/generated/azure_mgmt_recovery_services/version.rb +2 -2
  52. metadata +43 -4
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServices
7
+ module Models
8
+ #
9
+ # Usage for vault.
10
+ #
11
+ class VaultUsageList
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<VaultUsage>] The list of usages for the given vault.
17
+ attr_accessor :value
18
+
19
+
20
+ #
21
+ # Mapper for VaultUsageList class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ required: false,
27
+ serialized_name: 'VaultUsageList',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'VaultUsageList',
31
+ model_properties: {
32
+ value: {
33
+ required: false,
34
+ serialized_name: 'value',
35
+ type: {
36
+ name: 'Sequence',
37
+ element: {
38
+ required: false,
39
+ serialized_name: 'VaultUsageElementType',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'VaultUsage'
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ end
51
+ end
52
+ end
53
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -0,0 +1,224 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServices
7
+ #
8
+ # Recovery Services Client
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 [RecoveryServicesClient] reference to the RecoveryServicesClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns the list of available operations.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group where the
28
+ # recovery services vault is present.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<ClientDiscoveryValueForSingleApi>] operation results.
33
+ #
34
+ def list(resource_group_name, custom_headers = nil)
35
+ first_page = list_as_lazy(resource_group_name, custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Returns the list of available operations.
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group where the
43
+ # recovery services vault is present.
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(resource_group_name, custom_headers = nil)
50
+ list_async(resource_group_name, custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Returns the list of available operations.
55
+ #
56
+ # @param resource_group_name [String] The name of the resource group where the
57
+ # recovery services vault is present.
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(resource_group_name, custom_headers = nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ api_version = '2016-06-01'
66
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
67
+
68
+
69
+ request_headers = {}
70
+
71
+ # Set Headers
72
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
73
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
74
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations'
75
+
76
+ request_url = @base_url || @client.base_url
77
+
78
+ options = {
79
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
80
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
81
+ query_params: {'api-version' => api_version},
82
+ headers: request_headers.merge(custom_headers || {}),
83
+ base_url: request_url
84
+ }
85
+ promise = @client.make_request_async(:get, path_template, options)
86
+
87
+ promise = promise.then do |result|
88
+ http_response = result.response
89
+ status_code = http_response.status
90
+ response_content = http_response.body
91
+ unless status_code == 200
92
+ error_model = JSON.load(response_content)
93
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
94
+ end
95
+
96
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-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::ARM::RecoveryServices::Models::ClientDiscoveryResponse.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
+ #
115
+ # Returns the list of available operations.
116
+ #
117
+ # @param next_page_link [String] The NextLink from the previous successful call
118
+ # to List operation.
119
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
120
+ # will be added to the HTTP request.
121
+ #
122
+ # @return [ClientDiscoveryResponse] operation results.
123
+ #
124
+ def list_next(next_page_link, custom_headers = nil)
125
+ response = list_next_async(next_page_link, custom_headers).value!
126
+ response.body unless response.nil?
127
+ end
128
+
129
+ #
130
+ # Returns the list of available operations.
131
+ #
132
+ # @param next_page_link [String] The NextLink from the previous successful call
133
+ # to List operation.
134
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
+ # will be added to the HTTP request.
136
+ #
137
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
138
+ #
139
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
140
+ list_next_async(next_page_link, custom_headers).value!
141
+ end
142
+
143
+ #
144
+ # Returns the list of available operations.
145
+ #
146
+ # @param next_page_link [String] The NextLink from the previous successful call
147
+ # to List operation.
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
153
+ def list_next_async(next_page_link, custom_headers = nil)
154
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
155
+
156
+
157
+ request_headers = {}
158
+
159
+ # Set Headers
160
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
161
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
162
+ path_template = '{nextLink}'
163
+
164
+ request_url = @base_url || @client.base_url
165
+
166
+ options = {
167
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
168
+ skip_encoding_path_params: {'nextLink' => next_page_link},
169
+ headers: request_headers.merge(custom_headers || {}),
170
+ base_url: request_url
171
+ }
172
+ promise = @client.make_request_async(:get, path_template, options)
173
+
174
+ promise = promise.then do |result|
175
+ http_response = result.response
176
+ status_code = http_response.status
177
+ response_content = http_response.body
178
+ unless status_code == 200
179
+ error_model = JSON.load(response_content)
180
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
181
+ end
182
+
183
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
184
+ # Deserialize Response
185
+ if status_code == 200
186
+ begin
187
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
188
+ result_mapper = Azure::ARM::RecoveryServices::Models::ClientDiscoveryResponse.mapper()
189
+ result.body = @client.deserialize(result_mapper, parsed_response)
190
+ rescue Exception => e
191
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
192
+ end
193
+ end
194
+
195
+ result
196
+ end
197
+
198
+ promise.execute
199
+ end
200
+
201
+ #
202
+ # Returns the list of available operations.
203
+ #
204
+ # @param resource_group_name [String] The name of the resource group where the
205
+ # recovery services vault is present.
206
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
207
+ # will be added to the HTTP request.
208
+ #
209
+ # @return [ClientDiscoveryResponse] which provide lazy access to pages of the
210
+ # response.
211
+ #
212
+ def list_as_lazy(resource_group_name, custom_headers = nil)
213
+ response = list_async(resource_group_name, custom_headers).value!
214
+ unless response.nil?
215
+ page = response.body
216
+ page.next_method = Proc.new do |next_page_link|
217
+ list_next_async(next_page_link, custom_headers)
218
+ end
219
+ page
220
+ end
221
+ end
222
+
223
+ end
224
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -20,9 +20,6 @@ module Azure::ARM::RecoveryServices
20
20
  # @return [String] The subscription Id.
21
21
  attr_accessor :subscription_id
22
22
 
23
- # @return [String] Client Api Version.
24
- attr_reader :api_version
25
-
26
23
  # @return [String] Gets or sets the preferred language for the response.
27
24
  attr_accessor :accept_language
28
25
 
@@ -34,9 +31,33 @@ module Azure::ARM::RecoveryServices
34
31
  # is generated and included in each request. Default is true.
35
32
  attr_accessor :generate_client_request_id
36
33
 
34
+ # @return [BackupVaultConfigs] backup_vault_configs
35
+ attr_reader :backup_vault_configs
36
+
37
+ # @return [BackupStorageConfigs] backup_storage_configs
38
+ attr_reader :backup_storage_configs
39
+
40
+ # @return [VaultCertificates] vault_certificates
41
+ attr_reader :vault_certificates
42
+
43
+ # @return [RegisteredIdentities] registered_identities
44
+ attr_reader :registered_identities
45
+
46
+ # @return [ReplicationUsages] replication_usages
47
+ attr_reader :replication_usages
48
+
37
49
  # @return [Vaults] vaults
38
50
  attr_reader :vaults
39
51
 
52
+ # @return [Operations] operations
53
+ attr_reader :operations
54
+
55
+ # @return [VaultExtendedInfoOperations] vault_extended_info_operations
56
+ attr_reader :vault_extended_info_operations
57
+
58
+ # @return [Usages] usages
59
+ attr_reader :usages
60
+
40
61
  #
41
62
  # Creates initializes a new instance of the RecoveryServicesClient class.
42
63
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -50,8 +71,15 @@ module Azure::ARM::RecoveryServices
50
71
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
51
72
  @credentials = credentials
52
73
 
74
+ @backup_vault_configs = BackupVaultConfigs.new(self)
75
+ @backup_storage_configs = BackupStorageConfigs.new(self)
76
+ @vault_certificates = VaultCertificates.new(self)
77
+ @registered_identities = RegisteredIdentities.new(self)
78
+ @replication_usages = ReplicationUsages.new(self)
53
79
  @vaults = Vaults.new(self)
54
- @api_version = '2016-06-01'
80
+ @operations = Operations.new(self)
81
+ @vault_extended_info_operations = VaultExtendedInfoOperations.new(self)
82
+ @usages = Usages.new(self)
55
83
  @accept_language = 'en-US'
56
84
  @long_running_operation_retry_timeout = 30
57
85
  @generate_client_request_id = true
@@ -0,0 +1,112 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServices
7
+ #
8
+ # Recovery Services Client
9
+ #
10
+ class RegisteredIdentities
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the RegisteredIdentities class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [RecoveryServicesClient] reference to the RecoveryServicesClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Unregisters the given container from your Recovery Services vault.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group where the
28
+ # recovery services vault is present.
29
+ # @param vault_name [String] The name of the recovery services vault.
30
+ # @param identity_name [String] Name of the protection container to unregister.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ #
35
+ def delete(resource_group_name, vault_name, identity_name, custom_headers = nil)
36
+ response = delete_async(resource_group_name, vault_name, identity_name, custom_headers).value!
37
+ nil
38
+ end
39
+
40
+ #
41
+ # Unregisters the given container from your Recovery Services vault.
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group where the
44
+ # recovery services vault is present.
45
+ # @param vault_name [String] The name of the recovery services vault.
46
+ # @param identity_name [String] Name of the protection container to unregister.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def delete_with_http_info(resource_group_name, vault_name, identity_name, custom_headers = nil)
53
+ delete_async(resource_group_name, vault_name, identity_name, custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Unregisters the given container from your Recovery Services vault.
58
+ #
59
+ # @param resource_group_name [String] The name of the resource group where the
60
+ # recovery services vault is present.
61
+ # @param vault_name [String] The name of the recovery services vault.
62
+ # @param identity_name [String] Name of the protection container to unregister.
63
+ # @param [Hash{String => String}] A hash of custom headers that will be added
64
+ # to the HTTP request.
65
+ #
66
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
+ #
68
+ def delete_async(resource_group_name, vault_name, identity_name, custom_headers = nil)
69
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
70
+ api_version = '2016-06-01'
71
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
72
+ fail ArgumentError, 'vault_name is nil' if vault_name.nil?
73
+ fail ArgumentError, 'identity_name is nil' if identity_name.nil?
74
+
75
+
76
+ request_headers = {}
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.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}'
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,'vaultName' => vault_name,'identityName' => identity_name},
88
+ query_params: {'api-version' => api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:delete, 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 == 204
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
+
105
+ result
106
+ end
107
+
108
+ promise.execute
109
+ end
110
+
111
+ end
112
+ end