Class: Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::RecoveryServicesBackupClient
- Inherits:
-
MsRestAzure::AzureServiceClient
- Object
- MsRestAzure::AzureServiceClient
- Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::RecoveryServicesBackupClient
- Includes:
- MsRestAzure, MsRestAzure::Serialization
- Defined in:
- lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb
Overview
A service client - single point of access to the REST API.
Instance Attribute Summary collapse
-
#accept_language ⇒ String
The preferred language for the response.
-
#api_version ⇒ String
readonly
Client Api Version.
-
#backup_engines ⇒ BackupEngines
readonly
Backup_engines.
-
#backup_operation_results ⇒ BackupOperationResults
readonly
Backup_operation_results.
-
#backup_operation_statuses ⇒ BackupOperationStatuses
readonly
Backup_operation_statuses.
-
#backup_protectable_items ⇒ BackupProtectableItems
readonly
Backup_protectable_items.
-
#backup_protection_containers ⇒ BackupProtectionContainers
readonly
Backup_protection_containers.
-
#backup_resource_storage_configs ⇒ BackupResourceStorageConfigs
readonly
Backup_resource_storage_configs.
-
#backup_resource_vault_configs ⇒ BackupResourceVaultConfigs
readonly
Backup_resource_vault_configs.
-
#backup_workload_items ⇒ BackupWorkloadItems
readonly
Backup_workload_items.
-
#backups ⇒ Backups
readonly
Backups.
-
#base_url ⇒ String
The base URI of the service.
-
#credentials ⇒ Object
readonly
Credentials needed for the client to connect to Azure.
-
#generate_client_request_id ⇒ Boolean
generated.
-
#item_level_recovery_connections ⇒ ItemLevelRecoveryConnections
readonly
Item_level_recovery_connections.
-
#job_cancellations ⇒ JobCancellations
readonly
Job_cancellations.
-
#job_operation_results ⇒ JobOperationResults
readonly
Job_operation_results.
-
#long_running_operation_retry_timeout ⇒ Integer
Operations.
-
#protectable_containers ⇒ ProtectableContainers
readonly
Protectable_containers.
-
#protected_item_operation_results ⇒ ProtectedItemOperationResults
readonly
Protected_item_operation_results.
-
#protected_item_operation_statuses ⇒ ProtectedItemOperationStatuses
readonly
protected_item_operation_statuses.
-
#protected_items ⇒ ProtectedItems
readonly
Protected_items.
-
#protection_container_operation_results ⇒ ProtectionContainerOperationResults
readonly
protection_container_operation_results.
-
#protection_container_refresh_operation_results ⇒ ProtectionContainerRefreshOperationResults
readonly
protection_container_refresh_operation_results.
-
#protection_containers ⇒ ProtectionContainers
readonly
Protection_containers.
-
#protection_policies ⇒ ProtectionPolicies
readonly
Protection_policies.
-
#protection_policy_operation_results ⇒ ProtectionPolicyOperationResults
readonly
protection_policy_operation_results.
-
#protection_policy_operation_statuses ⇒ ProtectionPolicyOperationStatuses
readonly
protection_policy_operation_statuses.
-
#recovery_points ⇒ RecoveryPoints
readonly
Recovery_points.
-
#restores ⇒ Restores
readonly
Restores.
-
#security_pins ⇒ SecurityPINs
readonly
Security_pins.
-
#subscription_id ⇒ String
The subscription Id.
Instance Method Summary collapse
-
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ RecoveryServicesBackupClient
constructor
Creates initializes a new instance of the RecoveryServicesBackupClient class.
-
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response.
-
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
-
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
Constructor Details
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ RecoveryServicesBackupClient
Creates initializes a new instance of the RecoveryServicesBackupClient class.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 128 def initialize(credentials = nil, base_url = nil, = nil) super(credentials, ) @base_url = base_url || 'https://management.azure.com' fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials @backup_resource_vault_configs = BackupResourceVaultConfigs.new(self) @backup_engines = BackupEngines.new(self) @protection_container_refresh_operation_results = ProtectionContainerRefreshOperationResults.new(self) @protectable_containers = ProtectableContainers.new(self) @protection_containers = ProtectionContainers.new(self) @backup_workload_items = BackupWorkloadItems.new(self) @protection_container_operation_results = ProtectionContainerOperationResults.new(self) @protected_items = ProtectedItems.new(self) @backups = Backups.new(self) @protected_item_operation_results = ProtectedItemOperationResults.new(self) @protected_item_operation_statuses = ProtectedItemOperationStatuses.new(self) @recovery_points = RecoveryPoints.new(self) @item_level_recovery_connections = ItemLevelRecoveryConnections.new(self) @restores = Restores.new(self) @job_cancellations = JobCancellations.new(self) @job_operation_results = JobOperationResults.new(self) @backup_operation_results = BackupOperationResults.new(self) @backup_operation_statuses = BackupOperationStatuses.new(self) @protection_policies = ProtectionPolicies.new(self) @protection_policy_operation_results = ProtectionPolicyOperationResults.new(self) @protection_policy_operation_statuses = ProtectionPolicyOperationStatuses.new(self) @backup_protectable_items = BackupProtectableItems.new(self) @backup_protection_containers = BackupProtectionContainers.new(self) @security_pins = SecurityPINs.new(self) @backup_resource_storage_configs = BackupResourceStorageConfigs.new(self) @api_version = '2016-12-01' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true add_telemetry end |
Instance Attribute Details
#accept_language ⇒ String
Returns The preferred language for the response.
31 32 33 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 31 def accept_language @accept_language end |
#api_version ⇒ String (readonly)
Returns Client Api Version.
28 29 30 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 28 def api_version @api_version end |
#backup_engines ⇒ BackupEngines (readonly)
Returns backup_engines.
46 47 48 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 46 def backup_engines @backup_engines end |
#backup_operation_results ⇒ BackupOperationResults (readonly)
Returns backup_operation_results.
94 95 96 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 94 def backup_operation_results @backup_operation_results end |
#backup_operation_statuses ⇒ BackupOperationStatuses (readonly)
Returns backup_operation_statuses.
97 98 99 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 97 def backup_operation_statuses @backup_operation_statuses end |
#backup_protectable_items ⇒ BackupProtectableItems (readonly)
Returns backup_protectable_items.
111 112 113 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 111 def backup_protectable_items @backup_protectable_items end |
#backup_protection_containers ⇒ BackupProtectionContainers (readonly)
Returns backup_protection_containers.
114 115 116 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 114 def backup_protection_containers @backup_protection_containers end |
#backup_resource_storage_configs ⇒ BackupResourceStorageConfigs (readonly)
Returns backup_resource_storage_configs.
120 121 122 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 120 def backup_resource_storage_configs @backup_resource_storage_configs end |
#backup_resource_vault_configs ⇒ BackupResourceVaultConfigs (readonly)
Returns backup_resource_vault_configs.
43 44 45 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 43 def backup_resource_vault_configs @backup_resource_vault_configs end |
#backup_workload_items ⇒ BackupWorkloadItems (readonly)
Returns backup_workload_items.
59 60 61 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 59 def backup_workload_items @backup_workload_items end |
#backups ⇒ Backups (readonly)
Returns backups.
69 70 71 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 69 def backups @backups end |
#base_url ⇒ String
Returns the base URI of the service.
19 20 21 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 19 def base_url @base_url end |
#credentials ⇒ Object (readonly)
Returns Credentials needed for the client to connect to Azure.
22 23 24 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 22 def credentials @credentials end |
#generate_client_request_id ⇒ Boolean
generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
40 41 42 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 40 def generate_client_request_id @generate_client_request_id end |
#item_level_recovery_connections ⇒ ItemLevelRecoveryConnections (readonly)
Returns item_level_recovery_connections.
82 83 84 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 82 def item_level_recovery_connections @item_level_recovery_connections end |
#job_cancellations ⇒ JobCancellations (readonly)
Returns job_cancellations.
88 89 90 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 88 def job_cancellations @job_cancellations end |
#job_operation_results ⇒ JobOperationResults (readonly)
Returns job_operation_results.
91 92 93 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 91 def job_operation_results @job_operation_results end |
#long_running_operation_retry_timeout ⇒ Integer
Operations. Default value is 30.
35 36 37 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 35 def long_running_operation_retry_timeout @long_running_operation_retry_timeout end |
#protectable_containers ⇒ ProtectableContainers (readonly)
Returns protectable_containers.
53 54 55 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 53 def protectable_containers @protectable_containers end |
#protected_item_operation_results ⇒ ProtectedItemOperationResults (readonly)
Returns protected_item_operation_results.
72 73 74 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 72 def protected_item_operation_results @protected_item_operation_results end |
#protected_item_operation_statuses ⇒ ProtectedItemOperationStatuses (readonly)
protected_item_operation_statuses
76 77 78 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 76 def protected_item_operation_statuses @protected_item_operation_statuses end |
#protected_items ⇒ ProtectedItems (readonly)
Returns protected_items.
66 67 68 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 66 def protected_items @protected_items end |
#protection_container_operation_results ⇒ ProtectionContainerOperationResults (readonly)
protection_container_operation_results
63 64 65 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 63 def protection_container_operation_results @protection_container_operation_results end |
#protection_container_refresh_operation_results ⇒ ProtectionContainerRefreshOperationResults (readonly)
protection_container_refresh_operation_results
50 51 52 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 50 def protection_container_refresh_operation_results @protection_container_refresh_operation_results end |
#protection_containers ⇒ ProtectionContainers (readonly)
Returns protection_containers.
56 57 58 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 56 def protection_containers @protection_containers end |
#protection_policies ⇒ ProtectionPolicies (readonly)
Returns protection_policies.
100 101 102 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 100 def protection_policies @protection_policies end |
#protection_policy_operation_results ⇒ ProtectionPolicyOperationResults (readonly)
protection_policy_operation_results
104 105 106 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 104 def protection_policy_operation_results @protection_policy_operation_results end |
#protection_policy_operation_statuses ⇒ ProtectionPolicyOperationStatuses (readonly)
protection_policy_operation_statuses
108 109 110 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 108 def protection_policy_operation_statuses @protection_policy_operation_statuses end |
#recovery_points ⇒ RecoveryPoints (readonly)
Returns recovery_points.
79 80 81 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 79 def recovery_points @recovery_points end |
#restores ⇒ Restores (readonly)
Returns restores.
85 86 87 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 85 def restores @restores end |
#security_pins ⇒ SecurityPINs (readonly)
Returns security_pins.
117 118 119 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 117 def security_pins @security_pins end |
#subscription_id ⇒ String
Returns The subscription Id.
25 26 27 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 25 def subscription_id @subscription_id end |
Instance Method Details
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response. Example:
request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
path = "/path"
= {
body: request_content,
query_params: {'api-version' => '2016-02-01'}
}
result = @client.make_request(:put, path, )
183 184 185 186 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 183 def make_request(method, path, = {}) result = make_request_with_http_info(method, path, ) result.body unless result.nil? end |
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 208 def make_request_async(method, path, = {}) fail ArgumentError, 'method is nil' if method.nil? fail ArgumentError, 'path is nil' if path.nil? request_url = [:base_url] || @base_url if(![:headers].nil? && ![:headers]['Content-Type'].nil?) @request_headers['Content-Type'] = [:headers]['Content-Type'] end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? .merge!({headers: request_headers.merge([:headers] || {})}) .merge!({credentials: @credentials}) unless @credentials.nil? super(request_url, method, path, ) end |
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
195 196 197 198 199 |
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb', line 195 def make_request_with_http_info(method, path, = {}) result = make_request_async(method, path, ).value! result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) result end |