regen azure_mgmt_netapp:v0.21.0
This commit is contained in:
Родитель
ad1c37258d
Коммит
d1dde29ea0
|
@ -146,7 +146,7 @@ module Azure::NetApp::Mgmt::V2017_08_15_preview
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_05_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_06_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_07_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -150,7 +150,7 @@ module Azure::NetApp::Mgmt::V2019_08_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -150,7 +150,7 @@ module Azure::NetApp::Mgmt::V2019_10_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -146,7 +146,7 @@ module Azure::NetApp::Mgmt::V2019_11_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -146,7 +146,7 @@ module Azure::NetApp::Mgmt::V2020_02_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -166,7 +166,7 @@ module Azure::NetApp::Mgmt::V2020_06_01
|
|||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.20.2"
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
require 'date'
|
||||
require 'json'
|
||||
require 'base64'
|
||||
require 'erb'
|
||||
require 'securerandom'
|
||||
require 'time'
|
||||
require 'timeliness'
|
||||
require 'faraday'
|
||||
require 'faraday-cookie_jar'
|
||||
require 'concurrent'
|
||||
require 'ms_rest'
|
||||
require '2020-07-01/generated/azure_mgmt_netapp/module_definition'
|
||||
require 'ms_rest_azure'
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
autoload :Operations, '2020-07-01/generated/azure_mgmt_netapp/operations.rb'
|
||||
autoload :NetAppResource, '2020-07-01/generated/azure_mgmt_netapp/net_app_resource.rb'
|
||||
autoload :Accounts, '2020-07-01/generated/azure_mgmt_netapp/accounts.rb'
|
||||
autoload :Pools, '2020-07-01/generated/azure_mgmt_netapp/pools.rb'
|
||||
autoload :Volumes, '2020-07-01/generated/azure_mgmt_netapp/volumes.rb'
|
||||
autoload :Snapshots, '2020-07-01/generated/azure_mgmt_netapp/snapshots.rb'
|
||||
autoload :SnapshotPolicies, '2020-07-01/generated/azure_mgmt_netapp/snapshot_policies.rb'
|
||||
autoload :AccountBackups, '2020-07-01/generated/azure_mgmt_netapp/account_backups.rb'
|
||||
autoload :Backups, '2020-07-01/generated/azure_mgmt_netapp/backups.rb'
|
||||
autoload :BackupPolicies, '2020-07-01/generated/azure_mgmt_netapp/backup_policies.rb'
|
||||
autoload :Vaults, '2020-07-01/generated/azure_mgmt_netapp/vaults.rb'
|
||||
autoload :AzureNetAppFilesManagementClient, '2020-07-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb'
|
||||
|
||||
module Models
|
||||
autoload :VolumePatchPropertiesDataProtection, '2020-07-01/generated/azure_mgmt_netapp/models/volume_patch_properties_data_protection.rb'
|
||||
autoload :VolumePatch, '2020-07-01/generated/azure_mgmt_netapp/models/volume_patch.rb'
|
||||
autoload :Dimension, '2020-07-01/generated/azure_mgmt_netapp/models/dimension.rb'
|
||||
autoload :MountTarget, '2020-07-01/generated/azure_mgmt_netapp/models/mount_target.rb'
|
||||
autoload :ServiceSpecification, '2020-07-01/generated/azure_mgmt_netapp/models/service_specification.rb'
|
||||
autoload :Snapshot, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot.rb'
|
||||
autoload :OperationListResult, '2020-07-01/generated/azure_mgmt_netapp/models/operation_list_result.rb'
|
||||
autoload :SnapshotsList, '2020-07-01/generated/azure_mgmt_netapp/models/snapshots_list.rb'
|
||||
autoload :ResourceNameAvailabilityRequest, '2020-07-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb'
|
||||
autoload :HourlySchedule, '2020-07-01/generated/azure_mgmt_netapp/models/hourly_schedule.rb'
|
||||
autoload :ActiveDirectory, '2020-07-01/generated/azure_mgmt_netapp/models/active_directory.rb'
|
||||
autoload :DailySchedule, '2020-07-01/generated/azure_mgmt_netapp/models/daily_schedule.rb'
|
||||
autoload :NetAppAccountList, '2020-07-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb'
|
||||
autoload :WeeklySchedule, '2020-07-01/generated/azure_mgmt_netapp/models/weekly_schedule.rb'
|
||||
autoload :CapacityPool, '2020-07-01/generated/azure_mgmt_netapp/models/capacity_pool.rb'
|
||||
autoload :MonthlySchedule, '2020-07-01/generated/azure_mgmt_netapp/models/monthly_schedule.rb'
|
||||
autoload :CapacityPoolPatch, '2020-07-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb'
|
||||
autoload :SnapshotPolicy, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot_policy.rb'
|
||||
autoload :VolumePropertiesExportPolicy, '2020-07-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb'
|
||||
autoload :SnapshotPoliciesList, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot_policies_list.rb'
|
||||
autoload :VolumeBackupProperties, '2020-07-01/generated/azure_mgmt_netapp/models/volume_backup_properties.rb'
|
||||
autoload :SnapshotPolicyDetails, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot_policy_details.rb'
|
||||
autoload :VolumeSnapshotProperties, '2020-07-01/generated/azure_mgmt_netapp/models/volume_snapshot_properties.rb'
|
||||
autoload :SnapshotPolicyPatch, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot_policy_patch.rb'
|
||||
autoload :Volume, '2020-07-01/generated/azure_mgmt_netapp/models/volume.rb'
|
||||
autoload :SnapshotPolicyVolumeList, '2020-07-01/generated/azure_mgmt_netapp/models/snapshot_policy_volume_list.rb'
|
||||
autoload :ReplicationStatus, '2020-07-01/generated/azure_mgmt_netapp/models/replication_status.rb'
|
||||
autoload :VolumeRevert, '2020-07-01/generated/azure_mgmt_netapp/models/volume_revert.rb'
|
||||
autoload :OperationDisplay, '2020-07-01/generated/azure_mgmt_netapp/models/operation_display.rb'
|
||||
autoload :AuthorizeRequest, '2020-07-01/generated/azure_mgmt_netapp/models/authorize_request.rb'
|
||||
autoload :Operation, '2020-07-01/generated/azure_mgmt_netapp/models/operation.rb'
|
||||
autoload :BreakReplicationRequest, '2020-07-01/generated/azure_mgmt_netapp/models/break_replication_request.rb'
|
||||
autoload :QuotaAvailabilityRequest, '2020-07-01/generated/azure_mgmt_netapp/models/quota_availability_request.rb'
|
||||
autoload :PoolChangeRequest, '2020-07-01/generated/azure_mgmt_netapp/models/pool_change_request.rb'
|
||||
autoload :NetAppAccountPatch, '2020-07-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb'
|
||||
autoload :Backup, '2020-07-01/generated/azure_mgmt_netapp/models/backup.rb'
|
||||
autoload :ExportPolicyRule, '2020-07-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb'
|
||||
autoload :BackupsList, '2020-07-01/generated/azure_mgmt_netapp/models/backups_list.rb'
|
||||
autoload :ReplicationObject, '2020-07-01/generated/azure_mgmt_netapp/models/replication_object.rb'
|
||||
autoload :BackupPatch, '2020-07-01/generated/azure_mgmt_netapp/models/backup_patch.rb'
|
||||
autoload :VolumeList, '2020-07-01/generated/azure_mgmt_netapp/models/volume_list.rb'
|
||||
autoload :VolumeBackups, '2020-07-01/generated/azure_mgmt_netapp/models/volume_backups.rb'
|
||||
autoload :MetricSpecification, '2020-07-01/generated/azure_mgmt_netapp/models/metric_specification.rb'
|
||||
autoload :BackupPolicy, '2020-07-01/generated/azure_mgmt_netapp/models/backup_policy.rb'
|
||||
autoload :NetAppAccount, '2020-07-01/generated/azure_mgmt_netapp/models/net_app_account.rb'
|
||||
autoload :BackupPoliciesList, '2020-07-01/generated/azure_mgmt_netapp/models/backup_policies_list.rb'
|
||||
autoload :MountTargetProperties, '2020-07-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb'
|
||||
autoload :BackupPolicyDetails, '2020-07-01/generated/azure_mgmt_netapp/models/backup_policy_details.rb'
|
||||
autoload :VolumePatchPropertiesExportPolicy, '2020-07-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb'
|
||||
autoload :BackupPolicyPatch, '2020-07-01/generated/azure_mgmt_netapp/models/backup_policy_patch.rb'
|
||||
autoload :CapacityPoolList, '2020-07-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb'
|
||||
autoload :Vault, '2020-07-01/generated/azure_mgmt_netapp/models/vault.rb'
|
||||
autoload :CheckAvailabilityResponse, '2020-07-01/generated/azure_mgmt_netapp/models/check_availability_response.rb'
|
||||
autoload :VaultList, '2020-07-01/generated/azure_mgmt_netapp/models/vault_list.rb'
|
||||
autoload :VolumePropertiesDataProtection, '2020-07-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb'
|
||||
autoload :InAvailabilityReasonType, '2020-07-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb'
|
||||
autoload :CheckNameResourceTypes, '2020-07-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb'
|
||||
autoload :CheckQuotaNameResourceTypes, '2020-07-01/generated/azure_mgmt_netapp/models/check_quota_name_resource_types.rb'
|
||||
autoload :ActiveDirectoryStatus, '2020-07-01/generated/azure_mgmt_netapp/models/active_directory_status.rb'
|
||||
autoload :ServiceLevel, '2020-07-01/generated/azure_mgmt_netapp/models/service_level.rb'
|
||||
autoload :QosType, '2020-07-01/generated/azure_mgmt_netapp/models/qos_type.rb'
|
||||
autoload :EndpointType, '2020-07-01/generated/azure_mgmt_netapp/models/endpoint_type.rb'
|
||||
autoload :ReplicationSchedule, '2020-07-01/generated/azure_mgmt_netapp/models/replication_schedule.rb'
|
||||
autoload :SecurityStyle, '2020-07-01/generated/azure_mgmt_netapp/models/security_style.rb'
|
||||
autoload :RelationshipStatus, '2020-07-01/generated/azure_mgmt_netapp/models/relationship_status.rb'
|
||||
autoload :MirrorState, '2020-07-01/generated/azure_mgmt_netapp/models/mirror_state.rb'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,373 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class AccountBackups
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the AccountBackups class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# List Backups for a Netapp Account
|
||||
#
|
||||
# List all Backups for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupsList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# List Backups for a Netapp Account
|
||||
#
|
||||
# List all Backups for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# List Backups for a Netapp Account
|
||||
#
|
||||
# List all Backups for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupsList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Backup] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# Get Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, backup_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# Delete Backup for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, backup_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,709 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Accounts
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Accounts class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Describe all NetApp Accounts in a resource group
|
||||
#
|
||||
# List and describe all NetApp accounts in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccountList] operation results.
|
||||
#
|
||||
def list(resource_group_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all NetApp Accounts in a resource group
|
||||
#
|
||||
# List and describe all NetApp accounts in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, custom_headers:nil)
|
||||
list_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all NetApp Accounts in a resource group
|
||||
#
|
||||
# List and describe all NetApp accounts in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a NetApp Account
|
||||
#
|
||||
# Get the NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccount] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a NetApp Account
|
||||
#
|
||||
# Get the NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a NetApp Account
|
||||
#
|
||||
# Get the NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update a NetApp account
|
||||
#
|
||||
# Create or update the specified NetApp account within the resource group
|
||||
#
|
||||
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccount] operation results.
|
||||
#
|
||||
def create_or_update(body, resource_group_name, account_name, custom_headers:nil)
|
||||
response = create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a NetApp account
|
||||
#
|
||||
# Delete the specified NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Update a NetApp account
|
||||
#
|
||||
# Patch the specified NetApp account
|
||||
#
|
||||
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccount] operation results.
|
||||
#
|
||||
def update(body, resource_group_name, account_name, custom_headers:nil)
|
||||
response = update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def update_async(body, resource_group_name, account_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_update_async(body, resource_group_name, account_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update a NetApp account
|
||||
#
|
||||
# Create or update the specified NetApp account within the resource group
|
||||
#
|
||||
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccount] operation results.
|
||||
#
|
||||
def begin_create_or_update(body, resource_group_name, account_name, custom_headers:nil)
|
||||
response = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update a NetApp account
|
||||
#
|
||||
# Create or update the specified NetApp account within the resource group
|
||||
#
|
||||
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_create_or_update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
|
||||
begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update a NetApp account
|
||||
#
|
||||
# Create or update the specified NetApp account within the resource group
|
||||
#
|
||||
# @param body [NetAppAccount] NetApp Account object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a NetApp account
|
||||
#
|
||||
# Delete the specified NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a NetApp account
|
||||
#
|
||||
# Delete the specified NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a NetApp account
|
||||
#
|
||||
# Delete the specified NetApp account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Update a NetApp account
|
||||
#
|
||||
# Patch the specified NetApp account
|
||||
#
|
||||
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [NetAppAccount] operation results.
|
||||
#
|
||||
def begin_update(body, resource_group_name, account_name, custom_headers:nil)
|
||||
response = begin_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Update a NetApp account
|
||||
#
|
||||
# Patch the specified NetApp account
|
||||
#
|
||||
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
|
||||
begin_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Update a NetApp account
|
||||
#
|
||||
# Patch the specified NetApp account
|
||||
#
|
||||
# @param body [NetAppAccountPatch] NetApp Account object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_update_async(body, resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountPatch.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,173 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# A service client - single point of access to the REST API.
|
||||
#
|
||||
class AzureNetAppFilesManagementClient < MsRestAzure::AzureServiceClient
|
||||
include MsRestAzure
|
||||
include MsRestAzure::Serialization
|
||||
|
||||
# @return [String] the base URI of the service.
|
||||
attr_accessor :base_url
|
||||
|
||||
# @return Credentials needed for the client to connect to Azure.
|
||||
attr_reader :credentials
|
||||
|
||||
# @return [String] Subscription credentials which uniquely identify
|
||||
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
||||
# for every service call.
|
||||
attr_accessor :subscription_id
|
||||
|
||||
# @return [String] Version of the API to be used with the client request.
|
||||
attr_reader :api_version
|
||||
|
||||
# @return [String] The preferred language for the response.
|
||||
attr_accessor :accept_language
|
||||
|
||||
# @return [Integer] The retry timeout in seconds for Long Running
|
||||
# Operations. Default value is 30.
|
||||
attr_accessor :long_running_operation_retry_timeout
|
||||
|
||||
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
||||
# generated. When set to true a unique x-ms-client-request-id value is
|
||||
# generated and included in each request. Default is true.
|
||||
attr_accessor :generate_client_request_id
|
||||
|
||||
# @return [Operations] operations
|
||||
attr_reader :operations
|
||||
|
||||
# @return [NetAppResource] net_app_resource
|
||||
attr_reader :net_app_resource
|
||||
|
||||
# @return [Accounts] accounts
|
||||
attr_reader :accounts
|
||||
|
||||
# @return [Pools] pools
|
||||
attr_reader :pools
|
||||
|
||||
# @return [Volumes] volumes
|
||||
attr_reader :volumes
|
||||
|
||||
# @return [Snapshots] snapshots
|
||||
attr_reader :snapshots
|
||||
|
||||
# @return [SnapshotPolicies] snapshot_policies
|
||||
attr_reader :snapshot_policies
|
||||
|
||||
# @return [AccountBackups] account_backups
|
||||
attr_reader :account_backups
|
||||
|
||||
# @return [Backups] backups
|
||||
attr_reader :backups
|
||||
|
||||
# @return [BackupPolicies] backup_policies
|
||||
attr_reader :backup_policies
|
||||
|
||||
# @return [Vaults] vaults
|
||||
attr_reader :vaults
|
||||
|
||||
#
|
||||
# Creates initializes a new instance of the AzureNetAppFilesManagementClient class.
|
||||
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
||||
# @param base_url [String] the base URI of the service.
|
||||
# @param options [Array] filters to be applied to the HTTP requests.
|
||||
#
|
||||
def initialize(credentials = nil, base_url = nil, options = nil)
|
||||
super(credentials, options)
|
||||
@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
|
||||
|
||||
@operations = Operations.new(self)
|
||||
@net_app_resource = NetAppResource.new(self)
|
||||
@accounts = Accounts.new(self)
|
||||
@pools = Pools.new(self)
|
||||
@volumes = Volumes.new(self)
|
||||
@snapshots = Snapshots.new(self)
|
||||
@snapshot_policies = SnapshotPolicies.new(self)
|
||||
@account_backups = AccountBackups.new(self)
|
||||
@backups = Backups.new(self)
|
||||
@backup_policies = BackupPolicies.new(self)
|
||||
@vaults = Vaults.new(self)
|
||||
@api_version = '2020-07-01'
|
||||
@accept_language = 'en-US'
|
||||
@long_running_operation_retry_timeout = 30
|
||||
@generate_client_request_id = true
|
||||
add_telemetry
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request and returns the body of the response.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [Hash{String=>String}] containing the body of the response.
|
||||
# Example:
|
||||
#
|
||||
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
||||
# path = "/path"
|
||||
# options = {
|
||||
# body: request_content,
|
||||
# query_params: {'api-version' => '2016-02-01'}
|
||||
# }
|
||||
# result = @client.make_request(:put, path, options)
|
||||
#
|
||||
def make_request(method, path, options = {})
|
||||
result = make_request_with_http_info(method, path, options)
|
||||
result.body unless result.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request and returns the operation response.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
||||
#
|
||||
def make_request_with_http_info(method, path, options = {})
|
||||
result = make_request_async(method, path, options).value!
|
||||
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
||||
result
|
||||
end
|
||||
|
||||
#
|
||||
# Makes a request asynchronously.
|
||||
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
||||
# @param path [String] the path, relative to {base_url}.
|
||||
# @param options [Hash{String=>String}] specifying any request options like :body.
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def make_request_async(method, path, options = {})
|
||||
fail ArgumentError, 'method is nil' if method.nil?
|
||||
fail ArgumentError, 'path is nil' if path.nil?
|
||||
|
||||
request_url = options[:base_url] || @base_url
|
||||
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
||||
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
||||
end
|
||||
|
||||
request_headers = @request_headers
|
||||
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
||||
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
||||
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
||||
|
||||
super(request_url, method, path, options)
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
#
|
||||
# Adds telemetry information.
|
||||
#
|
||||
def add_telemetry
|
||||
sdk_information = 'azure_mgmt_netapp'
|
||||
sdk_information = "#{sdk_information}/0.21.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,691 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class BackupPolicies
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the BackupPolicies class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# List backup policies
|
||||
#
|
||||
# List backup policies for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupPoliciesList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# List backup policies
|
||||
#
|
||||
# List backup policies for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# List backup policies
|
||||
#
|
||||
# List backup policies for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPoliciesList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup Policy
|
||||
#
|
||||
# Get a particular backup Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupPolicy] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup Policy
|
||||
#
|
||||
# Get a particular backup Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup Policy
|
||||
#
|
||||
# Get a particular backup Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupPolicyName' => backup_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup policy
|
||||
#
|
||||
# Create a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicy] Backup policy object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupPolicy] operation results.
|
||||
#
|
||||
def create(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
response = create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicy] Backup policy object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup policy
|
||||
#
|
||||
# Patch a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicyPatch] Backup policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupPolicy] operation results.
|
||||
#
|
||||
def update(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
response = update_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup policy
|
||||
#
|
||||
# Patch a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicyPatch] Backup policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def update_with_http_info(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
update_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup policy
|
||||
#
|
||||
# Patch a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicyPatch] Backup policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def update_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicyPatch.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupPolicyName' => backup_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a backup policy
|
||||
#
|
||||
# Delete backup policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup policy
|
||||
#
|
||||
# Create a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicy] Backup policy object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupPolicy] operation results.
|
||||
#
|
||||
def begin_create(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
response = begin_create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup policy
|
||||
#
|
||||
# Create a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicy] Backup policy object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_create_with_http_info(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
begin_create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup policy
|
||||
#
|
||||
# Create a backup policy for Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param body [BackupPolicy] Backup policy object supplied in the body of the
|
||||
# operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_create_async(resource_group_name, account_name, backup_policy_name, body, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupPolicyName' => backup_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a backup policy
|
||||
#
|
||||
# Delete backup policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a backup policy
|
||||
#
|
||||
# Delete backup policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a backup policy
|
||||
#
|
||||
# Delete backup policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param backup_policy_name [String] Backup policy Name which uniquely identify
|
||||
# backup policy.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, backup_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'backup_policy_name is nil' if backup_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'backupPolicyName' => backup_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,747 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Backups
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Backups class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# List Backups
|
||||
#
|
||||
# List all backups for a volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [BackupsList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# List Backups
|
||||
#
|
||||
# List all backups for a volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# List Backups
|
||||
#
|
||||
# List all backups for a volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupsList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup
|
||||
#
|
||||
# Get a particular backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Backup] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup
|
||||
#
|
||||
# Get a particular backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a backup
|
||||
#
|
||||
# Get a particular backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup
|
||||
#
|
||||
# Create a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [Backup] Backup object supplied in the body of the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Backup] operation results.
|
||||
#
|
||||
def create(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:nil)
|
||||
response = create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [Backup] Backup object supplied in the body of the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup
|
||||
#
|
||||
# Patch a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [BackupPatch] Backup object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Backup] operation results.
|
||||
#
|
||||
def update(resource_group_name, account_name, pool_name, volume_name, backup_name, body:nil, custom_headers:nil)
|
||||
response = update_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body:body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup
|
||||
#
|
||||
# Patch a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [BackupPatch] Backup object supplied in the body of the
|
||||
# operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def update_with_http_info(resource_group_name, account_name, pool_name, volume_name, backup_name, body:nil, custom_headers:nil)
|
||||
update_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body:body, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a backup
|
||||
#
|
||||
# Patch a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [BackupPatch] Backup object supplied in the body of the
|
||||
# operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def update_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body:nil, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPatch.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete backup
|
||||
#
|
||||
# Delete a backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup
|
||||
#
|
||||
# Create a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [Backup] Backup object supplied in the body of the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Backup] operation results.
|
||||
#
|
||||
def begin_create(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:nil)
|
||||
response = begin_create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup
|
||||
#
|
||||
# Create a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [Backup] Backup object supplied in the body of the operation.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_create_with_http_info(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:nil)
|
||||
begin_create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a backup
|
||||
#
|
||||
# Create a backup for the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param body [Backup] Backup object supplied in the body of the operation.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_create_async(resource_group_name, account_name, pool_name, volume_name, backup_name, body, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete backup
|
||||
#
|
||||
# Delete a backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete backup
|
||||
#
|
||||
# Delete a backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete backup
|
||||
#
|
||||
# Delete a backup of the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param backup_name [String] The name of the backup
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, pool_name, volume_name, backup_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'backup_name is nil' if backup_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/backups/{backupName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'backupName' => backup_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,253 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Active Directory
|
||||
#
|
||||
class ActiveDirectory
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Id of the Active Directory
|
||||
attr_accessor :active_directory_id
|
||||
|
||||
# @return [String] Username of Active Directory domain administrator
|
||||
attr_accessor :username
|
||||
|
||||
# @return [String] Plain text password of Active Directory domain
|
||||
# administrator, value is masked in the response
|
||||
attr_accessor :password
|
||||
|
||||
# @return [String] Name of the Active Directory domain
|
||||
attr_accessor :domain
|
||||
|
||||
# @return [String] Comma separated list of DNS server IP addresses (IPv4
|
||||
# only) for the Active Directory domain
|
||||
attr_accessor :dns
|
||||
|
||||
# @return [ActiveDirectoryStatus] Status of the Active Directory.
|
||||
# Possible values include: 'Created', 'InUse', 'Deleted', 'Error',
|
||||
# 'Updating'
|
||||
attr_accessor :status
|
||||
|
||||
# @return [String] Any details in regards to the Status of the Active
|
||||
# Directory
|
||||
attr_accessor :status_details
|
||||
|
||||
# @return [String] NetBIOS name of the SMB server. This name will be
|
||||
# registered as a computer account in the AD and used to mount volumes
|
||||
attr_accessor :smb_server_name
|
||||
|
||||
# @return [String] The Organizational Unit (OU) within the Windows Active
|
||||
# Directory
|
||||
attr_accessor :organizational_unit
|
||||
|
||||
# @return [String] The Active Directory site the service will limit
|
||||
# Domain Controller discovery to
|
||||
attr_accessor :site
|
||||
|
||||
# @return [Array<String>] Users to be added to the Built-in Backup
|
||||
# Operator active directory group. A list of unique usernames without
|
||||
# domain specifier
|
||||
attr_accessor :backup_operators
|
||||
|
||||
# @return [String] kdc server IP addresses for the active directory
|
||||
# machine. This optional parameter is used only while creating kerberos
|
||||
# volume.
|
||||
attr_accessor :kdc_ip
|
||||
|
||||
# @return [String] Name of the active directory machine. This optional
|
||||
# parameter is used only while creating kerberos volume
|
||||
attr_accessor :ad_name
|
||||
|
||||
# @return [String] When LDAP over SSL/TLS is enabled, the LDAP client is
|
||||
# required to have base64 encoded Active Directory Certificate Service's
|
||||
# self-signed root CA certificate, this optional parameter is used only
|
||||
# for dual protocol with LDAP user-mapping volumes.
|
||||
attr_accessor :server_root_cacertificate
|
||||
|
||||
# @return [Boolean] If enabled, AES encryption will be enabled for SMB
|
||||
# communication.
|
||||
attr_accessor :aes_encryption
|
||||
|
||||
# @return [Boolean] Specifies whether or not the LDAP traffic needs to be
|
||||
# signed.
|
||||
attr_accessor :ldap_signing
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ActiveDirectory class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'activeDirectory',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActiveDirectory',
|
||||
model_properties: {
|
||||
active_directory_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'activeDirectoryId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
username: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'username',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
password: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'password',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
domain: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'domain',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dns: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'dns',
|
||||
constraints: {
|
||||
Pattern: '^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
status: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'status',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
status_details: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'statusDetails',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
smb_server_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'smbServerName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
organizational_unit: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'organizationalUnit',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
site: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'site',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_operators: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupOperators',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
kdc_ip: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kdcIP',
|
||||
constraints: {
|
||||
Pattern: '^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((, ?)(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
ad_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'adName',
|
||||
constraints: {
|
||||
MaxLength: 64,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
server_root_cacertificate: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'serverRootCACertificate',
|
||||
constraints: {
|
||||
MaxLength: 10240,
|
||||
MinLength: 1
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
aes_encryption: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'aesEncryption',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
ldap_signing: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ldapSigning',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for ActiveDirectoryStatus
|
||||
#
|
||||
module ActiveDirectoryStatus
|
||||
Created = "Created"
|
||||
InUse = "InUse"
|
||||
Deleted = "Deleted"
|
||||
Error = "Error"
|
||||
Updating = "Updating"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Authorize request
|
||||
#
|
||||
class AuthorizeRequest
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource id of the remote volume
|
||||
attr_accessor :remote_volume_resource_id
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AuthorizeRequest class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'authorizeRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AuthorizeRequest',
|
||||
model_properties: {
|
||||
remote_volume_resource_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'remoteVolumeResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,158 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Backup of a Volume
|
||||
#
|
||||
class Backup
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] backupId. UUID v4 used to identify the Backup
|
||||
attr_accessor :backup_id
|
||||
|
||||
# @return [DateTime] name. The creation date of the backup
|
||||
attr_accessor :creation_date
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Integer] Size of backup
|
||||
attr_accessor :size
|
||||
|
||||
# @return [String] Label for backup
|
||||
attr_accessor :label
|
||||
|
||||
# @return [String] Type of backup adhoc or scheduled
|
||||
attr_accessor :backup_type
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Backup class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backup',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Backup',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.backupId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
creation_date: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.creationDate',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.size',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
label: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.label',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.backupType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,130 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Backup patch
|
||||
#
|
||||
class BackupPatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] backupId. UUID v4 used to identify the Backup
|
||||
attr_accessor :backup_id
|
||||
|
||||
# @return [DateTime] name. The creation date of the backup
|
||||
attr_accessor :creation_date
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Integer] Size of backup
|
||||
attr_accessor :size
|
||||
|
||||
# @return [String] Label for backup
|
||||
attr_accessor :label
|
||||
|
||||
# @return [String] Type of backup adhoc or scheduled
|
||||
attr_accessor :backup_type
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupPatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPatch',
|
||||
model_properties: {
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
backup_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.backupId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
creation_date: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.creationDate',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.size',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
label: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.label',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.backupType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of Backup Policies
|
||||
#
|
||||
class BackupPoliciesList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<BackupPolicy>] A list of backup policies
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupPoliciesList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPoliciesList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPoliciesList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'BackupPolicyElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPolicy'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,212 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Backup policy information
|
||||
#
|
||||
class BackupPolicy
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Name of backup policy
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Integer] Daily backups count to keep
|
||||
attr_accessor :daily_backups_to_keep
|
||||
|
||||
# @return [Integer] Weekly backups count to keep
|
||||
attr_accessor :weekly_backups_to_keep
|
||||
|
||||
# @return [Integer] Monthly backups count to keep
|
||||
attr_accessor :monthly_backups_to_keep
|
||||
|
||||
# @return [Integer] Yearly backups count to keep
|
||||
attr_accessor :yearly_backups_to_keep
|
||||
|
||||
# @return [Integer] Volumes using current backup policy
|
||||
attr_accessor :volumes_assigned
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [Array<VolumeBackups>] A list of volumes assigned to this
|
||||
# policy
|
||||
attr_accessor :volume_backups
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupPolicy class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPolicy',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
daily_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
weekly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
monthly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
yearly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.yearlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
volumes_assigned: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumesAssigned',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
volume_backups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumeBackups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VolumeBackupsElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackups'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,212 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Backup policy properties
|
||||
#
|
||||
class BackupPolicyDetails
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Name of backup policy
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Integer] Daily backups count to keep
|
||||
attr_accessor :daily_backups_to_keep
|
||||
|
||||
# @return [Integer] Weekly backups count to keep
|
||||
attr_accessor :weekly_backups_to_keep
|
||||
|
||||
# @return [Integer] Monthly backups count to keep
|
||||
attr_accessor :monthly_backups_to_keep
|
||||
|
||||
# @return [Integer] Yearly backups count to keep
|
||||
attr_accessor :yearly_backups_to_keep
|
||||
|
||||
# @return [Integer] Volumes using current backup policy
|
||||
attr_accessor :volumes_assigned
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [Array<VolumeBackups>] A list of volumes assigned to this
|
||||
# policy
|
||||
attr_accessor :volume_backups
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupPolicyDetails class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPolicyDetails',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPolicyDetails',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
daily_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
weekly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
monthly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
yearly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.yearlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
volumes_assigned: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumesAssigned',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
volume_backups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumeBackups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VolumeBackupsElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackups'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,212 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Backup policy Details for create and update
|
||||
#
|
||||
class BackupPolicyPatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Name of backup policy
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Integer] Daily backups count to keep
|
||||
attr_accessor :daily_backups_to_keep
|
||||
|
||||
# @return [Integer] Weekly backups count to keep
|
||||
attr_accessor :weekly_backups_to_keep
|
||||
|
||||
# @return [Integer] Monthly backups count to keep
|
||||
attr_accessor :monthly_backups_to_keep
|
||||
|
||||
# @return [Integer] Yearly backups count to keep
|
||||
attr_accessor :yearly_backups_to_keep
|
||||
|
||||
# @return [Integer] Volumes using current backup policy
|
||||
attr_accessor :volumes_assigned
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [Array<VolumeBackups>] A list of volumes assigned to this
|
||||
# policy
|
||||
attr_accessor :volume_backups
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupPolicyPatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPolicyPatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupPolicyPatch',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
daily_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
weekly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
monthly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
yearly_backups_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.yearlyBackupsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
volumes_assigned: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumesAssigned',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
volume_backups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumeBackups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VolumeBackupsElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackups'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of Backups
|
||||
#
|
||||
class BackupsList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Backup>] A list of Backups
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BackupsList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupsList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BackupsList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'BackupElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Backup'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,47 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Break replication request
|
||||
#
|
||||
class BreakReplicationRequest
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Boolean] If replication is in status transferring and you want
|
||||
# to force break the replication, set to true
|
||||
attr_accessor :force_break_replication
|
||||
|
||||
|
||||
#
|
||||
# Mapper for BreakReplicationRequest class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'breakReplicationRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'BreakReplicationRequest',
|
||||
model_properties: {
|
||||
force_break_replication: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'forceBreakReplication',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,198 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Capacity pool resource
|
||||
#
|
||||
class CapacityPool
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] poolId. UUID v4 used to identify the Pool
|
||||
attr_accessor :pool_id
|
||||
|
||||
# @return [Integer] size. Provisioned size of the pool (in bytes).
|
||||
# Allowed values are in 4TiB chunks (value must be multiply of
|
||||
# 4398046511104).
|
||||
attr_accessor :size
|
||||
|
||||
# @return [ServiceLevel] serviceLevel. The service level of the file
|
||||
# system. Possible values include: 'Standard', 'Premium', 'Ultra'.
|
||||
# Default value: 'Premium' .
|
||||
attr_accessor :service_level
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Float] Total throughput of pool in Mibps
|
||||
attr_accessor :total_throughput_mibps
|
||||
|
||||
# @return [Float] Utilized throughput of pool in Mibps
|
||||
attr_accessor :utilized_throughput_mibps
|
||||
|
||||
# @return [QosType] qosType. The qos type of the pool. Possible values
|
||||
# include: 'Auto', 'Manual'. Default value: 'Auto' .
|
||||
attr_accessor :qos_type
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CapacityPool class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'capacityPool',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CapacityPool',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
pool_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.poolId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
size: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.size',
|
||||
constraints: {
|
||||
InclusiveMaximum: 549755813888000,
|
||||
InclusiveMinimum: 4398046511104
|
||||
},
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
service_level: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.serviceLevel',
|
||||
default_value: 'Premium',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
total_throughput_mibps: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.totalThroughputMibps',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
utilized_throughput_mibps: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.utilizedThroughputMibps',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
qos_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.qosType',
|
||||
default_value: 'Auto',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of capacity pool resources
|
||||
#
|
||||
class CapacityPoolList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<CapacityPool>] List of Capacity pools
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CapacityPoolList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'capacityPoolList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CapacityPoolList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'CapacityPoolElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CapacityPool'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,132 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Capacity pool patch resource
|
||||
#
|
||||
class CapacityPoolPatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [Integer] size. Provisioned size of the pool (in bytes).
|
||||
# Allowed values are in 4TiB chunks (value must be multiply of
|
||||
# 4398046511104). Default value: 4398046511104 .
|
||||
attr_accessor :size
|
||||
|
||||
# @return [QosType] qosType. The qos type of the pool. Possible values
|
||||
# include: 'Auto', 'Manual'. Default value: 'Auto' .
|
||||
attr_accessor :qos_type
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CapacityPoolPatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'capacityPoolPatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CapacityPoolPatch',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.size',
|
||||
default_value: 4398046511104,
|
||||
constraints: {
|
||||
InclusiveMaximum: 549755813888000,
|
||||
InclusiveMinimum: 4398046511104
|
||||
},
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
qos_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.qosType',
|
||||
default_value: 'Auto',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,78 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Information regarding availability of a resource.
|
||||
#
|
||||
class CheckAvailabilityResponse
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Boolean] <code>true</code> indicates name is valid and
|
||||
# available. <code>false</code> indicates the name is invalid,
|
||||
# unavailable, or both.
|
||||
attr_accessor :is_available
|
||||
|
||||
# @return [InAvailabilityReasonType] <code>Invalid</code> indicates the
|
||||
# name provided does not match Azure App Service naming requirements.
|
||||
# <code>AlreadyExists</code> indicates that the name is already in use
|
||||
# and is therefore unavailable. Possible values include: 'Invalid',
|
||||
# 'AlreadyExists'
|
||||
attr_accessor :reason
|
||||
|
||||
# @return [String] If reason == invalid, provide the user with the reason
|
||||
# why the given name is invalid, and provide the resource naming
|
||||
# requirements so that the user can select a valid name. If reason ==
|
||||
# AlreadyExists, explain that resource name is already in use, and direct
|
||||
# them to select a different name.
|
||||
attr_accessor :message
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CheckAvailabilityResponse class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'CheckAvailabilityResponse',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CheckAvailabilityResponse',
|
||||
model_properties: {
|
||||
is_available: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'isAvailable',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
reason: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'reason',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
message: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for CheckNameResourceTypes
|
||||
#
|
||||
module CheckNameResourceTypes
|
||||
MicrosoftNetAppnetAppAccounts = "Microsoft.NetApp/netAppAccounts"
|
||||
MicrosoftNetAppnetAppAccountscapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools"
|
||||
MicrosoftNetAppnetAppAccountscapacityPoolsvolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"
|
||||
MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for CheckQuotaNameResourceTypes
|
||||
#
|
||||
module CheckQuotaNameResourceTypes
|
||||
MicrosoftNetAppnetAppAccounts = "Microsoft.NetApp/netAppAccounts"
|
||||
MicrosoftNetAppnetAppAccountscapacityPools = "Microsoft.NetApp/netAppAccounts/capacityPools"
|
||||
MicrosoftNetAppnetAppAccountscapacityPoolsvolumes = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes"
|
||||
MicrosoftNetAppnetAppAccountscapacityPoolsvolumessnapshots = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,81 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Daily Schedule properties
|
||||
#
|
||||
class DailySchedule
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Integer] Daily snapshot count to keep
|
||||
attr_accessor :snapshots_to_keep
|
||||
|
||||
# @return [Integer] Indicates which hour in UTC timezone a snapshot
|
||||
# should be taken
|
||||
attr_accessor :hour
|
||||
|
||||
# @return [Integer] Indicates which minute snapshot should be taken
|
||||
attr_accessor :minute
|
||||
|
||||
# @return [Integer] Resource size in bytes, current storage usage for the
|
||||
# volume in bytes
|
||||
attr_accessor :used_bytes
|
||||
|
||||
|
||||
#
|
||||
# Mapper for DailySchedule class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'dailySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'DailySchedule',
|
||||
model_properties: {
|
||||
snapshots_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
hour: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'hour',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
minute: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'minute',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
used_bytes: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'usedBytes',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,57 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Dimension of blobs, possibly be blob type or access tier.
|
||||
#
|
||||
class Dimension
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Display name of dimension.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Display name of dimension.
|
||||
attr_accessor :display_name
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Dimension class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Dimension',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Dimension',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'displayName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for EndpointType
|
||||
#
|
||||
module EndpointType
|
||||
Src = "src"
|
||||
Dst = "dst"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,205 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume Export Policy Rule
|
||||
#
|
||||
class ExportPolicyRule
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Integer] Order index
|
||||
attr_accessor :rule_index
|
||||
|
||||
# @return [Boolean] Read only access
|
||||
attr_accessor :unix_read_only
|
||||
|
||||
# @return [Boolean] Read and write access
|
||||
attr_accessor :unix_read_write
|
||||
|
||||
# @return [Boolean] Kerberos5 Read only access. To be use with swagger
|
||||
# version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5read_only
|
||||
|
||||
# @return [Boolean] Kerberos5 Read and write access. To be use with
|
||||
# swagger version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5read_write
|
||||
|
||||
# @return [Boolean] Kerberos5i Read only access. To be use with swagger
|
||||
# version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5i_read_only
|
||||
|
||||
# @return [Boolean] Kerberos5i Read and write access. To be use with
|
||||
# swagger version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5i_read_write
|
||||
|
||||
# @return [Boolean] Kerberos5p Read only access. To be use with swagger
|
||||
# version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5p_read_only
|
||||
|
||||
# @return [Boolean] Kerberos5p Read and write access. To be use with
|
||||
# swagger version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos5p_read_write
|
||||
|
||||
# @return [Boolean] Allows CIFS protocol
|
||||
attr_accessor :cifs
|
||||
|
||||
# @return [Boolean] Allows NFSv3 protocol. Enable only for NFSv3 type
|
||||
# volumes
|
||||
attr_accessor :nfsv3
|
||||
|
||||
# @return [Boolean] Allows NFSv4.1 protocol. Enable only for NFSv4.1 type
|
||||
# volumes
|
||||
attr_accessor :nfsv41
|
||||
|
||||
# @return [String] Client ingress specification as comma separated string
|
||||
# with IPv4 CIDRs, IPv4 host addresses and host names
|
||||
attr_accessor :allowed_clients
|
||||
|
||||
# @return [Boolean] Has root access to volume. Default value: true .
|
||||
attr_accessor :has_root_access
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ExportPolicyRule class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'exportPolicyRule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ExportPolicyRule',
|
||||
model_properties: {
|
||||
rule_index: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ruleIndex',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
unix_read_only: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'unixReadOnly',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
unix_read_write: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'unixReadWrite',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5read_only: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5ReadOnly',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5read_write: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5ReadWrite',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5i_read_only: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5iReadOnly',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5i_read_write: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5iReadWrite',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5p_read_only: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5pReadOnly',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos5p_read_write: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'kerberos5pReadWrite',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
cifs: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'cifs',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
nfsv3: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'nfsv3',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
nfsv41: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'nfsv41',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
allowed_clients: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'allowedClients',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
has_root_access: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'hasRootAccess',
|
||||
default_value: true,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,69 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Hourly Schedule properties
|
||||
#
|
||||
class HourlySchedule
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Integer] Hourly snapshot count to keep
|
||||
attr_accessor :snapshots_to_keep
|
||||
|
||||
# @return [Integer] Indicates which minute snapshot should be taken
|
||||
attr_accessor :minute
|
||||
|
||||
# @return [Integer] Resource size in bytes, current storage usage for the
|
||||
# volume in bytes
|
||||
attr_accessor :used_bytes
|
||||
|
||||
|
||||
#
|
||||
# Mapper for HourlySchedule class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'hourlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'HourlySchedule',
|
||||
model_properties: {
|
||||
snapshots_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
minute: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'minute',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
used_bytes: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'usedBytes',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for InAvailabilityReasonType
|
||||
#
|
||||
module InAvailabilityReasonType
|
||||
Invalid = "Invalid"
|
||||
AlreadyExists = "AlreadyExists"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,145 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Metric specification of operation.
|
||||
#
|
||||
class MetricSpecification
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Name of metric specification.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Display name of metric specification.
|
||||
attr_accessor :display_name
|
||||
|
||||
# @return [String] Display description of metric specification.
|
||||
attr_accessor :display_description
|
||||
|
||||
# @return [String] Unit could be Bytes or Count.
|
||||
attr_accessor :unit
|
||||
|
||||
# @return [Array<Dimension>] Dimensions of blobs, including blob type and
|
||||
# access tier.
|
||||
attr_accessor :dimensions
|
||||
|
||||
# @return [String] Aggregation type could be Average.
|
||||
attr_accessor :aggregation_type
|
||||
|
||||
# @return [Boolean] The property to decide fill gap with zero or not.
|
||||
attr_accessor :fill_gap_with_zero
|
||||
|
||||
# @return [String] The category this metric specification belong to,
|
||||
# could be Capacity.
|
||||
attr_accessor :category
|
||||
|
||||
# @return [String] Account Resource Id.
|
||||
attr_accessor :resource_id_dimension_name_override
|
||||
|
||||
|
||||
#
|
||||
# Mapper for MetricSpecification class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'MetricSpecification',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MetricSpecification',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'displayName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display_description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'displayDescription',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
unit: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'unit',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
dimensions: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'dimensions',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'DimensionElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Dimension'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
aggregation_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'aggregationType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
fill_gap_with_zero: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'fillGapWithZero',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
category: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'category',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource_id_dimension_name_override: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'resourceIdDimensionNameOverride',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for MirrorState
|
||||
#
|
||||
module MirrorState
|
||||
Uninitialized = "Uninitialized"
|
||||
Mirrored = "Mirrored"
|
||||
Broken = "Broken"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,93 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Monthly Schedule properties
|
||||
#
|
||||
class MonthlySchedule
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Integer] Monthly snapshot count to keep
|
||||
attr_accessor :snapshots_to_keep
|
||||
|
||||
# @return [String] Indicates which days of the month snapshot should be
|
||||
# taken. A comma delimited string.
|
||||
attr_accessor :days_of_month
|
||||
|
||||
# @return [Integer] Indicates which hour in UTC timezone a snapshot
|
||||
# should be taken
|
||||
attr_accessor :hour
|
||||
|
||||
# @return [Integer] Indicates which minute snapshot should be taken
|
||||
attr_accessor :minute
|
||||
|
||||
# @return [Integer] Resource size in bytes, current storage usage for the
|
||||
# volume in bytes
|
||||
attr_accessor :used_bytes
|
||||
|
||||
|
||||
#
|
||||
# Mapper for MonthlySchedule class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'monthlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MonthlySchedule',
|
||||
model_properties: {
|
||||
snapshots_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
days_of_month: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'daysOfMonth',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hour: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'hour',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
minute: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'minute',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
used_bytes: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'usedBytes',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,159 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Mount Target
|
||||
#
|
||||
class MountTarget
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] mountTargetId. UUID v4 used to identify the
|
||||
# MountTarget
|
||||
attr_accessor :mount_target_id
|
||||
|
||||
# @return [String] fileSystemId. UUID v4 used to identify the MountTarget
|
||||
attr_accessor :file_system_id
|
||||
|
||||
# @return [String] ipAddress. The mount target's IPv4 address
|
||||
attr_accessor :ip_address
|
||||
|
||||
# @return [String] smbServerFQDN. The SMB server's Fully Qualified Domain
|
||||
# Name, FQDN
|
||||
attr_accessor :smb_server_fqdn
|
||||
|
||||
|
||||
#
|
||||
# Mapper for MountTarget class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'mountTarget',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MountTarget',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mount_target_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.mountTargetId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
file_system_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.fileSystemId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
ip_address: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.ipAddress',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
smb_server_fqdn: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.smbServerFqdn',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,93 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Mount target properties
|
||||
#
|
||||
class MountTargetProperties
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] mountTargetId. UUID v4 used to identify the
|
||||
# MountTarget
|
||||
attr_accessor :mount_target_id
|
||||
|
||||
# @return [String] fileSystemId. UUID v4 used to identify the MountTarget
|
||||
attr_accessor :file_system_id
|
||||
|
||||
# @return [String] ipAddress. The mount target's IPv4 address
|
||||
attr_accessor :ip_address
|
||||
|
||||
# @return [String] smbServerFQDN. The SMB server's Fully Qualified Domain
|
||||
# Name, FQDN
|
||||
attr_accessor :smb_server_fqdn
|
||||
|
||||
|
||||
#
|
||||
# Mapper for MountTargetProperties class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'mountTargetProperties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MountTargetProperties',
|
||||
model_properties: {
|
||||
mount_target_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'mountTargetId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
file_system_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'fileSystemId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
ip_address: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'ipAddress',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
smb_server_fqdn: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'smbServerFqdn',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,133 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# NetApp account resource
|
||||
#
|
||||
class NetAppAccount
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Array<ActiveDirectory>] Active Directories
|
||||
attr_accessor :active_directories
|
||||
|
||||
|
||||
#
|
||||
# Mapper for NetAppAccount class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'netAppAccount',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetAppAccount',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
active_directories: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.activeDirectories',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActiveDirectoryElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActiveDirectory'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of NetApp account resources
|
||||
#
|
||||
class NetAppAccountList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<NetAppAccount>] Multiple NetApp accounts
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for NetAppAccountList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'netAppAccountList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetAppAccountList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'NetAppAccountElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetAppAccount'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,133 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# NetApp account patch resource
|
||||
#
|
||||
class NetAppAccountPatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [Array<ActiveDirectory>] Active Directories
|
||||
attr_accessor :active_directories
|
||||
|
||||
|
||||
#
|
||||
# Mapper for NetAppAccountPatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'netAppAccountPatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetAppAccountPatch',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
active_directories: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.activeDirectories',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ActiveDirectoryElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ActiveDirectory'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,83 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Microsoft.NetApp REST API operation definition.
|
||||
#
|
||||
class Operation
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Operation name: {provider}/{resource}/{operation}
|
||||
attr_accessor :name
|
||||
|
||||
# @return [OperationDisplay] Display metadata associated with the
|
||||
# operation.
|
||||
attr_accessor :display
|
||||
|
||||
# @return [String] The origin of operations.
|
||||
attr_accessor :origin
|
||||
|
||||
# @return [ServiceSpecification] One property of operation, include
|
||||
# metric specifications.
|
||||
attr_accessor :service_specification
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Operation class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Operation',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Operation',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationDisplay'
|
||||
}
|
||||
},
|
||||
origin: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'origin',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
service_specification: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.serviceSpecification',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ServiceSpecification'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,79 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Display metadata associated with the operation.
|
||||
#
|
||||
class OperationDisplay
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Service provider: Microsoft NetApp.
|
||||
attr_accessor :provider
|
||||
|
||||
# @return [String] Resource on which the operation is performed etc.
|
||||
attr_accessor :resource
|
||||
|
||||
# @return [String] Type of operation: get, read, delete, etc.
|
||||
attr_accessor :operation
|
||||
|
||||
# @return [String] Operation description.
|
||||
attr_accessor :description
|
||||
|
||||
|
||||
#
|
||||
# Mapper for OperationDisplay class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Operation_display',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationDisplay',
|
||||
model_properties: {
|
||||
provider: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'provider',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'resource',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'operation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,57 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Result of the request to list Cloud Volume operations. It contains a list
|
||||
# of operations and a URL link to get the next set of results.
|
||||
#
|
||||
class OperationListResult
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Operation>] List of Storage operations supported by the
|
||||
# Storage resource provider.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for OperationListResult class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'OperationListResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationListResult',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'OperationElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Operation'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Pool change request
|
||||
#
|
||||
class PoolChangeRequest
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource id of the pool to move volume to
|
||||
attr_accessor :new_pool_resource_id
|
||||
|
||||
|
||||
#
|
||||
# Mapper for PoolChangeRequest class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'poolChangeRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'PoolChangeRequest',
|
||||
model_properties: {
|
||||
new_pool_resource_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'newPoolResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for QosType
|
||||
#
|
||||
module QosType
|
||||
Auto = "Auto"
|
||||
Manual = "Manual"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,73 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Quota availability request content.
|
||||
#
|
||||
class QuotaAvailabilityRequest
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Name of the resource to verify.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [CheckQuotaNameResourceTypes] Resource type used for
|
||||
# verification. Possible values include:
|
||||
# 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] Resource group name.
|
||||
attr_accessor :resource_group
|
||||
|
||||
|
||||
#
|
||||
# Mapper for QuotaAvailabilityRequest class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'QuotaAvailabilityRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'QuotaAvailabilityRequest',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource_group: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'resourceGroup',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for RelationshipStatus
|
||||
#
|
||||
module RelationshipStatus
|
||||
Idle = "Idle"
|
||||
Transferring = "Transferring"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,94 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Replication properties
|
||||
#
|
||||
class ReplicationObject
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Id
|
||||
attr_accessor :replication_id
|
||||
|
||||
# @return [EndpointType] Indicates whether the local volume is the source
|
||||
# or destination for the Volume Replication. Possible values include:
|
||||
# 'src', 'dst'
|
||||
attr_accessor :endpoint_type
|
||||
|
||||
# @return [ReplicationSchedule] Schedule. Possible values include:
|
||||
# '_10minutely', 'hourly', 'daily'
|
||||
attr_accessor :replication_schedule
|
||||
|
||||
# @return [String] The resource ID of the remote volume.
|
||||
attr_accessor :remote_volume_resource_id
|
||||
|
||||
# @return [String] The remote region for the other end of the Volume
|
||||
# Replication.
|
||||
attr_accessor :remote_volume_region
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ReplicationObject class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'replicationObject',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ReplicationObject',
|
||||
model_properties: {
|
||||
replication_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'replicationId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
endpoint_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'endpointType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
replication_schedule: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'replicationSchedule',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
remote_volume_resource_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'remoteVolumeResourceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
remote_volume_region: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'remoteVolumeRegion',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for ReplicationSchedule
|
||||
#
|
||||
module ReplicationSchedule
|
||||
_10minutely = "_10minutely"
|
||||
Hourly = "hourly"
|
||||
Daily = "daily"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,93 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Replication status
|
||||
#
|
||||
class ReplicationStatus
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Boolean] Replication health check
|
||||
attr_accessor :healthy
|
||||
|
||||
# @return [RelationshipStatus] Status of the mirror relationship.
|
||||
# Possible values include: 'Idle', 'Transferring'
|
||||
attr_accessor :relationship_status
|
||||
|
||||
# @return [MirrorState] The status of the replication. Possible values
|
||||
# include: 'Uninitialized', 'Mirrored', 'Broken'
|
||||
attr_accessor :mirror_state
|
||||
|
||||
# @return [String] The progress of the replication
|
||||
attr_accessor :total_progress
|
||||
|
||||
# @return [String] Displays error message if the replication is in an
|
||||
# error state
|
||||
attr_accessor :error_message
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ReplicationStatus class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'replicationStatus',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ReplicationStatus',
|
||||
model_properties: {
|
||||
healthy: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'healthy',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
relationship_status: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'relationshipStatus',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
mirror_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'mirrorState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
total_progress: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'totalProgress',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
error_message: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'errorMessage',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,72 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Resource name availability request content.
|
||||
#
|
||||
class ResourceNameAvailabilityRequest
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource name to verify.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] Resource group name.
|
||||
attr_accessor :resource_group
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ResourceNameAvailabilityRequest class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ResourceNameAvailabilityRequest',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ResourceNameAvailabilityRequest',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource_group: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'resourceGroup',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for SecurityStyle
|
||||
#
|
||||
module SecurityStyle
|
||||
Ntfs = "ntfs"
|
||||
Unix = "unix"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Defines values for ServiceLevel
|
||||
#
|
||||
module ServiceLevel
|
||||
Standard = "Standard"
|
||||
Premium = "Premium"
|
||||
Ultra = "Ultra"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,56 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# One property of operation, include metric specifications.
|
||||
#
|
||||
class ServiceSpecification
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<MetricSpecification>] Metric specifications of
|
||||
# operation.
|
||||
attr_accessor :metric_specifications
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ServiceSpecification class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ServiceSpecification',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ServiceSpecification',
|
||||
model_properties: {
|
||||
metric_specifications: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'metricSpecifications',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'MetricSpecificationElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MetricSpecification'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,123 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Snapshot of a Volume
|
||||
#
|
||||
class Snapshot
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] snapshotId. UUID v4 used to identify the Snapshot
|
||||
attr_accessor :snapshot_id
|
||||
|
||||
# @return [DateTime] name. The creation date of the snapshot
|
||||
attr_accessor :created
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Snapshot class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshot',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Snapshot',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
snapshot_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.snapshotId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
created: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.created',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of Snapshot Policies
|
||||
#
|
||||
class SnapshotPoliciesList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<SnapshotPolicy>] A list of snapshot policies
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotPoliciesList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPoliciesList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPoliciesList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'SnapshotPolicyElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPolicy'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,185 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Snapshot policy information
|
||||
#
|
||||
class SnapshotPolicy
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Snapshot policy name
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [HourlySchedule] hourlySchedule. Schedule for hourly snapshots
|
||||
attr_accessor :hourly_schedule
|
||||
|
||||
# @return [DailySchedule] dailySchedule. Schedule for daily snapshots
|
||||
attr_accessor :daily_schedule
|
||||
|
||||
# @return [WeeklySchedule] weeklySchedule. Schedule for weekly snapshots
|
||||
attr_accessor :weekly_schedule
|
||||
|
||||
# @return [MonthlySchedule] monthlySchedule. Schedule for monthly
|
||||
# snapshots
|
||||
attr_accessor :monthly_schedule
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotPolicy class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPolicy',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hourly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.hourlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'HourlySchedule'
|
||||
}
|
||||
},
|
||||
daily_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'DailySchedule'
|
||||
}
|
||||
},
|
||||
weekly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'WeeklySchedule'
|
||||
}
|
||||
},
|
||||
monthly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MonthlySchedule'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,185 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Snapshot policy properties
|
||||
#
|
||||
class SnapshotPolicyDetails
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Snapshot policy name
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [HourlySchedule] hourlySchedule. Schedule for hourly snapshots
|
||||
attr_accessor :hourly_schedule
|
||||
|
||||
# @return [DailySchedule] dailySchedule. Schedule for daily snapshots
|
||||
attr_accessor :daily_schedule
|
||||
|
||||
# @return [WeeklySchedule] weeklySchedule. Schedule for weekly snapshots
|
||||
attr_accessor :weekly_schedule
|
||||
|
||||
# @return [MonthlySchedule] monthlySchedule. Schedule for monthly
|
||||
# snapshots
|
||||
attr_accessor :monthly_schedule
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotPolicyDetails class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPolicyDetails',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPolicyDetails',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hourly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.hourlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'HourlySchedule'
|
||||
}
|
||||
},
|
||||
daily_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'DailySchedule'
|
||||
}
|
||||
},
|
||||
weekly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'WeeklySchedule'
|
||||
}
|
||||
},
|
||||
monthly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MonthlySchedule'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,185 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Snapshot policy Details for create and update
|
||||
#
|
||||
class SnapshotPolicyPatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] Snapshot policy name
|
||||
attr_accessor :name1
|
||||
|
||||
# @return [HourlySchedule] hourlySchedule. Schedule for hourly snapshots
|
||||
attr_accessor :hourly_schedule
|
||||
|
||||
# @return [DailySchedule] dailySchedule. Schedule for daily snapshots
|
||||
attr_accessor :daily_schedule
|
||||
|
||||
# @return [WeeklySchedule] weeklySchedule. Schedule for weekly snapshots
|
||||
attr_accessor :weekly_schedule
|
||||
|
||||
# @return [MonthlySchedule] monthlySchedule. Schedule for monthly
|
||||
# snapshots
|
||||
attr_accessor :monthly_schedule
|
||||
|
||||
# @return [Boolean] The property to decide policy is enabled or not
|
||||
attr_accessor :enabled
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotPolicyPatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPolicyPatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPolicyPatch',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
name1: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hourly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.hourlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'HourlySchedule'
|
||||
}
|
||||
},
|
||||
daily_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dailySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'DailySchedule'
|
||||
}
|
||||
},
|
||||
weekly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.weeklySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'WeeklySchedule'
|
||||
}
|
||||
},
|
||||
monthly_schedule: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.monthlySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MonthlySchedule'
|
||||
}
|
||||
},
|
||||
enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.enabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,54 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volumes associated with snapshot policy
|
||||
#
|
||||
class SnapshotPolicyVolumeList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return List of volumes
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotPolicyVolumeList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPolicyVolumeList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotPolicyVolumeList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ObjectElementType',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of Snapshots
|
||||
#
|
||||
class SnapshotsList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Snapshot>] A list of Snapshots
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for SnapshotsList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotsList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'SnapshotsList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'SnapshotElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Snapshot'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,93 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Vault information
|
||||
#
|
||||
class Vault
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] Vault Name
|
||||
attr_accessor :vault_name
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Vault class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'vault',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Vault',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
vault_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.vaultName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of Vaults
|
||||
#
|
||||
class VaultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Vault>] A list of vaults
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VaultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'vaultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VaultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VaultElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Vault'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,382 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume resource
|
||||
#
|
||||
class Volume
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [String] FileSystem ID. Unique FileSystem Identifier.
|
||||
attr_accessor :file_system_id
|
||||
|
||||
# @return [String] Creation Token or File Path. A unique file path for
|
||||
# the volume. Used when creating mount targets
|
||||
attr_accessor :creation_token
|
||||
|
||||
# @return [ServiceLevel] serviceLevel. The service level of the file
|
||||
# system. Possible values include: 'Standard', 'Premium', 'Ultra'.
|
||||
# Default value: 'Premium' .
|
||||
attr_accessor :service_level
|
||||
|
||||
# @return [Integer] usageThreshold. Maximum storage quota allowed for a
|
||||
# file system in bytes. This is a soft quota used for alerting only.
|
||||
# Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes.
|
||||
# Default value: 107374182400 .
|
||||
attr_accessor :usage_threshold
|
||||
|
||||
# @return [VolumePropertiesExportPolicy] exportPolicy. Set of export
|
||||
# policy rules
|
||||
attr_accessor :export_policy
|
||||
|
||||
# @return [Array<String>] protocolTypes. Set of protocol types
|
||||
attr_accessor :protocol_types
|
||||
|
||||
# @return [String] Azure lifecycle management
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
# @return [String] Snapshot ID. UUID v4 or resource identifier used to
|
||||
# identify the Snapshot.
|
||||
attr_accessor :snapshot_id
|
||||
|
||||
# @return [String] Backup ID. UUID v4 or resource identifier used to
|
||||
# identify the Backup.
|
||||
attr_accessor :backup_id
|
||||
|
||||
# @return [String] Baremetal Tenant ID. Unique Baremetal Tenant
|
||||
# Identifier.
|
||||
attr_accessor :baremetal_tenant_id
|
||||
|
||||
# @return [String] The Azure Resource URI for a delegated subnet. Must
|
||||
# have the delegation Microsoft.NetApp/volumes
|
||||
attr_accessor :subnet_id
|
||||
|
||||
# @return [Array<MountTargetProperties>] mountTargets. List of mount
|
||||
# targets
|
||||
attr_accessor :mount_targets
|
||||
|
||||
# @return [String] What type of volume is this
|
||||
attr_accessor :volume_type
|
||||
|
||||
# @return [VolumePropertiesDataProtection] DataProtection. DataProtection
|
||||
# type volumes include an object containing details of the replication
|
||||
attr_accessor :data_protection
|
||||
|
||||
# @return [Boolean] Restoring
|
||||
attr_accessor :is_restoring
|
||||
|
||||
# @return [Boolean] If enabled (true) the volume will contain a read-only
|
||||
# .snapshot directory which provides access to each of the volume's
|
||||
# snapshots (default to true).
|
||||
attr_accessor :snapshot_directory_visible
|
||||
|
||||
# @return [Boolean] Describe if a volume is KerberosEnabled. To be use
|
||||
# with swagger version 2020-05-01 or later. Default value: false .
|
||||
attr_accessor :kerberos_enabled
|
||||
|
||||
# @return [SecurityStyle] The security style of volume. Possible values
|
||||
# include: 'ntfs', 'unix'
|
||||
attr_accessor :security_style
|
||||
|
||||
# @return [Float] Maximum throughput in Mibps that can be achieved by
|
||||
# this volume.
|
||||
attr_accessor :throughput_mibps
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Volume class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volume',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Volume',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
file_system_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.fileSystemId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
creation_token: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.creationToken',
|
||||
constraints: {
|
||||
MaxLength: 80,
|
||||
MinLength: 1,
|
||||
Pattern: '^[a-zA-Z][a-zA-Z0-9\-]{0,79}$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
service_level: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.serviceLevel',
|
||||
default_value: 'Premium',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
usage_threshold: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.usageThreshold',
|
||||
default_value: 107374182400,
|
||||
constraints: {
|
||||
InclusiveMaximum: 109951162777600,
|
||||
InclusiveMinimum: 107374182400
|
||||
},
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
export_policy: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.exportPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePropertiesExportPolicy'
|
||||
}
|
||||
},
|
||||
protocol_types: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.protocolTypes',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
snapshot_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.snapshotId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.backupId',
|
||||
constraints: {
|
||||
MaxLength: 36,
|
||||
MinLength: 36,
|
||||
Pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}|(\\?([^\/]*[\/])*)([^\/]+)$'
|
||||
},
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
baremetal_tenant_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.baremetalTenantId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
subnet_id: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.subnetId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
mount_targets: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.mountTargets',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'MountTargetPropertiesElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MountTargetProperties'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
volume_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.volumeType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
data_protection: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dataProtection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePropertiesDataProtection'
|
||||
}
|
||||
},
|
||||
is_restoring: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.isRestoring',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
snapshot_directory_visible: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.snapshotDirectoryVisible',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
kerberos_enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.kerberosEnabled',
|
||||
default_value: false,
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
security_style: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.securityStyle',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
throughput_mibps: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.throughputMibps',
|
||||
constraints: {
|
||||
InclusiveMaximum: 4500,
|
||||
InclusiveMinimum: 1,
|
||||
MultipleOf: 0.001
|
||||
},
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,79 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume Backup Properties
|
||||
#
|
||||
class VolumeBackupProperties
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Backup Policy Resource ID
|
||||
attr_accessor :backup_policy_id
|
||||
|
||||
# @return [Boolean] Policy Enforced
|
||||
attr_accessor :policy_enforced
|
||||
|
||||
# @return [String] Vault Resource ID
|
||||
attr_accessor :vault_id
|
||||
|
||||
# @return [Boolean] Backup Enabled
|
||||
attr_accessor :backup_enabled
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumeBackupProperties class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeBackupProperties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackupProperties',
|
||||
model_properties: {
|
||||
backup_policy_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupPolicyId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
policy_enforced: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'policyEnforced',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
vault_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'vaultId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backup_enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupEnabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,68 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume details using the backup policy
|
||||
#
|
||||
class VolumeBackups
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Volume name
|
||||
attr_accessor :volume_name
|
||||
|
||||
# @return [Integer] Total count of backups for volume
|
||||
attr_accessor :backups_count
|
||||
|
||||
# @return [Boolean] Policy enabled
|
||||
attr_accessor :policy_enabled
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumeBackups class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeBackups',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackups',
|
||||
model_properties: {
|
||||
volume_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
backups_count: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backupsCount',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
policy_enabled: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'policyEnabled',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# List of volume resources
|
||||
#
|
||||
class VolumeList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Volume>] List of volumes
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumeList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VolumeElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Volume'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,178 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume patch resource
|
||||
#
|
||||
class VolumePatch
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource location
|
||||
attr_accessor :location
|
||||
|
||||
# @return [String] Resource Id
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Resource name
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Resource type
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Hash{String => String}] Resource tags
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [ServiceLevel] serviceLevel. The service level of the file
|
||||
# system. Possible values include: 'Standard', 'Premium', 'Ultra'.
|
||||
# Default value: 'Premium' .
|
||||
attr_accessor :service_level
|
||||
|
||||
# @return [Integer] usageThreshold. Maximum storage quota allowed for a
|
||||
# file system in bytes. This is a soft quota used for alerting only.
|
||||
# Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes.
|
||||
# Default value: 107374182400 .
|
||||
attr_accessor :usage_threshold
|
||||
|
||||
# @return [VolumePatchPropertiesExportPolicy] exportPolicy. Set of export
|
||||
# policy rules
|
||||
attr_accessor :export_policy
|
||||
|
||||
# @return [Float] Maximum throughput in Mibps that can be achieved by
|
||||
# this volume.
|
||||
attr_accessor :throughput_mibps
|
||||
|
||||
# @return [VolumePatchPropertiesDataProtection] DataProtection.
|
||||
# DataProtection type volumes include an object containing details of the
|
||||
# replication
|
||||
attr_accessor :data_protection
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumePatch class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumePatch',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePatch',
|
||||
model_properties: {
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'id',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
service_level: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.serviceLevel',
|
||||
default_value: 'Premium',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
usage_threshold: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.usageThreshold',
|
||||
default_value: 107374182400,
|
||||
constraints: {
|
||||
InclusiveMaximum: 109951162777600,
|
||||
InclusiveMinimum: 107374182400
|
||||
},
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
export_policy: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.exportPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePatchPropertiesExportPolicy'
|
||||
}
|
||||
},
|
||||
throughput_mibps: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.throughputMibps',
|
||||
constraints: {
|
||||
InclusiveMaximum: 4500,
|
||||
InclusiveMinimum: 1,
|
||||
MultipleOf: 0.001
|
||||
},
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
data_protection: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.dataProtection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePatchPropertiesDataProtection'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,50 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# DataProtection
|
||||
|
||||
# DataProtection type volumes include an object containing details of the
|
||||
# replication
|
||||
#
|
||||
class VolumePatchPropertiesDataProtection
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [VolumeBackupProperties] Backup. Backup Properties
|
||||
attr_accessor :backup
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumePatchPropertiesDataProtection class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumePatchProperties_dataProtection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePatchPropertiesDataProtection',
|
||||
model_properties: {
|
||||
backup: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backup',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackupProperties'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,58 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# exportPolicy
|
||||
|
||||
# Set of export policy rules
|
||||
#
|
||||
class VolumePatchPropertiesExportPolicy
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<ExportPolicyRule>] Export policy rule. Export policy
|
||||
# rule
|
||||
attr_accessor :rules
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumePatchPropertiesExportPolicy class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumePatchProperties_exportPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePatchPropertiesExportPolicy',
|
||||
model_properties: {
|
||||
rules: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'rules',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ExportPolicyRuleElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ExportPolicyRule'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,74 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# DataProtection
|
||||
|
||||
# DataProtection type volumes include an object containing details of the
|
||||
# replication
|
||||
#
|
||||
class VolumePropertiesDataProtection
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [VolumeBackupProperties] Backup. Backup Properties
|
||||
attr_accessor :backup
|
||||
|
||||
# @return [ReplicationObject] Replication. Replication properties
|
||||
attr_accessor :replication
|
||||
|
||||
# @return [VolumeSnapshotProperties] Snapshot. Snapshot properties.
|
||||
attr_accessor :snapshot
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumePropertiesDataProtection class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeProperties_dataProtection',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePropertiesDataProtection',
|
||||
model_properties: {
|
||||
backup: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'backup',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeBackupProperties'
|
||||
}
|
||||
},
|
||||
replication: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'replication',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ReplicationObject'
|
||||
}
|
||||
},
|
||||
snapshot: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshot',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeSnapshotProperties'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,58 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# exportPolicy
|
||||
|
||||
# Set of export policy rules
|
||||
#
|
||||
class VolumePropertiesExportPolicy
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<ExportPolicyRule>] Export policy rule. Export policy
|
||||
# rule
|
||||
attr_accessor :rules
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumePropertiesExportPolicy class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeProperties_exportPolicy',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumePropertiesExportPolicy',
|
||||
model_properties: {
|
||||
rules: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'rules',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ExportPolicyRuleElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ExportPolicyRule'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# revert a volume to the snapshot
|
||||
#
|
||||
class VolumeRevert
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Resource id of the snapshot
|
||||
attr_accessor :snapshot_id
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumeRevert class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeRevert',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeRevert',
|
||||
model_properties: {
|
||||
snapshot_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,46 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Volume Snapshot Properties
|
||||
#
|
||||
class VolumeSnapshotProperties
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Snapshot Policy ResourceId
|
||||
attr_accessor :snapshot_policy_id
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VolumeSnapshotProperties class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'volumeSnapshotProperties',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VolumeSnapshotProperties',
|
||||
model_properties: {
|
||||
snapshot_policy_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotPolicyId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,94 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
module Models
|
||||
#
|
||||
# Weekly Schedule properties, make a snapshot every week at a specific day
|
||||
# or days
|
||||
#
|
||||
class WeeklySchedule
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Integer] Weekly snapshot count to keep
|
||||
attr_accessor :snapshots_to_keep
|
||||
|
||||
# @return [String] Indicates which weekdays snapshot should be taken,
|
||||
# accepts a comma separated list of week day names in english
|
||||
attr_accessor :day
|
||||
|
||||
# @return [Integer] Indicates which hour in UTC timezone a snapshot
|
||||
# should be taken
|
||||
attr_accessor :hour
|
||||
|
||||
# @return [Integer] Indicates which minute snapshot should be taken
|
||||
attr_accessor :minute
|
||||
|
||||
# @return [Integer] Resource size in bytes, current storage usage for the
|
||||
# volume in bytes
|
||||
attr_accessor :used_bytes
|
||||
|
||||
|
||||
#
|
||||
# Mapper for WeeklySchedule class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'weeklySchedule',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'WeeklySchedule',
|
||||
model_properties: {
|
||||
snapshots_to_keep: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'snapshotsToKeep',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
day: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'day',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
hour: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'hour',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
minute: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'minute',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
used_bytes: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'usedBytes',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure end
|
||||
module Azure::NetApp end
|
||||
module Azure::NetApp::Mgmt end
|
||||
module Azure::NetApp::Mgmt::V2020_07_01 end
|
|
@ -0,0 +1,424 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class NetAppResource
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the NetAppResource class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Check resource name availability
|
||||
#
|
||||
# Check if a resource name is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CheckAvailabilityResponse] operation results.
|
||||
#
|
||||
def check_name_availability(location, name, type, resource_group, custom_headers:nil)
|
||||
response = check_name_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Check resource name availability
|
||||
#
|
||||
# Check if a resource name is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def check_name_availability_with_http_info(location, name, type, resource_group, custom_headers:nil)
|
||||
check_name_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Check resource name availability
|
||||
#
|
||||
# Check if a resource name is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def check_name_availability_async(location, name, type, resource_group, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'location is nil' if location.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'name is nil' if name.nil?
|
||||
fail ArgumentError, 'type is nil' if type.nil?
|
||||
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
||||
|
||||
body = ResourceNameAvailabilityRequest.new
|
||||
unless name.nil? && type.nil? && resource_group.nil?
|
||||
body.name = name
|
||||
body.type = type
|
||||
body.resource_group = resource_group
|
||||
end
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::ResourceNameAvailabilityRequest.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:post, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckAvailabilityResponse.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Check file path availability
|
||||
#
|
||||
# Check if a file path is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CheckAvailabilityResponse] operation results.
|
||||
#
|
||||
def check_file_path_availability(location, name, type, resource_group, custom_headers:nil)
|
||||
response = check_file_path_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Check file path availability
|
||||
#
|
||||
# Check if a file path is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def check_file_path_availability_with_http_info(location, name, type, resource_group, custom_headers:nil)
|
||||
check_file_path_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Check file path availability
|
||||
#
|
||||
# Check if a file path is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Resource name to verify.
|
||||
# @param type [CheckNameResourceTypes] Resource type used for verification.
|
||||
# Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def check_file_path_availability_async(location, name, type, resource_group, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'location is nil' if location.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'name is nil' if name.nil?
|
||||
fail ArgumentError, 'type is nil' if type.nil?
|
||||
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
||||
|
||||
body = ResourceNameAvailabilityRequest.new
|
||||
unless name.nil? && type.nil? && resource_group.nil?
|
||||
body.name = name
|
||||
body.type = type
|
||||
body.resource_group = resource_group
|
||||
end
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::ResourceNameAvailabilityRequest.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:post, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckAvailabilityResponse.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Check quota availability
|
||||
#
|
||||
# Check if a quota is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Name of the resource to verify.
|
||||
# @param type [CheckQuotaNameResourceTypes] Resource type used for
|
||||
# verification. Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CheckAvailabilityResponse] operation results.
|
||||
#
|
||||
def check_quota_availability(location, name, type, resource_group, custom_headers:nil)
|
||||
response = check_quota_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Check quota availability
|
||||
#
|
||||
# Check if a quota is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Name of the resource to verify.
|
||||
# @param type [CheckQuotaNameResourceTypes] Resource type used for
|
||||
# verification. Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def check_quota_availability_with_http_info(location, name, type, resource_group, custom_headers:nil)
|
||||
check_quota_availability_async(location, name, type, resource_group, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Check quota availability
|
||||
#
|
||||
# Check if a quota is available.
|
||||
#
|
||||
# @param location [String] The location
|
||||
# @param name [String] Name of the resource to verify.
|
||||
# @param type [CheckQuotaNameResourceTypes] Resource type used for
|
||||
# verification. Possible values include: 'Microsoft.NetApp/netAppAccounts',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes',
|
||||
# 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'
|
||||
# @param resource_group [String] Resource group name.
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def check_quota_availability_async(location, name, type, resource_group, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'location is nil' if location.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
fail ArgumentError, 'name is nil' if name.nil?
|
||||
fail ArgumentError, 'type is nil' if type.nil?
|
||||
fail ArgumentError, 'resource_group is nil' if resource_group.nil?
|
||||
|
||||
body = QuotaAvailabilityRequest.new
|
||||
unless name.nil? && type.nil? && resource_group.nil?
|
||||
body.name = name
|
||||
body.type = type
|
||||
body.resource_group = resource_group
|
||||
end
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::QuotaAvailabilityRequest.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkQuotaAvailability'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:post, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckAvailabilityResponse.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,115 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Operations
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Operations class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Describes the Resource Provider
|
||||
#
|
||||
# Lists all of the available Microsoft.NetApp Rest API operations
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [OperationListResult] operation results.
|
||||
#
|
||||
def list(custom_headers:nil)
|
||||
response = list_async(custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describes the Resource Provider
|
||||
#
|
||||
# Lists all of the available Microsoft.NetApp Rest API operations
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(custom_headers:nil)
|
||||
list_async(custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describes the Resource Provider
|
||||
#
|
||||
# Lists all of the available Microsoft.NetApp Rest API operations
|
||||
#
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(custom_headers:nil)
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'providers/Microsoft.NetApp/operations'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::OperationListResult.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,737 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Pools
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Pools class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Describe all Capacity Pools
|
||||
#
|
||||
# List all capacity pools in the NetApp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPoolList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all Capacity Pools
|
||||
#
|
||||
# List all capacity pools in the NetApp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all Capacity Pools
|
||||
#
|
||||
# List all capacity pools in the NetApp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a Capacity Pool
|
||||
#
|
||||
# Get details of the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPool] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a Capacity Pool
|
||||
#
|
||||
# Get details of the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a Capacity Pool
|
||||
#
|
||||
# Get details of the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update the specified capacity pool within the resource group
|
||||
#
|
||||
# Create or Update a capacity pool
|
||||
#
|
||||
# @param body [CapacityPool] Capacity pool object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPool] operation results.
|
||||
#
|
||||
def create_or_update(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body [CapacityPool] Capacity pool object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Update a capacity pool
|
||||
#
|
||||
# Patch the specified capacity pool
|
||||
#
|
||||
# @param body [CapacityPoolPatch] Capacity pool object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPool] operation results.
|
||||
#
|
||||
def update(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body [CapacityPoolPatch] Capacity pool object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def update_async(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a capacity pool
|
||||
#
|
||||
# Delete the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update the specified capacity pool within the resource group
|
||||
#
|
||||
# Create or Update a capacity pool
|
||||
#
|
||||
# @param body [CapacityPool] Capacity pool object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPool] operation results.
|
||||
#
|
||||
def begin_create_or_update(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update the specified capacity pool within the resource group
|
||||
#
|
||||
# Create or Update a capacity pool
|
||||
#
|
||||
# @param body [CapacityPool] Capacity pool object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_create_or_update_with_http_info(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
begin_create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update the specified capacity pool within the resource group
|
||||
#
|
||||
# Create or Update a capacity pool
|
||||
#
|
||||
# @param body [CapacityPool] Capacity pool object supplied in the body of the
|
||||
# operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_create_or_update_async(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Update a capacity pool
|
||||
#
|
||||
# Patch the specified capacity pool
|
||||
#
|
||||
# @param body [CapacityPoolPatch] Capacity pool object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CapacityPool] operation results.
|
||||
#
|
||||
def begin_update(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = begin_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Update a capacity pool
|
||||
#
|
||||
# Patch the specified capacity pool
|
||||
#
|
||||
# @param body [CapacityPoolPatch] Capacity pool object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_update_with_http_info(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
begin_update_async(body, resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Update a capacity pool
|
||||
#
|
||||
# Patch the specified capacity pool
|
||||
#
|
||||
# @param body [CapacityPoolPatch] Capacity pool object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_update_async(body, resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolPatch.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a capacity pool
|
||||
#
|
||||
# Delete the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a capacity pool
|
||||
#
|
||||
# Delete the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a capacity pool
|
||||
#
|
||||
# Delete the specified capacity pool
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, pool_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,700 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class SnapshotPolicies
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the SnapshotPolicies class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# List snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotPoliciesList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# List snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# List snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPoliciesList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Get a snapshot Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotPolicy] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a snapshot Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a snapshot Policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'snapshot_policy_name is nil' if snapshot_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'snapshotPolicyName' => snapshot_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicy] Snapshot policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotPolicy] operation results.
|
||||
#
|
||||
def create(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = create_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicy] Snapshot policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def create_with_http_info(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
create_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicy] Snapshot policy object supplied in the body of
|
||||
# the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def create_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'snapshot_policy_name is nil' if snapshot_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'snapshotPolicyName' => snapshot_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 201
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicyPatch] Snapshot policy object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotPolicy] operation results.
|
||||
#
|
||||
def update(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = update_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicyPatch] Snapshot policy object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def update_with_http_info(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
update_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Patch a snapshot policy
|
||||
#
|
||||
# @param body [SnapshotPolicyPatch] Snapshot policy object supplied in the body
|
||||
# of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def update_async(body, resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'snapshot_policy_name is nil' if snapshot_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyPatch.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'snapshotPolicyName' => snapshot_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotPolicyVolumeList] operation results.
|
||||
#
|
||||
def list_volumes(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = list_volumes_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_volumes_with_http_info(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
list_volumes_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# Get volumes associated with snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_volumes_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'snapshot_policy_name is nil' if snapshot_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/listVolumes'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'snapshotPolicyName' => snapshot_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyVolumeList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete snapshot policy
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param snapshot_policy_name [String] The name of the snapshot policy target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, snapshot_policy_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'snapshot_policy_name is nil' if snapshot_policy_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'snapshotPolicyName' => snapshot_policy_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,794 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Snapshots
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Snapshots class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Describe all snapshots
|
||||
#
|
||||
# List all snapshots associated with the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [SnapshotsList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all snapshots
|
||||
#
|
||||
# List all snapshots associated with the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe all snapshots
|
||||
#
|
||||
# List all snapshots associated with the volume
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotsList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a snapshot
|
||||
#
|
||||
# Get details of the specified snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Snapshot] operation results.
|
||||
#
|
||||
def get(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a snapshot
|
||||
#
|
||||
# Get details of the specified snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def get_with_http_info(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
get_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Describe a snapshot
|
||||
#
|
||||
# Get details of the specified snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def get_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'snapshot_name is nil' if snapshot_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'snapshotName' => snapshot_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot
|
||||
#
|
||||
# Create the specified snapshot within the given volume
|
||||
#
|
||||
# @param body [Snapshot] Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Snapshot] operation results.
|
||||
#
|
||||
def create(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body [Snapshot] Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Update a snapshot
|
||||
#
|
||||
# Patch a snapshot
|
||||
#
|
||||
# @param body Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Snapshot] operation results.
|
||||
#
|
||||
def update(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# @param body Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a snapshot
|
||||
#
|
||||
# Delete snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
def delete(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] promise which provides async access to http
|
||||
# response.
|
||||
#
|
||||
def delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
# Send request
|
||||
promise = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers)
|
||||
|
||||
promise = promise.then do |response|
|
||||
# Defining deserialization method.
|
||||
deserialize_method = lambda do |parsed_response|
|
||||
end
|
||||
|
||||
# Waiting for response.
|
||||
@client.get_long_running_operation_result(response, deserialize_method)
|
||||
end
|
||||
|
||||
promise
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot
|
||||
#
|
||||
# Create the specified snapshot within the given volume
|
||||
#
|
||||
# @param body [Snapshot] Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Snapshot] operation results.
|
||||
#
|
||||
def begin_create(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot
|
||||
#
|
||||
# Create the specified snapshot within the given volume
|
||||
#
|
||||
# @param body [Snapshot] Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_create_with_http_info(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a snapshot
|
||||
#
|
||||
# Create the specified snapshot within the given volume
|
||||
#
|
||||
# @param body [Snapshot] Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_create_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'snapshot_name is nil' if snapshot_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'snapshotName' => snapshot_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:put, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 201 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 201
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Update a snapshot
|
||||
#
|
||||
# Patch a snapshot
|
||||
#
|
||||
# @param body Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Snapshot] operation results.
|
||||
#
|
||||
def begin_update(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Update a snapshot
|
||||
#
|
||||
# Patch a snapshot
|
||||
#
|
||||
# @param body Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_update_with_http_info(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Update a snapshot
|
||||
#
|
||||
# Patch a snapshot
|
||||
#
|
||||
# @param body Snapshot object supplied in the body of the operation.
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
fail ArgumentError, 'body is nil' if body.nil?
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'snapshot_name is nil' if snapshot_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
|
||||
# Serialize Request
|
||||
request_mapper = {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'body',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
}
|
||||
request_content = @client.serialize(request_mapper, body)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'snapshotName' => snapshot_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
body: request_content,
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:patch, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a snapshot
|
||||
#
|
||||
# Delete snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def begin_delete(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
response = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a snapshot
|
||||
#
|
||||
# Delete snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def begin_delete_with_http_info(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
begin_delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete a snapshot
|
||||
#
|
||||
# Delete snapshot
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param pool_name [String] The name of the capacity pool
|
||||
# @param volume_name [String] The name of the volume
|
||||
# @param snapshot_name [String] The name of the mount target
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def begin_delete_async(resource_group_name, account_name, pool_name, volume_name, snapshot_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, 'pool_name is nil' if pool_name.nil?
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
|
||||
fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'volume_name is nil' if volume_name.nil?
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
|
||||
fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
|
||||
fail ArgumentError, 'snapshot_name is nil' if snapshot_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name,'snapshotName' => snapshot_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:delete, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200 || status_code == 202 || status_code == 204
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,128 @@
|
|||
# encoding: utf-8
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
|
||||
module Azure::NetApp::Mgmt::V2020_07_01
|
||||
#
|
||||
# Microsoft NetApp Azure Resource Provider specification
|
||||
#
|
||||
class Vaults
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Vaults class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# List vaults
|
||||
#
|
||||
# List vaults for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [VaultList] operation results.
|
||||
#
|
||||
def list(resource_group_name, account_name, custom_headers:nil)
|
||||
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# List vaults
|
||||
#
|
||||
# List vaults for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
||||
#
|
||||
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
||||
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# List vaults
|
||||
#
|
||||
# List vaults for a Netapp Account
|
||||
#
|
||||
# @param resource_group_name [String] The name of the resource group.
|
||||
# @param account_name [String] The name of the NetApp account
|
||||
# @param [Hash{String => String}] A hash of custom headers that will be added
|
||||
# to the HTTP request.
|
||||
#
|
||||
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
||||
#
|
||||
def list_async(resource_group_name, account_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
||||
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
||||
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
||||
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
||||
|
||||
|
||||
request_headers = {}
|
||||
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
|
||||
# Set Headers
|
||||
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
||||
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
headers: request_headers.merge(custom_headers || {}),
|
||||
base_url: request_url
|
||||
}
|
||||
promise = @client.make_request_async(:get, path_template, options)
|
||||
|
||||
promise = promise.then do |result|
|
||||
http_response = result.response
|
||||
status_code = http_response.status
|
||||
response_content = http_response.body
|
||||
unless status_code == 200
|
||||
error_model = JSON.load(response_content)
|
||||
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
||||
end
|
||||
|
||||
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
||||
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
||||
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
||||
# Deserialize Response
|
||||
if status_code == 200
|
||||
begin
|
||||
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
||||
result_mapper = Azure::NetApp::Mgmt::V2020_07_01::Models::VaultList.mapper()
|
||||
result.body = @client.deserialize(result_mapper, parsed_response)
|
||||
rescue Exception => e
|
||||
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
||||
end
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
promise.execute
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -2,13 +2,14 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require '2019-11-01/generated/azure_mgmt_netapp'
|
||||
require '2019-10-01/generated/azure_mgmt_netapp'
|
||||
require '2017-08-15-preview/generated/azure_mgmt_netapp'
|
||||
require '2019-05-01/generated/azure_mgmt_netapp'
|
||||
require '2020-02-01/generated/azure_mgmt_netapp'
|
||||
require '2020-06-01/generated/azure_mgmt_netapp'
|
||||
require '2019-07-01/generated/azure_mgmt_netapp'
|
||||
require '2019-06-01/generated/azure_mgmt_netapp'
|
||||
require '2019-08-01/generated/azure_mgmt_netapp'
|
||||
require '2020-02-01/generated/azure_mgmt_netapp'
|
||||
require '2019-10-01/generated/azure_mgmt_netapp'
|
||||
require '2019-11-01/generated/azure_mgmt_netapp'
|
||||
require '2019-05-01/generated/azure_mgmt_netapp'
|
||||
require '2019-07-01/generated/azure_mgmt_netapp'
|
||||
require '2020-07-01/generated/azure_mgmt_netapp'
|
||||
require 'profiles/latest/netapp_latest_profile_client'
|
||||
|
|
|
@ -6,85 +6,85 @@ require 'azure_mgmt_netapp'
|
|||
|
||||
module Azure::NetApp::Profiles::Latest
|
||||
module Mgmt
|
||||
Operations = Azure::NetApp::Mgmt::V2020_06_01::Operations
|
||||
NetAppResource = Azure::NetApp::Mgmt::V2020_06_01::NetAppResource
|
||||
Accounts = Azure::NetApp::Mgmt::V2020_06_01::Accounts
|
||||
Pools = Azure::NetApp::Mgmt::V2020_06_01::Pools
|
||||
Volumes = Azure::NetApp::Mgmt::V2020_06_01::Volumes
|
||||
Snapshots = Azure::NetApp::Mgmt::V2020_06_01::Snapshots
|
||||
SnapshotPolicies = Azure::NetApp::Mgmt::V2020_06_01::SnapshotPolicies
|
||||
AccountBackups = Azure::NetApp::Mgmt::V2020_06_01::AccountBackups
|
||||
Backups = Azure::NetApp::Mgmt::V2020_06_01::Backups
|
||||
BackupPolicies = Azure::NetApp::Mgmt::V2020_06_01::BackupPolicies
|
||||
Vaults = Azure::NetApp::Mgmt::V2020_06_01::Vaults
|
||||
Operations = Azure::NetApp::Mgmt::V2020_07_01::Operations
|
||||
NetAppResource = Azure::NetApp::Mgmt::V2020_07_01::NetAppResource
|
||||
Accounts = Azure::NetApp::Mgmt::V2020_07_01::Accounts
|
||||
Pools = Azure::NetApp::Mgmt::V2020_07_01::Pools
|
||||
Volumes = Azure::NetApp::Mgmt::V2020_07_01::Volumes
|
||||
Snapshots = Azure::NetApp::Mgmt::V2020_07_01::Snapshots
|
||||
SnapshotPolicies = Azure::NetApp::Mgmt::V2020_07_01::SnapshotPolicies
|
||||
AccountBackups = Azure::NetApp::Mgmt::V2020_07_01::AccountBackups
|
||||
Backups = Azure::NetApp::Mgmt::V2020_07_01::Backups
|
||||
BackupPolicies = Azure::NetApp::Mgmt::V2020_07_01::BackupPolicies
|
||||
Vaults = Azure::NetApp::Mgmt::V2020_07_01::Vaults
|
||||
|
||||
module Models
|
||||
VolumePatchPropertiesDataProtection = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatchPropertiesDataProtection
|
||||
VolumePatch = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatch
|
||||
Dimension = Azure::NetApp::Mgmt::V2020_06_01::Models::Dimension
|
||||
MountTarget = Azure::NetApp::Mgmt::V2020_06_01::Models::MountTarget
|
||||
ServiceSpecification = Azure::NetApp::Mgmt::V2020_06_01::Models::ServiceSpecification
|
||||
Snapshot = Azure::NetApp::Mgmt::V2020_06_01::Models::Snapshot
|
||||
OperationListResult = Azure::NetApp::Mgmt::V2020_06_01::Models::OperationListResult
|
||||
SnapshotsList = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotsList
|
||||
ResourceNameAvailabilityRequest = Azure::NetApp::Mgmt::V2020_06_01::Models::ResourceNameAvailabilityRequest
|
||||
SnapshotPolicy = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicy
|
||||
ActiveDirectory = Azure::NetApp::Mgmt::V2020_06_01::Models::ActiveDirectory
|
||||
SnapshotPoliciesList = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPoliciesList
|
||||
NetAppAccountList = Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccountList
|
||||
SnapshotPolicyDetails = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyDetails
|
||||
CapacityPool = Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPool
|
||||
SnapshotPolicyPatch = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyPatch
|
||||
CapacityPoolPatch = Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPoolPatch
|
||||
SnapshotPolicyVolumeList = Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyVolumeList
|
||||
VolumePropertiesExportPolicy = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePropertiesExportPolicy
|
||||
HourlySchedule = Azure::NetApp::Mgmt::V2020_06_01::Models::HourlySchedule
|
||||
VolumeBackupProperties = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeBackupProperties
|
||||
DailySchedule = Azure::NetApp::Mgmt::V2020_06_01::Models::DailySchedule
|
||||
VolumeSnapshotProperties = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeSnapshotProperties
|
||||
WeeklySchedule = Azure::NetApp::Mgmt::V2020_06_01::Models::WeeklySchedule
|
||||
Volume = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume
|
||||
MonthlySchedule = Azure::NetApp::Mgmt::V2020_06_01::Models::MonthlySchedule
|
||||
ReplicationStatus = Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationStatus
|
||||
VolumeRevert = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeRevert
|
||||
OperationDisplay = Azure::NetApp::Mgmt::V2020_06_01::Models::OperationDisplay
|
||||
AuthorizeRequest = Azure::NetApp::Mgmt::V2020_06_01::Models::AuthorizeRequest
|
||||
Operation = Azure::NetApp::Mgmt::V2020_06_01::Models::Operation
|
||||
BreakReplicationRequest = Azure::NetApp::Mgmt::V2020_06_01::Models::BreakReplicationRequest
|
||||
QuotaAvailabilityRequest = Azure::NetApp::Mgmt::V2020_06_01::Models::QuotaAvailabilityRequest
|
||||
PoolChangeRequest = Azure::NetApp::Mgmt::V2020_06_01::Models::PoolChangeRequest
|
||||
NetAppAccountPatch = Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccountPatch
|
||||
Backup = Azure::NetApp::Mgmt::V2020_06_01::Models::Backup
|
||||
ExportPolicyRule = Azure::NetApp::Mgmt::V2020_06_01::Models::ExportPolicyRule
|
||||
BackupsList = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupsList
|
||||
ReplicationObject = Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationObject
|
||||
BackupPatch = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPatch
|
||||
VolumeList = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeList
|
||||
VolumeBackups = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeBackups
|
||||
MetricSpecification = Azure::NetApp::Mgmt::V2020_06_01::Models::MetricSpecification
|
||||
BackupPolicy = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicy
|
||||
NetAppAccount = Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccount
|
||||
BackupPoliciesList = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPoliciesList
|
||||
MountTargetProperties = Azure::NetApp::Mgmt::V2020_06_01::Models::MountTargetProperties
|
||||
BackupPolicyDetails = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicyDetails
|
||||
VolumePatchPropertiesExportPolicy = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatchPropertiesExportPolicy
|
||||
BackupPolicyPatch = Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicyPatch
|
||||
CapacityPoolList = Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPoolList
|
||||
Vault = Azure::NetApp::Mgmt::V2020_06_01::Models::Vault
|
||||
CheckAvailabilityResponse = Azure::NetApp::Mgmt::V2020_06_01::Models::CheckAvailabilityResponse
|
||||
VaultList = Azure::NetApp::Mgmt::V2020_06_01::Models::VaultList
|
||||
VolumePropertiesDataProtection = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePropertiesDataProtection
|
||||
InAvailabilityReasonType = Azure::NetApp::Mgmt::V2020_06_01::Models::InAvailabilityReasonType
|
||||
CheckNameResourceTypes = Azure::NetApp::Mgmt::V2020_06_01::Models::CheckNameResourceTypes
|
||||
CheckQuotaNameResourceTypes = Azure::NetApp::Mgmt::V2020_06_01::Models::CheckQuotaNameResourceTypes
|
||||
ActiveDirectoryStatus = Azure::NetApp::Mgmt::V2020_06_01::Models::ActiveDirectoryStatus
|
||||
ServiceLevel = Azure::NetApp::Mgmt::V2020_06_01::Models::ServiceLevel
|
||||
QosType = Azure::NetApp::Mgmt::V2020_06_01::Models::QosType
|
||||
EndpointType = Azure::NetApp::Mgmt::V2020_06_01::Models::EndpointType
|
||||
ReplicationSchedule = Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationSchedule
|
||||
SecurityStyle = Azure::NetApp::Mgmt::V2020_06_01::Models::SecurityStyle
|
||||
RelationshipStatus = Azure::NetApp::Mgmt::V2020_06_01::Models::RelationshipStatus
|
||||
MirrorState = Azure::NetApp::Mgmt::V2020_06_01::Models::MirrorState
|
||||
VolumePatchPropertiesDataProtection = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatchPropertiesDataProtection
|
||||
VolumePatch = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatch
|
||||
Dimension = Azure::NetApp::Mgmt::V2020_07_01::Models::Dimension
|
||||
MountTarget = Azure::NetApp::Mgmt::V2020_07_01::Models::MountTarget
|
||||
ServiceSpecification = Azure::NetApp::Mgmt::V2020_07_01::Models::ServiceSpecification
|
||||
Snapshot = Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot
|
||||
OperationListResult = Azure::NetApp::Mgmt::V2020_07_01::Models::OperationListResult
|
||||
SnapshotsList = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotsList
|
||||
ResourceNameAvailabilityRequest = Azure::NetApp::Mgmt::V2020_07_01::Models::ResourceNameAvailabilityRequest
|
||||
HourlySchedule = Azure::NetApp::Mgmt::V2020_07_01::Models::HourlySchedule
|
||||
ActiveDirectory = Azure::NetApp::Mgmt::V2020_07_01::Models::ActiveDirectory
|
||||
DailySchedule = Azure::NetApp::Mgmt::V2020_07_01::Models::DailySchedule
|
||||
NetAppAccountList = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountList
|
||||
WeeklySchedule = Azure::NetApp::Mgmt::V2020_07_01::Models::WeeklySchedule
|
||||
CapacityPool = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool
|
||||
MonthlySchedule = Azure::NetApp::Mgmt::V2020_07_01::Models::MonthlySchedule
|
||||
CapacityPoolPatch = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolPatch
|
||||
SnapshotPolicy = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy
|
||||
VolumePropertiesExportPolicy = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePropertiesExportPolicy
|
||||
SnapshotPoliciesList = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPoliciesList
|
||||
VolumeBackupProperties = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeBackupProperties
|
||||
SnapshotPolicyDetails = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyDetails
|
||||
VolumeSnapshotProperties = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeSnapshotProperties
|
||||
SnapshotPolicyPatch = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyPatch
|
||||
Volume = Azure::NetApp::Mgmt::V2020_07_01::Models::Volume
|
||||
SnapshotPolicyVolumeList = Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyVolumeList
|
||||
ReplicationStatus = Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationStatus
|
||||
VolumeRevert = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeRevert
|
||||
OperationDisplay = Azure::NetApp::Mgmt::V2020_07_01::Models::OperationDisplay
|
||||
AuthorizeRequest = Azure::NetApp::Mgmt::V2020_07_01::Models::AuthorizeRequest
|
||||
Operation = Azure::NetApp::Mgmt::V2020_07_01::Models::Operation
|
||||
BreakReplicationRequest = Azure::NetApp::Mgmt::V2020_07_01::Models::BreakReplicationRequest
|
||||
QuotaAvailabilityRequest = Azure::NetApp::Mgmt::V2020_07_01::Models::QuotaAvailabilityRequest
|
||||
PoolChangeRequest = Azure::NetApp::Mgmt::V2020_07_01::Models::PoolChangeRequest
|
||||
NetAppAccountPatch = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountPatch
|
||||
Backup = Azure::NetApp::Mgmt::V2020_07_01::Models::Backup
|
||||
ExportPolicyRule = Azure::NetApp::Mgmt::V2020_07_01::Models::ExportPolicyRule
|
||||
BackupsList = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupsList
|
||||
ReplicationObject = Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationObject
|
||||
BackupPatch = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPatch
|
||||
VolumeList = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeList
|
||||
VolumeBackups = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeBackups
|
||||
MetricSpecification = Azure::NetApp::Mgmt::V2020_07_01::Models::MetricSpecification
|
||||
BackupPolicy = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy
|
||||
NetAppAccount = Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount
|
||||
BackupPoliciesList = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPoliciesList
|
||||
MountTargetProperties = Azure::NetApp::Mgmt::V2020_07_01::Models::MountTargetProperties
|
||||
BackupPolicyDetails = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicyDetails
|
||||
VolumePatchPropertiesExportPolicy = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatchPropertiesExportPolicy
|
||||
BackupPolicyPatch = Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicyPatch
|
||||
CapacityPoolList = Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolList
|
||||
Vault = Azure::NetApp::Mgmt::V2020_07_01::Models::Vault
|
||||
CheckAvailabilityResponse = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckAvailabilityResponse
|
||||
VaultList = Azure::NetApp::Mgmt::V2020_07_01::Models::VaultList
|
||||
VolumePropertiesDataProtection = Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePropertiesDataProtection
|
||||
InAvailabilityReasonType = Azure::NetApp::Mgmt::V2020_07_01::Models::InAvailabilityReasonType
|
||||
CheckNameResourceTypes = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckNameResourceTypes
|
||||
CheckQuotaNameResourceTypes = Azure::NetApp::Mgmt::V2020_07_01::Models::CheckQuotaNameResourceTypes
|
||||
ActiveDirectoryStatus = Azure::NetApp::Mgmt::V2020_07_01::Models::ActiveDirectoryStatus
|
||||
ServiceLevel = Azure::NetApp::Mgmt::V2020_07_01::Models::ServiceLevel
|
||||
QosType = Azure::NetApp::Mgmt::V2020_07_01::Models::QosType
|
||||
EndpointType = Azure::NetApp::Mgmt::V2020_07_01::Models::EndpointType
|
||||
ReplicationSchedule = Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationSchedule
|
||||
SecurityStyle = Azure::NetApp::Mgmt::V2020_07_01::Models::SecurityStyle
|
||||
RelationshipStatus = Azure::NetApp::Mgmt::V2020_07_01::Models::RelationshipStatus
|
||||
MirrorState = Azure::NetApp::Mgmt::V2020_07_01::Models::MirrorState
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -106,7 +106,7 @@ module Azure::NetApp::Profiles::Latest
|
|||
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
||||
@options = options[:options].nil? ? nil:options[:options]
|
||||
|
||||
@client_0 = Azure::NetApp::Mgmt::V2020_06_01::AzureNetAppFilesManagementClient.new(configurable.credentials, base_url, options)
|
||||
@client_0 = Azure::NetApp::Mgmt::V2020_07_01::AzureNetAppFilesManagementClient.new(configurable.credentials, base_url, options)
|
||||
if(@client_0.respond_to?(:subscription_id))
|
||||
@client_0.subscription_id = configurable.subscription_id
|
||||
end
|
||||
|
@ -143,202 +143,202 @@ module Azure::NetApp::Profiles::Latest
|
|||
|
||||
class ModelClasses
|
||||
def volume_patch_properties_data_protection
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatchPropertiesDataProtection
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatchPropertiesDataProtection
|
||||
end
|
||||
def volume_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatch
|
||||
end
|
||||
def dimension
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Dimension
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Dimension
|
||||
end
|
||||
def mount_target
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::MountTarget
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::MountTarget
|
||||
end
|
||||
def service_specification
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ServiceSpecification
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ServiceSpecification
|
||||
end
|
||||
def snapshot
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Snapshot
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Snapshot
|
||||
end
|
||||
def operation_list_result
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::OperationListResult
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::OperationListResult
|
||||
end
|
||||
def snapshots_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotsList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotsList
|
||||
end
|
||||
def resource_name_availability_request
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ResourceNameAvailabilityRequest
|
||||
end
|
||||
def snapshot_policy
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicy
|
||||
end
|
||||
def active_directory
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ActiveDirectory
|
||||
end
|
||||
def snapshot_policies_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPoliciesList
|
||||
end
|
||||
def net_app_account_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccountList
|
||||
end
|
||||
def snapshot_policy_details
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyDetails
|
||||
end
|
||||
def capacity_pool
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPool
|
||||
end
|
||||
def snapshot_policy_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyPatch
|
||||
end
|
||||
def capacity_pool_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPoolPatch
|
||||
end
|
||||
def snapshot_policy_volume_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SnapshotPolicyVolumeList
|
||||
end
|
||||
def volume_properties_export_policy
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePropertiesExportPolicy
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ResourceNameAvailabilityRequest
|
||||
end
|
||||
def hourly_schedule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::HourlySchedule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::HourlySchedule
|
||||
end
|
||||
def volume_backup_properties
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeBackupProperties
|
||||
def active_directory
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ActiveDirectory
|
||||
end
|
||||
def daily_schedule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::DailySchedule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::DailySchedule
|
||||
end
|
||||
def volume_snapshot_properties
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeSnapshotProperties
|
||||
def net_app_account_list
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountList
|
||||
end
|
||||
def weekly_schedule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::WeeklySchedule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::WeeklySchedule
|
||||
end
|
||||
def volume
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Volume
|
||||
def capacity_pool
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPool
|
||||
end
|
||||
def monthly_schedule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::MonthlySchedule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::MonthlySchedule
|
||||
end
|
||||
def capacity_pool_patch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolPatch
|
||||
end
|
||||
def snapshot_policy
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicy
|
||||
end
|
||||
def volume_properties_export_policy
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePropertiesExportPolicy
|
||||
end
|
||||
def snapshot_policies_list
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPoliciesList
|
||||
end
|
||||
def volume_backup_properties
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeBackupProperties
|
||||
end
|
||||
def snapshot_policy_details
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyDetails
|
||||
end
|
||||
def volume_snapshot_properties
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeSnapshotProperties
|
||||
end
|
||||
def snapshot_policy_patch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyPatch
|
||||
end
|
||||
def volume
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Volume
|
||||
end
|
||||
def snapshot_policy_volume_list
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SnapshotPolicyVolumeList
|
||||
end
|
||||
def replication_status
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationStatus
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationStatus
|
||||
end
|
||||
def volume_revert
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeRevert
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeRevert
|
||||
end
|
||||
def operation_display
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::OperationDisplay
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::OperationDisplay
|
||||
end
|
||||
def authorize_request
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::AuthorizeRequest
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::AuthorizeRequest
|
||||
end
|
||||
def operation
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Operation
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Operation
|
||||
end
|
||||
def break_replication_request
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BreakReplicationRequest
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BreakReplicationRequest
|
||||
end
|
||||
def quota_availability_request
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::QuotaAvailabilityRequest
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::QuotaAvailabilityRequest
|
||||
end
|
||||
def pool_change_request
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::PoolChangeRequest
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::PoolChangeRequest
|
||||
end
|
||||
def net_app_account_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccountPatch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccountPatch
|
||||
end
|
||||
def backup
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Backup
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Backup
|
||||
end
|
||||
def export_policy_rule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ExportPolicyRule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ExportPolicyRule
|
||||
end
|
||||
def backups_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupsList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupsList
|
||||
end
|
||||
def replication_object
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationObject
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationObject
|
||||
end
|
||||
def backup_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPatch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPatch
|
||||
end
|
||||
def volume_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeList
|
||||
end
|
||||
def volume_backups
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeBackups
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumeBackups
|
||||
end
|
||||
def metric_specification
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::MetricSpecification
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::MetricSpecification
|
||||
end
|
||||
def backup_policy
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicy
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicy
|
||||
end
|
||||
def net_app_account
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::NetAppAccount
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::NetAppAccount
|
||||
end
|
||||
def backup_policies_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPoliciesList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPoliciesList
|
||||
end
|
||||
def mount_target_properties
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::MountTargetProperties
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::MountTargetProperties
|
||||
end
|
||||
def backup_policy_details
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicyDetails
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicyDetails
|
||||
end
|
||||
def volume_patch_properties_export_policy
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatchPropertiesExportPolicy
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePatchPropertiesExportPolicy
|
||||
end
|
||||
def backup_policy_patch
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::BackupPolicyPatch
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::BackupPolicyPatch
|
||||
end
|
||||
def capacity_pool_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CapacityPoolList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CapacityPoolList
|
||||
end
|
||||
def vault
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::Vault
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::Vault
|
||||
end
|
||||
def check_availability_response
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CheckAvailabilityResponse
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CheckAvailabilityResponse
|
||||
end
|
||||
def vault_list
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VaultList
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VaultList
|
||||
end
|
||||
def volume_properties_data_protection
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePropertiesDataProtection
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::VolumePropertiesDataProtection
|
||||
end
|
||||
def in_availability_reason_type
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::InAvailabilityReasonType
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::InAvailabilityReasonType
|
||||
end
|
||||
def check_name_resource_types
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CheckNameResourceTypes
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CheckNameResourceTypes
|
||||
end
|
||||
def check_quota_name_resource_types
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::CheckQuotaNameResourceTypes
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::CheckQuotaNameResourceTypes
|
||||
end
|
||||
def active_directory_status
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ActiveDirectoryStatus
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ActiveDirectoryStatus
|
||||
end
|
||||
def service_level
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ServiceLevel
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ServiceLevel
|
||||
end
|
||||
def qos_type
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::QosType
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::QosType
|
||||
end
|
||||
def endpoint_type
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::EndpointType
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::EndpointType
|
||||
end
|
||||
def replication_schedule
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationSchedule
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::ReplicationSchedule
|
||||
end
|
||||
def security_style
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::SecurityStyle
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::SecurityStyle
|
||||
end
|
||||
def relationship_status
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::RelationshipStatus
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::RelationshipStatus
|
||||
end
|
||||
def mirror_state
|
||||
Azure::NetApp::Mgmt::V2020_06_01::Models::MirrorState
|
||||
Azure::NetApp::Mgmt::V2020_07_01::Models::MirrorState
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
module Azure::NetApp::Mgmt
|
||||
VERSION = '0.20.2'
|
||||
VERSION = '0.21.0'
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче