Regen SDK for migrate
This commit is contained in:
Родитель
ca95d2dec1
Коммит
c2cda6462b
|
@ -56,6 +56,7 @@ require 'latest/modules/managedapplications_profile_module'
|
|||
require 'latest/modules/mariadb_profile_module'
|
||||
require 'latest/modules/marketplaceordering_profile_module'
|
||||
require 'latest/modules/mediaservices_profile_module'
|
||||
require 'latest/modules/migrate_profile_module'
|
||||
require 'latest/modules/mixedreality_profile_module'
|
||||
require 'latest/modules/monitor_profile_module'
|
||||
require 'latest/modules/managedserviceidentity_profile_module'
|
||||
|
@ -125,7 +126,7 @@ module Azure::Profiles::Latest
|
|||
class Client
|
||||
include MsRestAzure::Common::Configurable
|
||||
|
||||
attr_reader :adhybrid_health_service, :advisor, :alerts_management, :analysis_services, :api_management, :app_configuration, :authorization, :automation, :azure_stack, :batch, :batch_ai, :billing, :bot_service, :cdn, :cognitive_services, :commerce, :compute, :consumption, :container_instance, :container_registry, :container_service, :cosmosdb, :cost_management, :customer_insights, :data_box, :data_lake_analytics, :data_lake_store, :data_migration, :data_factory, :dev_spaces, :dev_test_labs, :dns, :edge_gateway, :event_grid, :event_hub, :features, :hanaonazure, :hdinsight, :graph_rbac, :iot_central, :iot_hub, :key_vault, :kusto, :labservices, :links, :locks, :logic, :machine_learning, :machine_learning_services, :managed_applications, :maria_db, :marketplace_ordering, :media_services, :mixed_reality, :monitor, :managed_service_identity, :net_app, :network, :notification_hubs, :operational_insights, :policy, :policy_insights, :postgresql, :power_bi_embedded, :private_dns, :recovery_services, :recovery_services_backup, :recovery_services_site_recovery, :redis, :relay, :reservations, :resource_graph, :resources, :resources_management, :scheduler, :search, :security, :serialconsole, :service_bus, :service_fabric, :signalr, :sql, :sqlvirtualmachine, :stor_simple8000_series, :storage, :storage_sync, :stream_analytics, :subscriptions, :traffic_manager, :web, :anomaly_detector, :autosuggest, :customimagesearch, :computer_vision, :content_moderator, :custom_search, :customvisiontraining, :customvisionprediction, :entity_search, :face, :form_recognizer, :image_search, :local_search, :luis_runtime, :luis_authoring, :news_search, :personalizer, :qnamaker, :spell_check, :text_analytics, :video_search, :web_search, :visual_search
|
||||
attr_reader :adhybrid_health_service, :advisor, :alerts_management, :analysis_services, :api_management, :app_configuration, :authorization, :automation, :azure_stack, :batch, :batch_ai, :billing, :bot_service, :cdn, :cognitive_services, :commerce, :compute, :consumption, :container_instance, :container_registry, :container_service, :cosmosdb, :cost_management, :customer_insights, :data_box, :data_lake_analytics, :data_lake_store, :data_migration, :data_factory, :dev_spaces, :dev_test_labs, :dns, :edge_gateway, :event_grid, :event_hub, :features, :hanaonazure, :hdinsight, :graph_rbac, :iot_central, :iot_hub, :key_vault, :kusto, :labservices, :links, :locks, :logic, :machine_learning, :machine_learning_services, :managed_applications, :maria_db, :marketplace_ordering, :media_services, :migrate, :mixed_reality, :monitor, :managed_service_identity, :net_app, :network, :notification_hubs, :operational_insights, :policy, :policy_insights, :postgresql, :power_bi_embedded, :private_dns, :recovery_services, :recovery_services_backup, :recovery_services_site_recovery, :redis, :relay, :reservations, :resource_graph, :resources, :resources_management, :scheduler, :search, :security, :serialconsole, :service_bus, :service_fabric, :signalr, :sql, :sqlvirtualmachine, :stor_simple8000_series, :storage, :storage_sync, :stream_analytics, :subscriptions, :traffic_manager, :web, :anomaly_detector, :autosuggest, :customimagesearch, :computer_vision, :content_moderator, :custom_search, :customvisiontraining, :customvisionprediction, :entity_search, :face, :form_recognizer, :image_search, :local_search, :luis_runtime, :luis_authoring, :news_search, :personalizer, :qnamaker, :spell_check, :text_analytics, :video_search, :web_search, :visual_search
|
||||
|
||||
#
|
||||
# Initializes a new instance of the Client class.
|
||||
|
@ -210,6 +211,7 @@ module Azure::Profiles::Latest
|
|||
@maria_db = MariaDBAdapter.new(self, base_url, sdk_options)
|
||||
@marketplace_ordering = MarketplaceOrderingAdapter.new(self, base_url, sdk_options)
|
||||
@media_services = MediaServicesAdapter.new(self, base_url, sdk_options)
|
||||
@migrate = MigrateAdapter.new(self, base_url, sdk_options)
|
||||
@mixed_reality = MixedRealityAdapter.new(self, base_url, sdk_options)
|
||||
@monitor = MonitorAdapter.new(self, base_url, sdk_options)
|
||||
@managed_service_identity = ManagedServiceIdentityAdapter.new(self, base_url, sdk_options)
|
||||
|
@ -698,6 +700,14 @@ module Azure::Profiles::Latest
|
|||
end
|
||||
end
|
||||
|
||||
class MigrateAdapter
|
||||
attr_accessor :mgmt
|
||||
|
||||
def initialize(context, base_url, options)
|
||||
@mgmt = Azure::Profiles::Latest::Migrate::Mgmt::MigrateManagementClass.new(context, base_url, options)
|
||||
end
|
||||
end
|
||||
|
||||
class MixedRealityAdapter
|
||||
attr_accessor :mgmt
|
||||
|
||||
|
|
|
@ -0,0 +1,243 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require 'azure_mgmt_migrate'
|
||||
|
||||
module Azure::Profiles::Latest
|
||||
module Migrate
|
||||
module Mgmt
|
||||
Location = Azure::Migrate::Mgmt::V2018_02_02::Location
|
||||
AssessmentOptions = Azure::Migrate::Mgmt::V2018_02_02::AssessmentOptions
|
||||
Projects = Azure::Migrate::Mgmt::V2018_02_02::Projects
|
||||
Machines = Azure::Migrate::Mgmt::V2018_02_02::Machines
|
||||
Groups = Azure::Migrate::Mgmt::V2018_02_02::Groups
|
||||
Assessments = Azure::Migrate::Mgmt::V2018_02_02::Assessments
|
||||
AssessedMachines = Azure::Migrate::Mgmt::V2018_02_02::AssessedMachines
|
||||
Operations = Azure::Migrate::Mgmt::V2018_02_02::Operations
|
||||
|
||||
module Models
|
||||
DownloadUrl = Azure::Migrate::Mgmt::V2018_02_02::Models::DownloadUrl
|
||||
Project = Azure::Migrate::Mgmt::V2018_02_02::Models::Project
|
||||
VmFamily = Azure::Migrate::Mgmt::V2018_02_02::Models::VmFamily
|
||||
Assessment = Azure::Migrate::Mgmt::V2018_02_02::Models::Assessment
|
||||
ProjectResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList
|
||||
NetworkAdapter = Azure::Migrate::Mgmt::V2018_02_02::Models::NetworkAdapter
|
||||
MachineResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::MachineResultList
|
||||
AssessedDisk = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedDisk
|
||||
GroupResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::GroupResultList
|
||||
AssessedMachine = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachine
|
||||
AssessedMachineResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachineResultList
|
||||
OperationDisplay = Azure::Migrate::Mgmt::V2018_02_02::Models::OperationDisplay
|
||||
AssessmentResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList
|
||||
Group = Azure::Migrate::Mgmt::V2018_02_02::Models::Group
|
||||
OperationResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::OperationResultList
|
||||
Machine = Azure::Migrate::Mgmt::V2018_02_02::Models::Machine
|
||||
AssessmentOptionsResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentOptionsResultList
|
||||
ProjectKey = Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectKey
|
||||
Disk = Azure::Migrate::Mgmt::V2018_02_02::Models::Disk
|
||||
Operation = Azure::Migrate::Mgmt::V2018_02_02::Models::Operation
|
||||
CheckNameAvailabilityParameters = Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityParameters
|
||||
AssessedNetworkAdapter = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedNetworkAdapter
|
||||
CheckNameAvailabilityResult = Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityResult
|
||||
DiscoveryStatus = Azure::Migrate::Mgmt::V2018_02_02::Models::DiscoveryStatus
|
||||
ProvisioningState = Azure::Migrate::Mgmt::V2018_02_02::Models::ProvisioningState
|
||||
AzureLocation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureLocation
|
||||
AzureOfferCode = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureOfferCode
|
||||
AzurePricingTier = Azure::Migrate::Mgmt::V2018_02_02::Models::AzurePricingTier
|
||||
AzureStorageRedundancy = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureStorageRedundancy
|
||||
Percentile = Azure::Migrate::Mgmt::V2018_02_02::Models::Percentile
|
||||
TimeRange = Azure::Migrate::Mgmt::V2018_02_02::Models::TimeRange
|
||||
AssessmentStage = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStage
|
||||
Currency = Azure::Migrate::Mgmt::V2018_02_02::Models::Currency
|
||||
AzureHybridUseBenefit = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureHybridUseBenefit
|
||||
AssessmentSizingCriterion = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentSizingCriterion
|
||||
AssessmentStatus = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStatus
|
||||
MachineBootType = Azure::Migrate::Mgmt::V2018_02_02::Models::MachineBootType
|
||||
AzureDiskType = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskType
|
||||
AzureDiskSize = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSize
|
||||
CloudSuitability = Azure::Migrate::Mgmt::V2018_02_02::Models::CloudSuitability
|
||||
AzureDiskSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSuitabilityExplanation
|
||||
AzureNetworkAdapterSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureNetworkAdapterSuitabilityExplanation
|
||||
AzureVmSize = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSize
|
||||
AzureVmSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSuitabilityExplanation
|
||||
NameAvailabilityReason = Azure::Migrate::Mgmt::V2018_02_02::Models::NameAvailabilityReason
|
||||
end
|
||||
|
||||
class MigrateManagementClass
|
||||
attr_reader :location, :assessment_options, :projects, :machines, :groups, :assessments, :assessed_machines, :operations, :configurable, :base_url, :options, :model_classes
|
||||
|
||||
def initialize(configurable, base_url=nil, options=nil)
|
||||
@configurable, @base_url, @options = configurable, base_url, options
|
||||
|
||||
@client_0 = Azure::Migrate::Mgmt::V2018_02_02::AzureMigrate.new(configurable.credentials, base_url, options)
|
||||
if(@client_0.respond_to?(:subscription_id))
|
||||
@client_0.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_0)
|
||||
@location = @client_0.location
|
||||
@assessment_options = @client_0.assessment_options
|
||||
@projects = @client_0.projects
|
||||
@machines = @client_0.machines
|
||||
@groups = @client_0.groups
|
||||
@assessments = @client_0.assessments
|
||||
@assessed_machines = @client_0.assessed_machines
|
||||
@operations = @client_0.operations
|
||||
|
||||
@model_classes = ModelClasses.new
|
||||
end
|
||||
|
||||
def add_telemetry(client)
|
||||
profile_information = "Profiles/azure_sdk/#{Azure::VERSION}/Latest/Migrate/Mgmt"
|
||||
client.add_user_agent_information(profile_information)
|
||||
end
|
||||
|
||||
def method_missing(method, *args)
|
||||
if @client_0.respond_to?method
|
||||
@client_0.send(method, *args)
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
class ModelClasses
|
||||
def download_url
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::DownloadUrl
|
||||
end
|
||||
def project
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Project
|
||||
end
|
||||
def vm_family
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::VmFamily
|
||||
end
|
||||
def assessment
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Assessment
|
||||
end
|
||||
def project_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList
|
||||
end
|
||||
def network_adapter
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::NetworkAdapter
|
||||
end
|
||||
def machine_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::MachineResultList
|
||||
end
|
||||
def assessed_disk
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedDisk
|
||||
end
|
||||
def group_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::GroupResultList
|
||||
end
|
||||
def assessed_machine
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachine
|
||||
end
|
||||
def assessed_machine_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachineResultList
|
||||
end
|
||||
def operation_display
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::OperationDisplay
|
||||
end
|
||||
def assessment_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList
|
||||
end
|
||||
def group
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Group
|
||||
end
|
||||
def operation_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::OperationResultList
|
||||
end
|
||||
def machine
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Machine
|
||||
end
|
||||
def assessment_options_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentOptionsResultList
|
||||
end
|
||||
def project_key
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectKey
|
||||
end
|
||||
def disk
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Disk
|
||||
end
|
||||
def operation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Operation
|
||||
end
|
||||
def check_name_availability_parameters
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityParameters
|
||||
end
|
||||
def assessed_network_adapter
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedNetworkAdapter
|
||||
end
|
||||
def check_name_availability_result
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityResult
|
||||
end
|
||||
def discovery_status
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::DiscoveryStatus
|
||||
end
|
||||
def provisioning_state
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProvisioningState
|
||||
end
|
||||
def azure_location
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureLocation
|
||||
end
|
||||
def azure_offer_code
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureOfferCode
|
||||
end
|
||||
def azure_pricing_tier
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzurePricingTier
|
||||
end
|
||||
def azure_storage_redundancy
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureStorageRedundancy
|
||||
end
|
||||
def percentile
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Percentile
|
||||
end
|
||||
def time_range
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::TimeRange
|
||||
end
|
||||
def assessment_stage
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStage
|
||||
end
|
||||
def currency
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Currency
|
||||
end
|
||||
def azure_hybrid_use_benefit
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureHybridUseBenefit
|
||||
end
|
||||
def assessment_sizing_criterion
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentSizingCriterion
|
||||
end
|
||||
def assessment_status
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStatus
|
||||
end
|
||||
def machine_boot_type
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::MachineBootType
|
||||
end
|
||||
def azure_disk_type
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskType
|
||||
end
|
||||
def azure_disk_size
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSize
|
||||
end
|
||||
def cloud_suitability
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CloudSuitability
|
||||
end
|
||||
def azure_disk_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSuitabilityExplanation
|
||||
end
|
||||
def azure_network_adapter_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureNetworkAdapterSuitabilityExplanation
|
||||
end
|
||||
def azure_vm_size
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSize
|
||||
end
|
||||
def azure_vm_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSuitabilityExplanation
|
||||
end
|
||||
def name_availability_reason
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::NameAvailabilityReason
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
--require spec_helper
|
||||
--color
|
||||
--format documentation
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,5 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require "bundler/gem_tasks"
|
|
@ -0,0 +1,40 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
|
||||
require '../azure_mgmt_migrate/lib/module_definition'
|
||||
require '../azure_mgmt_migrate/lib/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = 'azure_mgmt_migrate'
|
||||
spec.version = Azure::Migrate::Mgmt::VERSION
|
||||
spec.authors = 'Microsoft Corporation'
|
||||
spec.email = 'azrubyteam@microsoft.com'
|
||||
spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
|
||||
spec.summary = 'Official Ruby client library to consume Migrate'
|
||||
spec.license = 'MIT'
|
||||
spec.metadata = {
|
||||
'bug_tracker_uri' => 'https://github.com/Azure/azure-sdk-for-ruby/issues',
|
||||
'changelog_uri' => 'https://github.com/Azure/azure-sdk-for-ruby/blob/master/ChangeLog.md',
|
||||
'documentation_uri' => 'https://azure.microsoft.com/en-us/develop/ruby/',
|
||||
'homepage_uri' => 'https://aka.ms/azure-sdk-for-ruby'
|
||||
}
|
||||
|
||||
spec.files = Dir["LICENSE.txt", "lib/**/*"]
|
||||
spec.files.reject! { |fn| fn.include? "build.json" }
|
||||
spec.bindir = 'bin'
|
||||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
||||
spec.require_paths = ['lib']
|
||||
|
||||
spec.required_ruby_version = '>= 2.0.0'
|
||||
|
||||
spec.add_development_dependency 'bundler', '~> 1.9'
|
||||
spec.add_development_dependency 'rake', '~> 10'
|
||||
spec.add_development_dependency 'rspec', '~> 3'
|
||||
spec.add_development_dependency 'dotenv', '~> 2'
|
||||
|
||||
spec.add_runtime_dependency 'ms_rest_azure', '~> 0.11.1'
|
||||
end
|
|
@ -0,0 +1,80 @@
|
|||
# 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 '2018-02-02/generated/azure_mgmt_migrate/module_definition'
|
||||
require 'ms_rest_azure'
|
||||
|
||||
module Azure::Migrate::Mgmt::V2018_02_02
|
||||
autoload :Location, '2018-02-02/generated/azure_mgmt_migrate/location.rb'
|
||||
autoload :AssessmentOptions, '2018-02-02/generated/azure_mgmt_migrate/assessment_options.rb'
|
||||
autoload :Projects, '2018-02-02/generated/azure_mgmt_migrate/projects.rb'
|
||||
autoload :Machines, '2018-02-02/generated/azure_mgmt_migrate/machines.rb'
|
||||
autoload :Groups, '2018-02-02/generated/azure_mgmt_migrate/groups.rb'
|
||||
autoload :Assessments, '2018-02-02/generated/azure_mgmt_migrate/assessments.rb'
|
||||
autoload :AssessedMachines, '2018-02-02/generated/azure_mgmt_migrate/assessed_machines.rb'
|
||||
autoload :Operations, '2018-02-02/generated/azure_mgmt_migrate/operations.rb'
|
||||
autoload :AzureMigrate, '2018-02-02/generated/azure_mgmt_migrate/azure_migrate.rb'
|
||||
|
||||
module Models
|
||||
autoload :DownloadUrl, '2018-02-02/generated/azure_mgmt_migrate/models/download_url.rb'
|
||||
autoload :Project, '2018-02-02/generated/azure_mgmt_migrate/models/project.rb'
|
||||
autoload :VmFamily, '2018-02-02/generated/azure_mgmt_migrate/models/vm_family.rb'
|
||||
autoload :Assessment, '2018-02-02/generated/azure_mgmt_migrate/models/assessment.rb'
|
||||
autoload :ProjectResultList, '2018-02-02/generated/azure_mgmt_migrate/models/project_result_list.rb'
|
||||
autoload :NetworkAdapter, '2018-02-02/generated/azure_mgmt_migrate/models/network_adapter.rb'
|
||||
autoload :MachineResultList, '2018-02-02/generated/azure_mgmt_migrate/models/machine_result_list.rb'
|
||||
autoload :AssessedDisk, '2018-02-02/generated/azure_mgmt_migrate/models/assessed_disk.rb'
|
||||
autoload :GroupResultList, '2018-02-02/generated/azure_mgmt_migrate/models/group_result_list.rb'
|
||||
autoload :AssessedMachine, '2018-02-02/generated/azure_mgmt_migrate/models/assessed_machine.rb'
|
||||
autoload :AssessedMachineResultList, '2018-02-02/generated/azure_mgmt_migrate/models/assessed_machine_result_list.rb'
|
||||
autoload :OperationDisplay, '2018-02-02/generated/azure_mgmt_migrate/models/operation_display.rb'
|
||||
autoload :AssessmentResultList, '2018-02-02/generated/azure_mgmt_migrate/models/assessment_result_list.rb'
|
||||
autoload :Group, '2018-02-02/generated/azure_mgmt_migrate/models/group.rb'
|
||||
autoload :OperationResultList, '2018-02-02/generated/azure_mgmt_migrate/models/operation_result_list.rb'
|
||||
autoload :Machine, '2018-02-02/generated/azure_mgmt_migrate/models/machine.rb'
|
||||
autoload :AssessmentOptionsResultList, '2018-02-02/generated/azure_mgmt_migrate/models/assessment_options_result_list.rb'
|
||||
autoload :ProjectKey, '2018-02-02/generated/azure_mgmt_migrate/models/project_key.rb'
|
||||
autoload :Disk, '2018-02-02/generated/azure_mgmt_migrate/models/disk.rb'
|
||||
autoload :Operation, '2018-02-02/generated/azure_mgmt_migrate/models/operation.rb'
|
||||
autoload :CheckNameAvailabilityParameters, '2018-02-02/generated/azure_mgmt_migrate/models/check_name_availability_parameters.rb'
|
||||
autoload :AssessedNetworkAdapter, '2018-02-02/generated/azure_mgmt_migrate/models/assessed_network_adapter.rb'
|
||||
autoload :CheckNameAvailabilityResult, '2018-02-02/generated/azure_mgmt_migrate/models/check_name_availability_result.rb'
|
||||
autoload :DiscoveryStatus, '2018-02-02/generated/azure_mgmt_migrate/models/discovery_status.rb'
|
||||
autoload :ProvisioningState, '2018-02-02/generated/azure_mgmt_migrate/models/provisioning_state.rb'
|
||||
autoload :AzureLocation, '2018-02-02/generated/azure_mgmt_migrate/models/azure_location.rb'
|
||||
autoload :AzureOfferCode, '2018-02-02/generated/azure_mgmt_migrate/models/azure_offer_code.rb'
|
||||
autoload :AzurePricingTier, '2018-02-02/generated/azure_mgmt_migrate/models/azure_pricing_tier.rb'
|
||||
autoload :AzureStorageRedundancy, '2018-02-02/generated/azure_mgmt_migrate/models/azure_storage_redundancy.rb'
|
||||
autoload :Percentile, '2018-02-02/generated/azure_mgmt_migrate/models/percentile.rb'
|
||||
autoload :TimeRange, '2018-02-02/generated/azure_mgmt_migrate/models/time_range.rb'
|
||||
autoload :AssessmentStage, '2018-02-02/generated/azure_mgmt_migrate/models/assessment_stage.rb'
|
||||
autoload :Currency, '2018-02-02/generated/azure_mgmt_migrate/models/currency.rb'
|
||||
autoload :AzureHybridUseBenefit, '2018-02-02/generated/azure_mgmt_migrate/models/azure_hybrid_use_benefit.rb'
|
||||
autoload :AssessmentSizingCriterion, '2018-02-02/generated/azure_mgmt_migrate/models/assessment_sizing_criterion.rb'
|
||||
autoload :AssessmentStatus, '2018-02-02/generated/azure_mgmt_migrate/models/assessment_status.rb'
|
||||
autoload :MachineBootType, '2018-02-02/generated/azure_mgmt_migrate/models/machine_boot_type.rb'
|
||||
autoload :AzureDiskType, '2018-02-02/generated/azure_mgmt_migrate/models/azure_disk_type.rb'
|
||||
autoload :AzureDiskSize, '2018-02-02/generated/azure_mgmt_migrate/models/azure_disk_size.rb'
|
||||
autoload :CloudSuitability, '2018-02-02/generated/azure_mgmt_migrate/models/cloud_suitability.rb'
|
||||
autoload :AzureDiskSuitabilityExplanation, '2018-02-02/generated/azure_mgmt_migrate/models/azure_disk_suitability_explanation.rb'
|
||||
autoload :AzureNetworkAdapterSuitabilityExplanation, '2018-02-02/generated/azure_mgmt_migrate/models/azure_network_adapter_suitability_explanation.rb'
|
||||
autoload :AzureVmSize, '2018-02-02/generated/azure_mgmt_migrate/models/azure_vm_size.rb'
|
||||
autoload :AzureVmSuitabilityExplanation, '2018-02-02/generated/azure_mgmt_migrate/models/azure_vm_suitability_explanation.rb'
|
||||
autoload :NameAvailabilityReason, '2018-02-02/generated/azure_mgmt_migrate/models/name_availability_reason.rb'
|
||||
end
|
||||
end
|
|
@ -0,0 +1,293 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class AssessedMachines
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the AssessedMachines class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get assessed machines for assessment.
|
||||
#
|
||||
# Get list of machines that assessed as part of the specified assessment.
|
||||
# Returns a json array of objects of type 'assessedMachine' as specified in the
|
||||
# Models section.
|
||||
#
|
||||
# Whenever an assessment is created or updated, it goes under computation.
|
||||
# During this phase, the 'status' field of Assessment object reports
|
||||
# 'Computing'.
|
||||
# During the period when the assessment is under computation, the list of
|
||||
# assessed machines is empty and no assessed machines are returned by this
|
||||
# call.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AssessedMachineResultList] operation results.
|
||||
#
|
||||
def list_by_assessment(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
response = list_by_assessment_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get assessed machines for assessment.
|
||||
#
|
||||
# Get list of machines that assessed as part of the specified assessment.
|
||||
# Returns a json array of objects of type 'assessedMachine' as specified in the
|
||||
# Models section.
|
||||
#
|
||||
# Whenever an assessment is created or updated, it goes under computation.
|
||||
# During this phase, the 'status' field of Assessment object reports
|
||||
# 'Computing'.
|
||||
# During the period when the assessment is under computation, the list of
|
||||
# assessed machines is empty and no assessed machines are returned by this
|
||||
# call.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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_by_assessment_with_http_info(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
list_by_assessment_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get assessed machines for assessment.
|
||||
#
|
||||
# Get list of machines that assessed as part of the specified assessment.
|
||||
# Returns a json array of objects of type 'assessedMachine' as specified in the
|
||||
# Models section.
|
||||
#
|
||||
# Whenever an assessment is created or updated, it goes under computation.
|
||||
# During this phase, the 'status' field of Assessment object reports
|
||||
# 'Computing'.
|
||||
# During the period when the assessment is under computation, the list of
|
||||
# assessed machines is empty and no assessed machines are returned by this
|
||||
# call.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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_by_assessment_async(resource_group_name, project_name, group_name, assessment_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_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::Migrate::Mgmt::V2018_02_02::Models::AssessedMachineResultList.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 an assessed machine.
|
||||
#
|
||||
# Get an assessed machine with its size & cost estimate that was evaluated in
|
||||
# the specified assessment.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessed_machine_name [String] Unique name of an assessed machine
|
||||
# evaluated as part of an assessment.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AssessedMachine] operation results.
|
||||
#
|
||||
def get(resource_group_name, project_name, group_name, assessment_name, assessed_machine_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, project_name, group_name, assessment_name, assessed_machine_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get an assessed machine.
|
||||
#
|
||||
# Get an assessed machine with its size & cost estimate that was evaluated in
|
||||
# the specified assessment.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessed_machine_name [String] Unique name of an assessed machine
|
||||
# evaluated as part of an assessment.
|
||||
# @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, project_name, group_name, assessment_name, assessed_machine_name, custom_headers:nil)
|
||||
get_async(resource_group_name, project_name, group_name, assessment_name, assessed_machine_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get an assessed machine.
|
||||
#
|
||||
# Get an assessed machine with its size & cost estimate that was evaluated in
|
||||
# the specified assessment.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessed_machine_name [String] Unique name of an assessed machine
|
||||
# evaluated as part of an assessment.
|
||||
# @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, project_name, group_name, assessment_name, assessed_machine_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
fail ArgumentError, 'assessed_machine_name is nil' if assessed_machine_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines/{assessedMachineName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_name,'assessedMachineName' => assessed_machine_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::Migrate::Mgmt::V2018_02_02::Models::AssessedMachine.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,121 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class AssessmentOptions
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the AssessmentOptions class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get the assessment options.
|
||||
#
|
||||
# Get the available options for the properties of an assessment.
|
||||
#
|
||||
# @param location_name [String] Azure region in which the project is created.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AssessmentOptionsResultList] operation results.
|
||||
#
|
||||
def get(location_name, custom_headers:nil)
|
||||
response = get_async(location_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get the assessment options.
|
||||
#
|
||||
# Get the available options for the properties of an assessment.
|
||||
#
|
||||
# @param location_name [String] Azure region in which the project is created.
|
||||
# @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(location_name, custom_headers:nil)
|
||||
get_async(location_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get the assessment options.
|
||||
#
|
||||
# Get the available options for the properties of an assessment.
|
||||
#
|
||||
# @param location_name [String] Azure region in which the project is created.
|
||||
# @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(location_name, custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'location_name is nil' if location_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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}/providers/Microsoft.Migrate/locations/{locationName}/assessmentOptions'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id,'locationName' => location_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::Migrate::Mgmt::V2018_02_02::Models::AssessmentOptionsResultList.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,790 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class Assessments
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Assessments class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AssessmentResultList] operation results.
|
||||
#
|
||||
def list_by_group(resource_group_name, project_name, group_name, custom_headers:nil)
|
||||
response = list_by_group_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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_by_group_with_http_info(resource_group_name, project_name, group_name, custom_headers:nil)
|
||||
list_by_group_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Get all assessments created for the specified group.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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_by_group_async(resource_group_name, project_name, 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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => 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::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList.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 all assessments created in the project.
|
||||
#
|
||||
# Get all assessments created in the project.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [AssessmentResultList] operation results.
|
||||
#
|
||||
def list_by_project(resource_group_name, project_name, custom_headers:nil)
|
||||
response = list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all assessments created in the project.
|
||||
#
|
||||
# Get all assessments created in the project.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_with_http_info(resource_group_name, project_name, custom_headers:nil)
|
||||
list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all assessments created in the project.
|
||||
#
|
||||
# Get all assessments created in the project.
|
||||
#
|
||||
# Returns a json array of objects of type 'assessment' as specified in Models
|
||||
# section.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_async(resource_group_name, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/assessments'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList.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 an assessment.
|
||||
#
|
||||
# Get an existing assessment with the specified name. Returns a json object of
|
||||
# type 'assessment' as specified in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Assessment] operation results.
|
||||
#
|
||||
def get(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get an assessment.
|
||||
#
|
||||
# Get an existing assessment with the specified name. Returns a json object of
|
||||
# type 'assessment' as specified in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
get_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get an assessment.
|
||||
#
|
||||
# Get an existing assessment with the specified name. Returns a json object of
|
||||
# type 'assessment' as specified in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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, project_name, group_name, assessment_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_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::Migrate::Mgmt::V2018_02_02::Models::Assessment.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 assessment.
|
||||
#
|
||||
# Create a new assessment with the given name and the specified settings. Since
|
||||
# name of an assessment in a project is a unique identifier, if an assessment
|
||||
# with the name provided already exists, then the existing assessment is
|
||||
# updated.
|
||||
#
|
||||
# Any PUT operation, resulting in either create or update on an assessment,
|
||||
# will cause the assessment to go in a "InProgress" state. This will be
|
||||
# indicated by the field 'computationState' on the Assessment object. During
|
||||
# this time no other PUT operation will be allowed on that assessment object,
|
||||
# nor will a Delete operation. Once the computation for the assessment is
|
||||
# complete, the field 'computationState' will be updated to 'Ready', and then
|
||||
# other PUT or DELETE operations can happen on the assessment.
|
||||
#
|
||||
# When assessment is under computation, any PUT will lead to a 400 - Bad
|
||||
# Request error.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessment [Assessment] New or Updated Assessment object.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Assessment] operation results.
|
||||
#
|
||||
def create(resource_group_name, project_name, group_name, assessment_name, assessment:nil, custom_headers:nil)
|
||||
response = create_async(resource_group_name, project_name, group_name, assessment_name, assessment:assessment, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update assessment.
|
||||
#
|
||||
# Create a new assessment with the given name and the specified settings. Since
|
||||
# name of an assessment in a project is a unique identifier, if an assessment
|
||||
# with the name provided already exists, then the existing assessment is
|
||||
# updated.
|
||||
#
|
||||
# Any PUT operation, resulting in either create or update on an assessment,
|
||||
# will cause the assessment to go in a "InProgress" state. This will be
|
||||
# indicated by the field 'computationState' on the Assessment object. During
|
||||
# this time no other PUT operation will be allowed on that assessment object,
|
||||
# nor will a Delete operation. Once the computation for the assessment is
|
||||
# complete, the field 'computationState' will be updated to 'Ready', and then
|
||||
# other PUT or DELETE operations can happen on the assessment.
|
||||
#
|
||||
# When assessment is under computation, any PUT will lead to a 400 - Bad
|
||||
# Request error.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessment [Assessment] New or Updated Assessment object.
|
||||
# @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(resource_group_name, project_name, group_name, assessment_name, assessment:nil, custom_headers:nil)
|
||||
create_async(resource_group_name, project_name, group_name, assessment_name, assessment:assessment, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create or Update assessment.
|
||||
#
|
||||
# Create a new assessment with the given name and the specified settings. Since
|
||||
# name of an assessment in a project is a unique identifier, if an assessment
|
||||
# with the name provided already exists, then the existing assessment is
|
||||
# updated.
|
||||
#
|
||||
# Any PUT operation, resulting in either create or update on an assessment,
|
||||
# will cause the assessment to go in a "InProgress" state. This will be
|
||||
# indicated by the field 'computationState' on the Assessment object. During
|
||||
# this time no other PUT operation will be allowed on that assessment object,
|
||||
# nor will a Delete operation. Once the computation for the assessment is
|
||||
# complete, the field 'computationState' will be updated to 'Ready', and then
|
||||
# other PUT or DELETE operations can happen on the assessment.
|
||||
#
|
||||
# When assessment is under computation, any PUT will lead to a 400 - Bad
|
||||
# Request error.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param assessment [Assessment] New or Updated Assessment object.
|
||||
# @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(resource_group_name, project_name, group_name, assessment_name, assessment: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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::Assessment.mapper()
|
||||
request_content = @client.serialize(request_mapper, assessment)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_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::Migrate::Mgmt::V2018_02_02::Models::Assessment.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::Migrate::Mgmt::V2018_02_02::Models::Assessment.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
|
||||
|
||||
#
|
||||
# Deletes an assessment from the project.
|
||||
#
|
||||
# Delete an assessment from the project. The machines remain in the assessment.
|
||||
# Deleting a non-existent assessment results in a no-operation.
|
||||
#
|
||||
# When an assessment is under computation, as indicated by the
|
||||
# 'computationState' field, it cannot be deleted. Any such attempt will return
|
||||
# a 400 - Bad Request.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def delete(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Deletes an assessment from the project.
|
||||
#
|
||||
# Delete an assessment from the project. The machines remain in the assessment.
|
||||
# Deleting a non-existent assessment results in a no-operation.
|
||||
#
|
||||
# When an assessment is under computation, as indicated by the
|
||||
# 'computationState' field, it cannot be deleted. Any such attempt will return
|
||||
# a 400 - Bad Request.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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 delete_with_http_info(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
delete_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Deletes an assessment from the project.
|
||||
#
|
||||
# Delete an assessment from the project. The machines remain in the assessment.
|
||||
# Deleting a non-existent assessment results in a no-operation.
|
||||
#
|
||||
# When an assessment is under computation, as indicated by the
|
||||
# 'computationState' field, it cannot be deleted. Any such attempt will return
|
||||
# a 400 - Bad Request.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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 delete_async(resource_group_name, project_name, group_name, assessment_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_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
|
||||
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
|
||||
|
||||
#
|
||||
# Get download URL for the assessment report.
|
||||
#
|
||||
# Get the URL for downloading the assessment in a report format.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [DownloadUrl] operation results.
|
||||
#
|
||||
def get_report_download_url(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
response = get_report_download_url_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get download URL for the assessment report.
|
||||
#
|
||||
# Get the URL for downloading the assessment in a report format.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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_report_download_url_with_http_info(resource_group_name, project_name, group_name, assessment_name, custom_headers:nil)
|
||||
get_report_download_url_async(resource_group_name, project_name, group_name, assessment_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get download URL for the assessment report.
|
||||
#
|
||||
# Get the URL for downloading the assessment in a report format.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param assessment_name [String] Unique name of an assessment within a
|
||||
# project.
|
||||
# @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_report_download_url_async(resource_group_name, project_name, group_name, assessment_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
fail ArgumentError, 'assessment_name is nil' if assessment_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}/downloadUrl'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_name,'assessmentName' => assessment_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::DownloadUrl.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,160 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# A service client - single point of access to the REST API.
|
||||
#
|
||||
class AzureMigrate < 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] Azure Subscription Id in which project was created.
|
||||
attr_accessor :subscription_id
|
||||
|
||||
# @return [String] Standard request header. Used by service to identify API
|
||||
# version used by client.
|
||||
attr_reader :api_version
|
||||
|
||||
# @return [String] Standard request header. Used by service to respond to
|
||||
# client in appropriate language.
|
||||
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 [Location] location
|
||||
attr_reader :location
|
||||
|
||||
# @return [AssessmentOptions] assessment_options
|
||||
attr_reader :assessment_options
|
||||
|
||||
# @return [Projects] projects
|
||||
attr_reader :projects
|
||||
|
||||
# @return [Machines] machines
|
||||
attr_reader :machines
|
||||
|
||||
# @return [Groups] groups
|
||||
attr_reader :groups
|
||||
|
||||
# @return [Assessments] assessments
|
||||
attr_reader :assessments
|
||||
|
||||
# @return [AssessedMachines] assessed_machines
|
||||
attr_reader :assessed_machines
|
||||
|
||||
# @return [Operations] operations
|
||||
attr_reader :operations
|
||||
|
||||
#
|
||||
# Creates initializes a new instance of the AzureMigrate 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
|
||||
|
||||
@location = Location.new(self)
|
||||
@assessment_options = AssessmentOptions.new(self)
|
||||
@projects = Projects.new(self)
|
||||
@machines = Machines.new(self)
|
||||
@groups = Groups.new(self)
|
||||
@assessments = Assessments.new(self)
|
||||
@assessed_machines = AssessedMachines.new(self)
|
||||
@operations = Operations.new(self)
|
||||
@api_version = '2018-02-02'
|
||||
@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_migrate'
|
||||
sdk_information = "#{sdk_information}/0.17.0"
|
||||
add_user_agent_information(sdk_information)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,506 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class Groups
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Groups class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get all groups
|
||||
#
|
||||
# Get all groups created in the project. Returns a json array of objects of
|
||||
# type 'group' as specified in the Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [GroupResultList] operation results.
|
||||
#
|
||||
def list_by_project(resource_group_name, project_name, custom_headers:nil)
|
||||
response = list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all groups
|
||||
#
|
||||
# Get all groups created in the project. Returns a json array of objects of
|
||||
# type 'group' as specified in the Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_with_http_info(resource_group_name, project_name, custom_headers:nil)
|
||||
list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all groups
|
||||
#
|
||||
# Get all groups created in the project. Returns a json array of objects of
|
||||
# type 'group' as specified in the Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_async(resource_group_name, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::GroupResultList.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 specific group.
|
||||
#
|
||||
# Get information related to a specific group in the project. Returns a json
|
||||
# object of type 'group' as specified in the models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Group] operation results.
|
||||
#
|
||||
def get(resource_group_name, project_name, group_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a specific group.
|
||||
#
|
||||
# Get information related to a specific group in the project. Returns a json
|
||||
# object of type 'group' as specified in the models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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, project_name, group_name, custom_headers:nil)
|
||||
get_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a specific group.
|
||||
#
|
||||
# Get information related to a specific group in the project. Returns a json
|
||||
# object of type 'group' as specified in the models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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, project_name, 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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => 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::Migrate::Mgmt::V2018_02_02::Models::Group.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 new group with specified settings. If group with the name provided
|
||||
# already exists, then the existing group is updated.
|
||||
#
|
||||
# Create a new group by sending a json object of type 'group' as given in
|
||||
# Models section as part of the Request Body. The group name in a project is
|
||||
# unique. Labels can be applied on a group as part of creation.
|
||||
#
|
||||
# If a group with the groupName specified in the URL already exists, then this
|
||||
# call acts as an update.
|
||||
#
|
||||
# This operation is Idempotent.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param group [Group] New or Updated Group object.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Group] operation results.
|
||||
#
|
||||
def create(resource_group_name, project_name, group_name, group:nil, custom_headers:nil)
|
||||
response = create_async(resource_group_name, project_name, group_name, group:group, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create a new group with specified settings. If group with the name provided
|
||||
# already exists, then the existing group is updated.
|
||||
#
|
||||
# Create a new group by sending a json object of type 'group' as given in
|
||||
# Models section as part of the Request Body. The group name in a project is
|
||||
# unique. Labels can be applied on a group as part of creation.
|
||||
#
|
||||
# If a group with the groupName specified in the URL already exists, then this
|
||||
# call acts as an update.
|
||||
#
|
||||
# This operation is Idempotent.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param group [Group] New or Updated Group object.
|
||||
# @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(resource_group_name, project_name, group_name, group:nil, custom_headers:nil)
|
||||
create_async(resource_group_name, project_name, group_name, group:group, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create a new group with specified settings. If group with the name provided
|
||||
# already exists, then the existing group is updated.
|
||||
#
|
||||
# Create a new group by sending a json object of type 'group' as given in
|
||||
# Models section as part of the Request Body. The group name in a project is
|
||||
# unique. Labels can be applied on a group as part of creation.
|
||||
#
|
||||
# If a group with the groupName specified in the URL already exists, then this
|
||||
# call acts as an update.
|
||||
#
|
||||
# This operation is Idempotent.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param group [Group] New or Updated Group object.
|
||||
# @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(resource_group_name, project_name, group_name, group: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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::Group.mapper()
|
||||
request_content = @client.serialize(request_mapper, group)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_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::Migrate::Mgmt::V2018_02_02::Models::Group.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::Migrate::Mgmt::V2018_02_02::Models::Group.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 the group
|
||||
#
|
||||
# Delete the group from the project. The machines remain in the project.
|
||||
# Deleting a non-existent group results in a no-operation.
|
||||
#
|
||||
# A group is an aggregation mechanism for machines in a project. Therefore,
|
||||
# deleting group does not delete machines in it.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def delete(resource_group_name, project_name, group_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete the group
|
||||
#
|
||||
# Delete the group from the project. The machines remain in the project.
|
||||
# Deleting a non-existent group results in a no-operation.
|
||||
#
|
||||
# A group is an aggregation mechanism for machines in a project. Therefore,
|
||||
# deleting group does not delete machines in it.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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 delete_with_http_info(resource_group_name, project_name, group_name, custom_headers:nil)
|
||||
delete_async(resource_group_name, project_name, group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete the group
|
||||
#
|
||||
# Delete the group from the project. The machines remain in the project.
|
||||
# Deleting a non-existent group results in a no-operation.
|
||||
#
|
||||
# A group is an aggregation mechanism for machines in a project. Therefore,
|
||||
# deleting group does not delete machines in it.
|
||||
#
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param group_name [String] Unique name of a group within a project.
|
||||
# @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 delete_async(resource_group_name, project_name, 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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'group_name is nil' if group_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/groups/{groupName}'
|
||||
|
||||
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,'projectName' => project_name,'groupName' => group_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
|
||||
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,129 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class Location
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Location class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Checks whether the project name is available in the specified region.
|
||||
#
|
||||
# @param location_name [String] The desired region for the name check.
|
||||
# @param parameters [CheckNameAvailabilityParameters] Properties needed to
|
||||
# check the availability of a name.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [CheckNameAvailabilityResult] operation results.
|
||||
#
|
||||
def check_name_availability(location_name, parameters, custom_headers:nil)
|
||||
response = check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Checks whether the project name is available in the specified region.
|
||||
#
|
||||
# @param location_name [String] The desired region for the name check.
|
||||
# @param parameters [CheckNameAvailabilityParameters] Properties needed to
|
||||
# check the availability of a 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, parameters, custom_headers:nil)
|
||||
check_name_availability_async(location_name, parameters, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Checks whether the project name is available in the specified region.
|
||||
#
|
||||
# @param location_name [String] The desired region for the name check.
|
||||
# @param parameters [CheckNameAvailabilityParameters] Properties needed to
|
||||
# check the availability of a 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, parameters, custom_headers:nil)
|
||||
fail ArgumentError, 'location_name is nil' if location_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
fail ArgumentError, 'parameters is nil' if parameters.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::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityParameters.mapper()
|
||||
request_content = @client.serialize(request_mapper, parameters)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Migrate/locations/{locationName}/checkNameAvailability'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityResult.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,241 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class Machines
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Machines class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get all machines in the project
|
||||
#
|
||||
# Get data of all the machines available in the project. Returns a json array
|
||||
# of objects of type 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [MachineResultList] operation results.
|
||||
#
|
||||
def list_by_project(resource_group_name, project_name, custom_headers:nil)
|
||||
response = list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all machines in the project
|
||||
#
|
||||
# Get data of all the machines available in the project. Returns a json array
|
||||
# of objects of type 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_with_http_info(resource_group_name, project_name, custom_headers:nil)
|
||||
list_by_project_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all machines in the project
|
||||
#
|
||||
# Get data of all the machines available in the project. Returns a json array
|
||||
# of objects of type 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_by_project_async(resource_group_name, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/machines'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::MachineResultList.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 specific machine.
|
||||
#
|
||||
# Get the machine with the specified name. Returns a json object of type
|
||||
# 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param machine_name [String] Unique name of a machine in private datacenter.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Machine] operation results.
|
||||
#
|
||||
def get(resource_group_name, project_name, machine_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, project_name, machine_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get a specific machine.
|
||||
#
|
||||
# Get the machine with the specified name. Returns a json object of type
|
||||
# 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param machine_name [String] Unique name of a machine in private datacenter.
|
||||
# @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, project_name, machine_name, custom_headers:nil)
|
||||
get_async(resource_group_name, project_name, machine_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get a specific machine.
|
||||
#
|
||||
# Get the machine with the specified name. Returns a json object of type
|
||||
# 'machine' defined in Models section.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param machine_name [String] Unique name of a machine in private datacenter.
|
||||
# @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, project_name, machine_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, 'project_name is nil' if project_name.nil?
|
||||
fail ArgumentError, 'machine_name is nil' if machine_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/machines/{machineName}'
|
||||
|
||||
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,'projectName' => project_name,'machineName' => machine_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::Migrate::Mgmt::V2018_02_02::Models::Machine.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,312 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A disk assessed for an assessment.
|
||||
#
|
||||
class AssessedDisk
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Name of the assessed disk.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [Float] Gigabytes of storage provisioned for this disk.
|
||||
attr_accessor :gigabytes_provisioned
|
||||
|
||||
# @return [Float] Gigabytes of storage consumed by this disk.
|
||||
attr_accessor :gigabytes_consumed
|
||||
|
||||
# @return [Float] Disk throughput in MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_of_read
|
||||
|
||||
# @return [Integer] Expected data points for MegaBytes per second of
|
||||
# read.
|
||||
attr_accessor :megabytes_per_second_of_read_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for MegaBytes per second of
|
||||
# read.
|
||||
attr_accessor :megabytes_per_second_of_read_data_points_received
|
||||
|
||||
# @return [Float] Disk throughput in MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_of_write
|
||||
|
||||
# @return [Integer] Expected data points for MegaBytes per second of
|
||||
# write.
|
||||
attr_accessor :megabytes_per_second_of_write_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for MegaBytes per second of
|
||||
# write.
|
||||
attr_accessor :megabytes_per_second_of_write_data_points_received
|
||||
|
||||
# @return [Float] Number of read operations per second for the disk.
|
||||
attr_accessor :number_of_read_operations_per_second
|
||||
|
||||
# @return [Integer] Expected number of data points for read operations
|
||||
# per second.
|
||||
attr_accessor :number_of_read_operations_per_second_data_points_expected
|
||||
|
||||
# @return [Integer] Received number of data points for read operations
|
||||
# per second.
|
||||
attr_accessor :number_of_read_operations_per_second_data_points_received
|
||||
|
||||
# @return [Float] Number of read and write operations per second for the
|
||||
# disk.
|
||||
attr_accessor :number_of_write_operations_per_second
|
||||
|
||||
# @return [Integer] Expected number of data points for write operations
|
||||
# per second.
|
||||
attr_accessor :number_of_write_operations_per_second_data_points_expected
|
||||
|
||||
# @return [Integer] Received number of data points for write operations
|
||||
# per second.
|
||||
attr_accessor :number_of_write_operations_per_second_data_points_received
|
||||
|
||||
# @return [Float] Estimated aggregate storage cost for a 31-day month for
|
||||
# this disk.
|
||||
attr_accessor :monthly_storage_cost
|
||||
|
||||
# @return [AzureDiskType] Storage type selected for this disk. Possible
|
||||
# values include: 'Unknown', 'Standard', 'Premium'
|
||||
attr_accessor :recommended_disk_type
|
||||
|
||||
# @return [AzureDiskSize] Recommended Azure size for the disk, given
|
||||
# utilization data and preferences set on Assessment. Possible values
|
||||
# include: 'Unknown', 'Standard_S4', 'Standard_S6', 'Standard_S10',
|
||||
# 'Standard_S20', 'Standard_S30', 'Standard_S40', 'Standard_S50',
|
||||
# 'Premium_P4', 'Premium_P6', 'Premium_P10', 'Premium_P20',
|
||||
# 'Premium_P30', 'Premium_P40', 'Premium_P50'
|
||||
attr_accessor :recommended_disk_size
|
||||
|
||||
# @return [Integer] Gigabytes of storage provided by the recommended
|
||||
# Azure disk size.
|
||||
attr_accessor :gigabytes_for_recommended_disk_size
|
||||
|
||||
# @return [CloudSuitability] Whether this disk is suitable for Azure.
|
||||
# Possible values include: 'Unknown', 'NotSuitable', 'Suitable',
|
||||
# 'ConditionallySuitable', 'ReadinessUnknown'
|
||||
attr_accessor :suitability
|
||||
|
||||
# @return [AzureDiskSuitabilityExplanation] If disk is suitable, this
|
||||
# explains the reasons and mitigation steps. Possible values include:
|
||||
# 'Unknown', 'NotApplicable', 'DiskSizeGreaterThanSupported',
|
||||
# 'NoSuitableDiskSizeForIops', 'NoSuitableDiskSizeForThroughput',
|
||||
# 'NoDiskSizeFoundInSelectedLocation',
|
||||
# 'NoDiskSizeFoundForSelectedRedundancy',
|
||||
# 'InternalErrorOccurredForDiskEvaluation'
|
||||
attr_accessor :suitability_explanation
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessedDisk class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedDisk',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedDisk',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
gigabytes_provisioned: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'gigabytesProvisioned',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
gigabytes_consumed: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'gigabytesConsumed',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_read: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfRead',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_read_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfReadDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_read_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfReadDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_write: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfWrite',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_write_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfWriteDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_write_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfWriteDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_read_operations_per_second: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfReadOperationsPerSecond',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
number_of_read_operations_per_second_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfReadOperationsPerSecondDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_read_operations_per_second_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfReadOperationsPerSecondDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_write_operations_per_second: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfWriteOperationsPerSecond',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
number_of_write_operations_per_second_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfWriteOperationsPerSecondDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_write_operations_per_second_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'numberOfWriteOperationsPerSecondDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
monthly_storage_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'monthlyStorageCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
recommended_disk_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'recommendedDiskType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
recommended_disk_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'recommendedDiskSize',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
gigabytes_for_recommended_disk_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'gigabytesForRecommendedDiskSize',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
suitability: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'suitability',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
suitability_explanation: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'suitabilityExplanation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,547 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A machine evaluated as part of an assessment.
|
||||
#
|
||||
class AssessedMachine
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Path reference to this assessed machine.
|
||||
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}/assessments/{assessmentName}/assessedMachines/{assessedMachineName}
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Name of the machine.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] For optimistic concurrency control.
|
||||
attr_accessor :e_tag
|
||||
|
||||
# @return [String] Type of the object =
|
||||
# [Microsoft.Migrate/projects/groups/assessments/assessedMachines].
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Array<String>] List of references to the groups that the
|
||||
# machine is member of.
|
||||
attr_accessor :groups
|
||||
|
||||
# @return [DateTime] Time when this machine was discovered by Azure
|
||||
# Migrate agent. Date-Time represented in ISO-8601 format.
|
||||
attr_accessor :discovered_timestamp
|
||||
|
||||
# @return [MachineBootType] Boot type of the machine. Possible values
|
||||
# include: 'Unknown', 'EFI', 'BIOS'
|
||||
attr_accessor :boot_type
|
||||
|
||||
# @return [String] Container defined in the management solution that this
|
||||
# machine is part of in the datacenter.
|
||||
attr_accessor :datacenter_container
|
||||
|
||||
# @return [String] Name of the server hosting the datacenter management
|
||||
# solution.
|
||||
attr_accessor :datacenter_management_server
|
||||
|
||||
# @return [String] ID of the machine as tracked by the datacenter
|
||||
# management solution.
|
||||
attr_accessor :datacenter_machine_id
|
||||
|
||||
# @return [String] ID of the server hosting the datacenter management
|
||||
# solution.
|
||||
attr_accessor :datacenter_management_server_id
|
||||
|
||||
# @return [String] Description of the machine
|
||||
attr_accessor :description
|
||||
|
||||
# @return [String] User readable name of the machine as defined by the
|
||||
# user in their private datacenter.
|
||||
attr_accessor :display_name
|
||||
|
||||
# @return [Float] Memory in Megabytes.
|
||||
attr_accessor :megabytes_of_memory
|
||||
|
||||
# @return [Integer] Processor count.
|
||||
attr_accessor :number_of_cores
|
||||
|
||||
# @return [String] Operating System of the machine.
|
||||
attr_accessor :operating_system
|
||||
|
||||
# @return [Float] Monthly network cost estimate for the network adapters
|
||||
# that are attached to this machine as a group, for a 31-day month.
|
||||
attr_accessor :monthly_bandwidth_cost
|
||||
|
||||
# @return [Float] Monthly storage cost estimate for the disks that are
|
||||
# attached to this machine as a group, for a 31-day month.
|
||||
attr_accessor :monthly_storage_cost
|
||||
|
||||
# @return [Hash{String => AssessedDisk}] Dictionary of disks attached to
|
||||
# the machine. Key is ID of disk. Value is a disk object.
|
||||
attr_accessor :disks
|
||||
|
||||
# @return [Hash{String => AssessedNetworkAdapter}] Dictionary of network
|
||||
# adapters attached to the machine. Key is name of the adapter. Value is
|
||||
# a network adapter object.
|
||||
attr_accessor :network_adapters
|
||||
|
||||
# @return [AzureVmSize] Recommended Azure size for this machine. Possible
|
||||
# values include: 'Unknown', 'Basic_A0', 'Basic_A1', 'Basic_A2',
|
||||
# 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2',
|
||||
# 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6',
|
||||
# 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10',
|
||||
# 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2',
|
||||
# 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2',
|
||||
# 'Standard_A8m_v2', 'Standard_D1', 'Standard_D2', 'Standard_D3',
|
||||
# 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13',
|
||||
# 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2',
|
||||
# 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
|
||||
# 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2',
|
||||
# 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3',
|
||||
# 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13',
|
||||
# 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2',
|
||||
# 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2',
|
||||
# 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2',
|
||||
# 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_F1', 'Standard_F2',
|
||||
# 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s',
|
||||
# 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s',
|
||||
# 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4',
|
||||
# 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3',
|
||||
# 'Standard_GS4', 'Standard_GS5', 'Standard_H8', 'Standard_H16',
|
||||
# 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr',
|
||||
# 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s'
|
||||
attr_accessor :recommended_size
|
||||
|
||||
# @return [Integer] Number of CPU cores in the Recommended Azure VM Size.
|
||||
attr_accessor :number_of_cores_for_recommended_size
|
||||
|
||||
# @return [Float] Megabytes of memory in the Recommended Azure VM Size.
|
||||
attr_accessor :megabytes_of_memory_for_recommended_size
|
||||
|
||||
# @return [Float] Compute Cost for a 31-day month, if the machine is
|
||||
# migrated to Azure with the Recommended Size.
|
||||
attr_accessor :monthly_compute_cost_for_recommended_size
|
||||
|
||||
# @return [Float] Utilization percentage of the processor core as
|
||||
# observed in the private data center, in the Time Range selected on
|
||||
# Assessment, reported as the Percentile value based on the percentile
|
||||
# number selected in assessment.
|
||||
attr_accessor :percentage_cores_utilization
|
||||
|
||||
# @return [Float] Utilization percentage of the memory as observed in the
|
||||
# private data center, in the Time Range selected on Assessment, reported
|
||||
# as the Percentile value based on the percentile number selected in
|
||||
# assessment.
|
||||
attr_accessor :percentage_memory_utilization
|
||||
|
||||
# @return [Integer] Expected data points for percentage of cores
|
||||
# utilization.
|
||||
attr_accessor :percentage_cores_utilization_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for percentage of cores
|
||||
# utilization.
|
||||
attr_accessor :percentage_cores_utilization_data_points_received
|
||||
|
||||
# @return [Integer] Expected data points for percentage of memory
|
||||
# utilization.
|
||||
attr_accessor :percentage_memory_utilization_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for percentage of memory
|
||||
# utilization.
|
||||
attr_accessor :percentage_memory_utilization_data_points_received
|
||||
|
||||
# @return [CloudSuitability] Whether machine is suitable for migration to
|
||||
# Azure. Possible values include: 'Unknown', 'NotSuitable', 'Suitable',
|
||||
# 'ConditionallySuitable', 'ReadinessUnknown'
|
||||
attr_accessor :suitability
|
||||
|
||||
# @return [AzureVmSuitabilityExplanation] If machine is not ready to be
|
||||
# migrated, this explains the reasons and mitigation steps. Possible
|
||||
# values include: 'Unknown', 'NotApplicable',
|
||||
# 'GuestOperatingSystemArchitectureNotSupported',
|
||||
# 'GuestOperatingSystemNotSupported', 'BootTypeNotSupported',
|
||||
# 'MoreDisksThanSupported', 'NoSuitableVmSizeFound',
|
||||
# 'OneOrMoreDisksNotSuitable', 'OneOrMoreAdaptersNotSuitable',
|
||||
# 'InternalErrorOccuredDuringComputeEvaluation',
|
||||
# 'InternalErrorOccuredDuringStorageEvaluation',
|
||||
# 'InternalErrorOccuredDuringNetworkEvaluation',
|
||||
# 'NoVmSizeSupportsStoragePerformance',
|
||||
# 'NoVmSizeSupportsNetworkPerformance', 'NoVmSizeForSelectedPricingTier',
|
||||
# 'NoVmSizeForSelectedAzureLocation', 'CheckRedHatLinuxVersion',
|
||||
# 'CheckOpenSuseLinuxVersion', 'CheckWindowsServer2008R2Version',
|
||||
# 'CheckCentOsVersion', 'CheckDebianLinuxVersion',
|
||||
# 'CheckSuseLinuxVersion', 'CheckOracleLinuxVersion',
|
||||
# 'CheckUbuntuLinuxVersion', 'CheckCoreOsLinuxVersion',
|
||||
# 'WindowsServerVersionConditionallySupported',
|
||||
# 'NoGuestOperatingSystemConditionallySupported',
|
||||
# 'WindowsClientVersionsConditionallySupported', 'BootTypeUnknown',
|
||||
# 'GuestOperatingSystemUnknown',
|
||||
# 'WindowsServerVersionsSupportedWithCaveat',
|
||||
# 'WindowsOSNoLongerUnderMSSupport',
|
||||
# 'EndorsedWithConditionsLinuxDistributions',
|
||||
# 'UnendorsedLinuxDistributions', 'NoVmSizeForStandardPricingTier',
|
||||
# 'NoVmSizeForBasicPricingTier'
|
||||
attr_accessor :suitability_explanation
|
||||
|
||||
# @return [DateTime] Time when this machine was created. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :created_timestamp
|
||||
|
||||
# @return [DateTime] Time when this machine was last updated. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :updated_timestamp
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessedMachine class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedMachine',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedMachine',
|
||||
model_properties: {
|
||||
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'
|
||||
}
|
||||
},
|
||||
e_tag: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
groups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.groups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
discovered_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.discoveredTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
boot_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.bootType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_container: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterContainer',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_management_server: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterManagementServer',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_machine_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterMachineId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_management_server_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterManagementServerId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.displayName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
megabytes_of_memory: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.megabytesOfMemory',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
number_of_cores: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfCores',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
operating_system: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.operatingSystem',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
monthly_bandwidth_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyBandwidthCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
monthly_storage_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyStorageCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
disks: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.disks',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedDiskElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedDisk'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
network_adapters: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.networkAdapters',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedNetworkAdapterElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedNetworkAdapter'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
recommended_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.recommendedSize',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
number_of_cores_for_recommended_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfCoresForRecommendedSize',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_of_memory_for_recommended_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.megabytesOfMemoryForRecommendedSize',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
monthly_compute_cost_for_recommended_size: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyComputeCostForRecommendedSize',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
percentage_cores_utilization: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageCoresUtilization',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
percentage_memory_utilization: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageMemoryUtilization',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
percentage_cores_utilization_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageCoresUtilizationDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
percentage_cores_utilization_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageCoresUtilizationDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
percentage_memory_utilization_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageMemoryUtilizationDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
percentage_memory_utilization_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.percentageMemoryUtilizationDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
suitability: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.suitability',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
suitability_explanation: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.suitabilityExplanation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
created_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.createdTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
updated_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.updatedTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of assessed machines.
|
||||
#
|
||||
class AssessedMachineResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<AssessedMachine>] List of assessed machines.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessedMachineResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedMachineResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedMachineResultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedMachineElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedMachine'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,197 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A network adapter assessed for an assessment.
|
||||
#
|
||||
class AssessedNetworkAdapter
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] MAC Address of the network adapter.
|
||||
attr_accessor :mac_address
|
||||
|
||||
# @return [Array<String>] List of IP Addresses on the network adapter.
|
||||
attr_accessor :ip_addresses
|
||||
|
||||
# @return [Float] Monthly cost estimate for network bandwidth used by
|
||||
# this network adapter.
|
||||
attr_accessor :monthly_bandwidth_costs
|
||||
|
||||
# @return [Float] Adapter throughput for incoming traffic in MegaBytes
|
||||
# per second.
|
||||
attr_accessor :megabytes_per_second_received
|
||||
|
||||
# @return [Integer] Expected data points for incoming traffic in
|
||||
# MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_received_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for incoming traffic in
|
||||
# MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_of_read_data_points_received
|
||||
|
||||
# @return [Float] Adapter throughput for outgoing traffic in MegaBytes
|
||||
# per second.
|
||||
attr_accessor :megabytes_per_second_transmitted
|
||||
|
||||
# @return [Integer] Expected data points for outgoing traffic in
|
||||
# MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_transmitted_data_points_expected
|
||||
|
||||
# @return [Integer] Received data points for outgoing traffic in
|
||||
# MegaBytes per second.
|
||||
attr_accessor :megabytes_per_second_transmitted_data_points_received
|
||||
|
||||
# @return [Float] Gigabytes transmitted through this adapter each month.
|
||||
attr_accessor :net_gigabytes_transmitted_per_month
|
||||
|
||||
# @return [CloudSuitability] Whether this adapter is suitable for Azure.
|
||||
# Possible values include: 'Unknown', 'NotSuitable', 'Suitable',
|
||||
# 'ConditionallySuitable', 'ReadinessUnknown'
|
||||
attr_accessor :suitability
|
||||
|
||||
# @return [AzureNetworkAdapterSuitabilityExplanation] If network adapter
|
||||
# is suitable, this explains the reasons and mitigation steps. Possible
|
||||
# values include: 'Unknown', 'NotApplicable', 'InternalErrorOccured'
|
||||
attr_accessor :suitability_explanation
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessedNetworkAdapter class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessedNetworkAdapter',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessedNetworkAdapter',
|
||||
model_properties: {
|
||||
mac_address: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'macAddress',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
ip_addresses: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'ipAddresses',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
monthly_bandwidth_costs: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'monthlyBandwidthCosts',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondReceived',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_received_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondReceivedDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_of_read_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondOfReadDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_transmitted: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondTransmitted',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_transmitted_data_points_expected: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondTransmittedDataPointsExpected',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
megabytes_per_second_transmitted_data_points_received: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'megabytesPerSecondTransmittedDataPointsReceived',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
net_gigabytes_transmitted_per_month: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'netGigabytesTransmittedPerMonth',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
suitability: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'suitability',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
suitability_explanation: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'suitabilityExplanation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,367 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# An assessment created for a group in the Migration project.
|
||||
#
|
||||
class Assessment
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Path reference to this assessment.
|
||||
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}/assessment/{assessmentName}
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Unique name of an assessment.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] For optimistic concurrency control.
|
||||
attr_accessor :e_tag
|
||||
|
||||
# @return [String] Type of the object =
|
||||
# [Microsoft.Migrate/projects/groups/assessments].
|
||||
attr_accessor :type
|
||||
|
||||
# @return [AzureLocation] Target Azure location for which the machines
|
||||
# should be assessed. These enums are the same as used by Compute API.
|
||||
# Possible values include: 'Unknown', 'EastAsia', 'SoutheastAsia',
|
||||
# 'AustraliaEast', 'AustraliaSoutheast', 'BrazilSouth', 'CanadaCentral',
|
||||
# 'CanadaEast', 'WestEurope', 'NorthEurope', 'CentralIndia',
|
||||
# 'SouthIndia', 'WestIndia', 'JapanEast', 'JapanWest', 'KoreaCentral',
|
||||
# 'KoreaSouth', 'UkWest', 'UkSouth', 'NorthCentralUs', 'EastUs',
|
||||
# 'WestUs2', 'SouthCentralUs', 'CentralUs', 'EastUs2', 'WestUs',
|
||||
# 'WestCentralUs', 'GermanyCentral', 'GermanyNortheast', 'ChinaNorth',
|
||||
# 'ChinaEast'
|
||||
attr_accessor :azure_location
|
||||
|
||||
# @return [AzureOfferCode] Offer code according to which cost estimation
|
||||
# is done. Possible values include: 'Unknown', 'MSAZR0003P',
|
||||
# 'MSAZR0044P', 'MSAZR0059P', 'MSAZR0060P', 'MSAZR0062P', 'MSAZR0063P',
|
||||
# 'MSAZR0064P', 'MSAZR0029P', 'MSAZR0022P', 'MSAZR0023P', 'MSAZR0148P',
|
||||
# 'MSAZR0025P', 'MSAZR0036P', 'MSAZR0120P', 'MSAZR0121P', 'MSAZR0122P',
|
||||
# 'MSAZR0123P', 'MSAZR0124P', 'MSAZR0125P', 'MSAZR0126P', 'MSAZR0127P',
|
||||
# 'MSAZR0128P', 'MSAZR0129P', 'MSAZR0130P', 'MSAZR0111P', 'MSAZR0144P',
|
||||
# 'MSAZR0149P', 'MSMCAZR0044P', 'MSMCAZR0059P', 'MSMCAZR0060P',
|
||||
# 'MSMCAZR0063P', 'MSMCAZR0120P', 'MSMCAZR0121P', 'MSMCAZR0125P',
|
||||
# 'MSMCAZR0128P', 'MSAZRDE0003P', 'MSAZRDE0044P'
|
||||
attr_accessor :azure_offer_code
|
||||
|
||||
# @return [AzurePricingTier] Pricing tier for Size evaluation. Possible
|
||||
# values include: 'Standard', 'Basic'
|
||||
attr_accessor :azure_pricing_tier
|
||||
|
||||
# @return [AzureStorageRedundancy] Storage Redundancy type offered by
|
||||
# Azure. Possible values include: 'Unknown', 'LocallyRedundant',
|
||||
# 'ZoneRedundant', 'GeoRedundant', 'ReadAccessGeoRedundant'
|
||||
attr_accessor :azure_storage_redundancy
|
||||
|
||||
# @return [Float] Scaling factor used over utilization data to add a
|
||||
# performance buffer for new machines to be created in Azure. Min Value =
|
||||
# 1.0, Max value = 1.9, Default = 1.3.
|
||||
attr_accessor :scaling_factor
|
||||
|
||||
# @return [Percentile] Percentile of performance data used to recommend
|
||||
# Azure size. Possible values include: 'Percentile50', 'Percentile90',
|
||||
# 'Percentile95', 'Percentile99'
|
||||
attr_accessor :percentile
|
||||
|
||||
# @return [TimeRange] Time range of performance data used to recommend a
|
||||
# size. Possible values include: 'Day', 'Week', 'Month'
|
||||
attr_accessor :time_range
|
||||
|
||||
# @return [AssessmentStage] User configurable setting that describes the
|
||||
# status of the assessment. Possible values include: 'InProgress',
|
||||
# 'UnderReview', 'Approved'
|
||||
attr_accessor :stage
|
||||
|
||||
# @return [Currency] Currency to report prices in. Possible values
|
||||
# include: 'Unknown', 'USD', 'DKK', 'CAD', 'IDR', 'JPY', 'KRW', 'NZD',
|
||||
# 'NOK', 'RUB', 'SAR', 'ZAR', 'SEK', 'TRY', 'GBP', 'MXN', 'MYR', 'INR',
|
||||
# 'HKD', 'BRL', 'TWD', 'EUR', 'CHF', 'ARS', 'AUD', 'CNY'
|
||||
attr_accessor :currency
|
||||
|
||||
# @return [AzureHybridUseBenefit] AHUB discount on windows virtual
|
||||
# machines. Possible values include: 'Unknown', 'Yes', 'No'
|
||||
attr_accessor :azure_hybrid_use_benefit
|
||||
|
||||
# @return [Float] Custom discount percentage to be applied on final
|
||||
# costs. Can be in the range [0, 100].
|
||||
attr_accessor :discount_percentage
|
||||
|
||||
# @return [Float] Confidence rating percentage for assessment. Can be in
|
||||
# the range [0, 100].
|
||||
attr_accessor :confidence_rating_in_percentage
|
||||
|
||||
# @return [AssessmentSizingCriterion] Assessment sizing criterion.
|
||||
# Possible values include: 'PerformanceBased', 'AsOnPremises'
|
||||
attr_accessor :sizing_criterion
|
||||
|
||||
# @return [DateTime] Time when the Azure Prices were queried. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :prices_timestamp
|
||||
|
||||
# @return [DateTime] Time when this project was created. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :created_timestamp
|
||||
|
||||
# @return [DateTime] Time when this project was last updated. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :updated_timestamp
|
||||
|
||||
# @return [Float] Monthly compute cost estimate for the machines that are
|
||||
# part of this assessment as a group, for a 31-day month.
|
||||
attr_accessor :monthly_compute_cost
|
||||
|
||||
# @return [Float] Monthly network cost estimate for the machines that are
|
||||
# part of this assessment as a group, for a 31-day month.
|
||||
attr_accessor :monthly_bandwidth_cost
|
||||
|
||||
# @return [Float] Monthly storage cost estimate for the machines that are
|
||||
# part of this assessment as a group, for a 31-day month.
|
||||
attr_accessor :monthly_storage_cost
|
||||
|
||||
# @return [AssessmentStatus] Whether the assessment has been created and
|
||||
# is valid. Possible values include: 'Created', 'Updated', 'Running',
|
||||
# 'Completed', 'Invalid'
|
||||
attr_accessor :status
|
||||
|
||||
# @return [Integer] Number of assessed machines part of this assessment.
|
||||
attr_accessor :number_of_machines
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Assessment class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Assessment',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Assessment',
|
||||
model_properties: {
|
||||
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'
|
||||
}
|
||||
},
|
||||
e_tag: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
azure_location: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.azureLocation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
azure_offer_code: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.azureOfferCode',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
azure_pricing_tier: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.azurePricingTier',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
azure_storage_redundancy: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.azureStorageRedundancy',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
scaling_factor: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.scalingFactor',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
percentile: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.percentile',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
time_range: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.timeRange',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
stage: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.stage',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
currency: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.currency',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
azure_hybrid_use_benefit: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.azureHybridUseBenefit',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
discount_percentage: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.discountPercentage',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
confidence_rating_in_percentage: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.confidenceRatingInPercentage',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
sizing_criterion: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.sizingCriterion',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
prices_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.pricesTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
created_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.createdTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
updated_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.updatedTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
monthly_compute_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyComputeCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
monthly_bandwidth_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyBandwidthCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
monthly_storage_cost: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.monthlyStorageCost',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
status: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.status',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
number_of_machines: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfMachines',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of assessment options.
|
||||
#
|
||||
class AssessmentOptionsResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<VmFamily>] Dictionary of VM families grouped by vm
|
||||
# family name describing the targeted azure locations of VM family and
|
||||
# the category of the family.
|
||||
attr_accessor :vm_families
|
||||
|
||||
# @return [Array<String>] List of supported VM Families.
|
||||
attr_accessor :reserved_instance_vm_families
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessmentOptionsResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessmentOptionsResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessmentOptionsResultList',
|
||||
model_properties: {
|
||||
vm_families: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'vmFamilies',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VmFamilyElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VmFamily'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
reserved_instance_vm_families: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'reservedInstanceVmFamilies',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of assessments.
|
||||
#
|
||||
class AssessmentResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Assessment>] List of assessments.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for AssessmentResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessmentResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'AssessmentResultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'AssessmentElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Assessment'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AssessmentSizingCriterion
|
||||
#
|
||||
module AssessmentSizingCriterion
|
||||
PerformanceBased = "PerformanceBased"
|
||||
AsOnPremises = "AsOnPremises"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AssessmentStage
|
||||
#
|
||||
module AssessmentStage
|
||||
InProgress = "InProgress"
|
||||
UnderReview = "UnderReview"
|
||||
Approved = "Approved"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AssessmentStatus
|
||||
#
|
||||
module AssessmentStatus
|
||||
Created = "Created"
|
||||
Updated = "Updated"
|
||||
Running = "Running"
|
||||
Completed = "Completed"
|
||||
Invalid = "Invalid"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,29 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureDiskSize
|
||||
#
|
||||
module AzureDiskSize
|
||||
Unknown = "Unknown"
|
||||
StandardS4 = "Standard_S4"
|
||||
StandardS6 = "Standard_S6"
|
||||
StandardS10 = "Standard_S10"
|
||||
StandardS20 = "Standard_S20"
|
||||
StandardS30 = "Standard_S30"
|
||||
StandardS40 = "Standard_S40"
|
||||
StandardS50 = "Standard_S50"
|
||||
PremiumP4 = "Premium_P4"
|
||||
PremiumP6 = "Premium_P6"
|
||||
PremiumP10 = "Premium_P10"
|
||||
PremiumP20 = "Premium_P20"
|
||||
PremiumP30 = "Premium_P30"
|
||||
PremiumP40 = "Premium_P40"
|
||||
PremiumP50 = "Premium_P50"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureDiskSuitabilityExplanation
|
||||
#
|
||||
module AzureDiskSuitabilityExplanation
|
||||
Unknown = "Unknown"
|
||||
NotApplicable = "NotApplicable"
|
||||
DiskSizeGreaterThanSupported = "DiskSizeGreaterThanSupported"
|
||||
NoSuitableDiskSizeForIops = "NoSuitableDiskSizeForIops"
|
||||
NoSuitableDiskSizeForThroughput = "NoSuitableDiskSizeForThroughput"
|
||||
NoDiskSizeFoundInSelectedLocation = "NoDiskSizeFoundInSelectedLocation"
|
||||
NoDiskSizeFoundForSelectedRedundancy = "NoDiskSizeFoundForSelectedRedundancy"
|
||||
InternalErrorOccurredForDiskEvaluation = "InternalErrorOccurredForDiskEvaluation"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureDiskType
|
||||
#
|
||||
module AzureDiskType
|
||||
Unknown = "Unknown"
|
||||
Standard = "Standard"
|
||||
Premium = "Premium"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureHybridUseBenefit
|
||||
#
|
||||
module AzureHybridUseBenefit
|
||||
Unknown = "Unknown"
|
||||
Yes = "Yes"
|
||||
No = "No"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,45 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureLocation
|
||||
#
|
||||
module AzureLocation
|
||||
Unknown = "Unknown"
|
||||
EastAsia = "EastAsia"
|
||||
SoutheastAsia = "SoutheastAsia"
|
||||
AustraliaEast = "AustraliaEast"
|
||||
AustraliaSoutheast = "AustraliaSoutheast"
|
||||
BrazilSouth = "BrazilSouth"
|
||||
CanadaCentral = "CanadaCentral"
|
||||
CanadaEast = "CanadaEast"
|
||||
WestEurope = "WestEurope"
|
||||
NorthEurope = "NorthEurope"
|
||||
CentralIndia = "CentralIndia"
|
||||
SouthIndia = "SouthIndia"
|
||||
WestIndia = "WestIndia"
|
||||
JapanEast = "JapanEast"
|
||||
JapanWest = "JapanWest"
|
||||
KoreaCentral = "KoreaCentral"
|
||||
KoreaSouth = "KoreaSouth"
|
||||
UkWest = "UkWest"
|
||||
UkSouth = "UkSouth"
|
||||
NorthCentralUs = "NorthCentralUs"
|
||||
EastUs = "EastUs"
|
||||
WestUs2 = "WestUs2"
|
||||
SouthCentralUs = "SouthCentralUs"
|
||||
CentralUs = "CentralUs"
|
||||
EastUs2 = "EastUs2"
|
||||
WestUs = "WestUs"
|
||||
WestCentralUs = "WestCentralUs"
|
||||
GermanyCentral = "GermanyCentral"
|
||||
GermanyNortheast = "GermanyNortheast"
|
||||
ChinaNorth = "ChinaNorth"
|
||||
ChinaEast = "ChinaEast"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureNetworkAdapterSuitabilityExplanation
|
||||
#
|
||||
module AzureNetworkAdapterSuitabilityExplanation
|
||||
Unknown = "Unknown"
|
||||
NotApplicable = "NotApplicable"
|
||||
InternalErrorOccured = "InternalErrorOccured"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,52 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureOfferCode
|
||||
#
|
||||
module AzureOfferCode
|
||||
Unknown = "Unknown"
|
||||
MSAZR0003P = "MSAZR0003P"
|
||||
MSAZR0044P = "MSAZR0044P"
|
||||
MSAZR0059P = "MSAZR0059P"
|
||||
MSAZR0060P = "MSAZR0060P"
|
||||
MSAZR0062P = "MSAZR0062P"
|
||||
MSAZR0063P = "MSAZR0063P"
|
||||
MSAZR0064P = "MSAZR0064P"
|
||||
MSAZR0029P = "MSAZR0029P"
|
||||
MSAZR0022P = "MSAZR0022P"
|
||||
MSAZR0023P = "MSAZR0023P"
|
||||
MSAZR0148P = "MSAZR0148P"
|
||||
MSAZR0025P = "MSAZR0025P"
|
||||
MSAZR0036P = "MSAZR0036P"
|
||||
MSAZR0120P = "MSAZR0120P"
|
||||
MSAZR0121P = "MSAZR0121P"
|
||||
MSAZR0122P = "MSAZR0122P"
|
||||
MSAZR0123P = "MSAZR0123P"
|
||||
MSAZR0124P = "MSAZR0124P"
|
||||
MSAZR0125P = "MSAZR0125P"
|
||||
MSAZR0126P = "MSAZR0126P"
|
||||
MSAZR0127P = "MSAZR0127P"
|
||||
MSAZR0128P = "MSAZR0128P"
|
||||
MSAZR0129P = "MSAZR0129P"
|
||||
MSAZR0130P = "MSAZR0130P"
|
||||
MSAZR0111P = "MSAZR0111P"
|
||||
MSAZR0144P = "MSAZR0144P"
|
||||
MSAZR0149P = "MSAZR0149P"
|
||||
MSMCAZR0044P = "MSMCAZR0044P"
|
||||
MSMCAZR0059P = "MSMCAZR0059P"
|
||||
MSMCAZR0060P = "MSMCAZR0060P"
|
||||
MSMCAZR0063P = "MSMCAZR0063P"
|
||||
MSMCAZR0120P = "MSMCAZR0120P"
|
||||
MSMCAZR0121P = "MSMCAZR0121P"
|
||||
MSMCAZR0125P = "MSMCAZR0125P"
|
||||
MSMCAZR0128P = "MSMCAZR0128P"
|
||||
MSAZRDE0003P = "MSAZRDE0003P"
|
||||
MSAZRDE0044P = "MSAZRDE0044P"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzurePricingTier
|
||||
#
|
||||
module AzurePricingTier
|
||||
Standard = "Standard"
|
||||
Basic = "Basic"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureStorageRedundancy
|
||||
#
|
||||
module AzureStorageRedundancy
|
||||
Unknown = "Unknown"
|
||||
LocallyRedundant = "LocallyRedundant"
|
||||
ZoneRedundant = "ZoneRedundant"
|
||||
GeoRedundant = "GeoRedundant"
|
||||
ReadAccessGeoRedundant = "ReadAccessGeoRedundant"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,105 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureVmSize
|
||||
#
|
||||
module AzureVmSize
|
||||
Unknown = "Unknown"
|
||||
BasicA0 = "Basic_A0"
|
||||
BasicA1 = "Basic_A1"
|
||||
BasicA2 = "Basic_A2"
|
||||
BasicA3 = "Basic_A3"
|
||||
BasicA4 = "Basic_A4"
|
||||
StandardA0 = "Standard_A0"
|
||||
StandardA1 = "Standard_A1"
|
||||
StandardA2 = "Standard_A2"
|
||||
StandardA3 = "Standard_A3"
|
||||
StandardA4 = "Standard_A4"
|
||||
StandardA5 = "Standard_A5"
|
||||
StandardA6 = "Standard_A6"
|
||||
StandardA7 = "Standard_A7"
|
||||
StandardA8 = "Standard_A8"
|
||||
StandardA9 = "Standard_A9"
|
||||
StandardA10 = "Standard_A10"
|
||||
StandardA11 = "Standard_A11"
|
||||
StandardA1V2 = "Standard_A1_v2"
|
||||
StandardA2V2 = "Standard_A2_v2"
|
||||
StandardA4V2 = "Standard_A4_v2"
|
||||
StandardA8V2 = "Standard_A8_v2"
|
||||
StandardA2mV2 = "Standard_A2m_v2"
|
||||
StandardA4mV2 = "Standard_A4m_v2"
|
||||
StandardA8mV2 = "Standard_A8m_v2"
|
||||
StandardD1 = "Standard_D1"
|
||||
StandardD2 = "Standard_D2"
|
||||
StandardD3 = "Standard_D3"
|
||||
StandardD4 = "Standard_D4"
|
||||
StandardD11 = "Standard_D11"
|
||||
StandardD12 = "Standard_D12"
|
||||
StandardD13 = "Standard_D13"
|
||||
StandardD14 = "Standard_D14"
|
||||
StandardD1V2 = "Standard_D1_v2"
|
||||
StandardD2V2 = "Standard_D2_v2"
|
||||
StandardD3V2 = "Standard_D3_v2"
|
||||
StandardD4V2 = "Standard_D4_v2"
|
||||
StandardD5V2 = "Standard_D5_v2"
|
||||
StandardD11V2 = "Standard_D11_v2"
|
||||
StandardD12V2 = "Standard_D12_v2"
|
||||
StandardD13V2 = "Standard_D13_v2"
|
||||
StandardD14V2 = "Standard_D14_v2"
|
||||
StandardD15V2 = "Standard_D15_v2"
|
||||
StandardDS1 = "Standard_DS1"
|
||||
StandardDS2 = "Standard_DS2"
|
||||
StandardDS3 = "Standard_DS3"
|
||||
StandardDS4 = "Standard_DS4"
|
||||
StandardDS11 = "Standard_DS11"
|
||||
StandardDS12 = "Standard_DS12"
|
||||
StandardDS13 = "Standard_DS13"
|
||||
StandardDS14 = "Standard_DS14"
|
||||
StandardDS1V2 = "Standard_DS1_v2"
|
||||
StandardDS2V2 = "Standard_DS2_v2"
|
||||
StandardDS3V2 = "Standard_DS3_v2"
|
||||
StandardDS4V2 = "Standard_DS4_v2"
|
||||
StandardDS5V2 = "Standard_DS5_v2"
|
||||
StandardDS11V2 = "Standard_DS11_v2"
|
||||
StandardDS12V2 = "Standard_DS12_v2"
|
||||
StandardDS13V2 = "Standard_DS13_v2"
|
||||
StandardDS14V2 = "Standard_DS14_v2"
|
||||
StandardDS15V2 = "Standard_DS15_v2"
|
||||
StandardF1 = "Standard_F1"
|
||||
StandardF2 = "Standard_F2"
|
||||
StandardF4 = "Standard_F4"
|
||||
StandardF8 = "Standard_F8"
|
||||
StandardF16 = "Standard_F16"
|
||||
StandardF1s = "Standard_F1s"
|
||||
StandardF2s = "Standard_F2s"
|
||||
StandardF4s = "Standard_F4s"
|
||||
StandardF8s = "Standard_F8s"
|
||||
StandardF16s = "Standard_F16s"
|
||||
StandardG1 = "Standard_G1"
|
||||
StandardG2 = "Standard_G2"
|
||||
StandardG3 = "Standard_G3"
|
||||
StandardG4 = "Standard_G4"
|
||||
StandardG5 = "Standard_G5"
|
||||
StandardGS1 = "Standard_GS1"
|
||||
StandardGS2 = "Standard_GS2"
|
||||
StandardGS3 = "Standard_GS3"
|
||||
StandardGS4 = "Standard_GS4"
|
||||
StandardGS5 = "Standard_GS5"
|
||||
StandardH8 = "Standard_H8"
|
||||
StandardH16 = "Standard_H16"
|
||||
StandardH8m = "Standard_H8m"
|
||||
StandardH16m = "Standard_H16m"
|
||||
StandardH16r = "Standard_H16r"
|
||||
StandardH16mr = "Standard_H16mr"
|
||||
StandardL4s = "Standard_L4s"
|
||||
StandardL8s = "Standard_L8s"
|
||||
StandardL16s = "Standard_L16s"
|
||||
StandardL32s = "Standard_L32s"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for AzureVmSuitabilityExplanation
|
||||
#
|
||||
module AzureVmSuitabilityExplanation
|
||||
Unknown = "Unknown"
|
||||
NotApplicable = "NotApplicable"
|
||||
GuestOperatingSystemArchitectureNotSupported = "GuestOperatingSystemArchitectureNotSupported"
|
||||
GuestOperatingSystemNotSupported = "GuestOperatingSystemNotSupported"
|
||||
BootTypeNotSupported = "BootTypeNotSupported"
|
||||
MoreDisksThanSupported = "MoreDisksThanSupported"
|
||||
NoSuitableVmSizeFound = "NoSuitableVmSizeFound"
|
||||
OneOrMoreDisksNotSuitable = "OneOrMoreDisksNotSuitable"
|
||||
OneOrMoreAdaptersNotSuitable = "OneOrMoreAdaptersNotSuitable"
|
||||
InternalErrorOccuredDuringComputeEvaluation = "InternalErrorOccuredDuringComputeEvaluation"
|
||||
InternalErrorOccuredDuringStorageEvaluation = "InternalErrorOccuredDuringStorageEvaluation"
|
||||
InternalErrorOccuredDuringNetworkEvaluation = "InternalErrorOccuredDuringNetworkEvaluation"
|
||||
NoVmSizeSupportsStoragePerformance = "NoVmSizeSupportsStoragePerformance"
|
||||
NoVmSizeSupportsNetworkPerformance = "NoVmSizeSupportsNetworkPerformance"
|
||||
NoVmSizeForSelectedPricingTier = "NoVmSizeForSelectedPricingTier"
|
||||
NoVmSizeForSelectedAzureLocation = "NoVmSizeForSelectedAzureLocation"
|
||||
CheckRedHatLinuxVersion = "CheckRedHatLinuxVersion"
|
||||
CheckOpenSuseLinuxVersion = "CheckOpenSuseLinuxVersion"
|
||||
CheckWindowsServer2008R2Version = "CheckWindowsServer2008R2Version"
|
||||
CheckCentOsVersion = "CheckCentOsVersion"
|
||||
CheckDebianLinuxVersion = "CheckDebianLinuxVersion"
|
||||
CheckSuseLinuxVersion = "CheckSuseLinuxVersion"
|
||||
CheckOracleLinuxVersion = "CheckOracleLinuxVersion"
|
||||
CheckUbuntuLinuxVersion = "CheckUbuntuLinuxVersion"
|
||||
CheckCoreOsLinuxVersion = "CheckCoreOsLinuxVersion"
|
||||
WindowsServerVersionConditionallySupported = "WindowsServerVersionConditionallySupported"
|
||||
NoGuestOperatingSystemConditionallySupported = "NoGuestOperatingSystemConditionallySupported"
|
||||
WindowsClientVersionsConditionallySupported = "WindowsClientVersionsConditionallySupported"
|
||||
BootTypeUnknown = "BootTypeUnknown"
|
||||
GuestOperatingSystemUnknown = "GuestOperatingSystemUnknown"
|
||||
WindowsServerVersionsSupportedWithCaveat = "WindowsServerVersionsSupportedWithCaveat"
|
||||
WindowsOSNoLongerUnderMSSupport = "WindowsOSNoLongerUnderMSSupport"
|
||||
EndorsedWithConditionsLinuxDistributions = "EndorsedWithConditionsLinuxDistributions"
|
||||
UnendorsedLinuxDistributions = "UnendorsedLinuxDistributions"
|
||||
NoVmSizeForStandardPricingTier = "NoVmSizeForStandardPricingTier"
|
||||
NoVmSizeForBasicPricingTier = "NoVmSizeForBasicPricingTier"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,61 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Parameters for a check name availability request.
|
||||
#
|
||||
class CheckNameAvailabilityParameters
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] The name to check for availability
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] The resource type. Must be set to
|
||||
# Microsoft.Migrate/projects. Default value: 'Microsoft.Migrate/projects'
|
||||
# .
|
||||
attr_accessor :type
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CheckNameAvailabilityParameters class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'CheckNameAvailabilityParameters',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CheckNameAvailabilityParameters',
|
||||
model_properties: {
|
||||
name: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'name',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
is_constant: true,
|
||||
serialized_name: 'type',
|
||||
default_value: 'Microsoft.Migrate/projects',
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# The CheckNameAvailability operation response.
|
||||
#
|
||||
class CheckNameAvailabilityResult
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Boolean] Gets a boolean value that indicates whether the name
|
||||
# is available for you to use. If true, the name is available. If false,
|
||||
# the name has already been taken or invalid and cannot be used.
|
||||
attr_accessor :name_available
|
||||
|
||||
# @return [NameAvailabilityReason] Gets the reason that a project name
|
||||
# could not be used. The Reason element is only returned if NameAvailable
|
||||
# is false. Possible values include: 'Available', 'Invalid',
|
||||
# 'AlreadyExists'
|
||||
attr_accessor :reason
|
||||
|
||||
# @return [String] Gets an error message explaining the Reason value in
|
||||
# more detail.
|
||||
attr_accessor :message
|
||||
|
||||
|
||||
#
|
||||
# Mapper for CheckNameAvailabilityResult class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'CheckNameAvailabilityResult',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'CheckNameAvailabilityResult',
|
||||
model_properties: {
|
||||
name_available: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'nameAvailable',
|
||||
type: {
|
||||
name: 'Boolean'
|
||||
}
|
||||
},
|
||||
reason: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'reason',
|
||||
type: {
|
||||
name: 'Enum',
|
||||
module: 'NameAvailabilityReason'
|
||||
}
|
||||
},
|
||||
message: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'message',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for CloudSuitability
|
||||
#
|
||||
module CloudSuitability
|
||||
Unknown = "Unknown"
|
||||
NotSuitable = "NotSuitable"
|
||||
Suitable = "Suitable"
|
||||
ConditionallySuitable = "ConditionallySuitable"
|
||||
ReadinessUnknown = "ReadinessUnknown"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,40 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for Currency
|
||||
#
|
||||
module Currency
|
||||
Unknown = "Unknown"
|
||||
USD = "USD"
|
||||
DKK = "DKK"
|
||||
CAD = "CAD"
|
||||
IDR = "IDR"
|
||||
JPY = "JPY"
|
||||
KRW = "KRW"
|
||||
NZD = "NZD"
|
||||
NOK = "NOK"
|
||||
RUB = "RUB"
|
||||
SAR = "SAR"
|
||||
ZAR = "ZAR"
|
||||
SEK = "SEK"
|
||||
TRY = "TRY"
|
||||
GBP = "GBP"
|
||||
MXN = "MXN"
|
||||
MYR = "MYR"
|
||||
INR = "INR"
|
||||
HKD = "HKD"
|
||||
BRL = "BRL"
|
||||
TWD = "TWD"
|
||||
EUR = "EUR"
|
||||
CHF = "CHF"
|
||||
ARS = "ARS"
|
||||
AUD = "AUD"
|
||||
CNY = "CNY"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for DiscoveryStatus
|
||||
#
|
||||
module DiscoveryStatus
|
||||
Unknown = "Unknown"
|
||||
NotStarted = "NotStarted"
|
||||
InProgress = "InProgress"
|
||||
Completed = "Completed"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A disk discovered on a machine.
|
||||
#
|
||||
class Disk
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Float] Gigabytes of storage provisioned for this disk.
|
||||
attr_accessor :gigabytes_allocated
|
||||
|
||||
# @return [Float] Gigabytes of storage consumed by this disk.
|
||||
attr_accessor :gigabytes_consumed
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Disk class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Disk',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Disk',
|
||||
model_properties: {
|
||||
gigabytes_allocated: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'gigabytesAllocated',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
gigabytes_consumed: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'gigabytesConsumed',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Download URL for assessment report.
|
||||
#
|
||||
class DownloadUrl
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Hyperlink to download report.
|
||||
attr_accessor :assessment_report_url
|
||||
|
||||
# @return [DateTime] Expiry date of download url.
|
||||
attr_accessor :expiration_time
|
||||
|
||||
|
||||
#
|
||||
# Mapper for DownloadUrl class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'DownloadUrl',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'DownloadUrl',
|
||||
model_properties: {
|
||||
assessment_report_url: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'assessmentReportUrl',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
expiration_time: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'expirationTime',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,151 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A group created in a Migration project.
|
||||
#
|
||||
class Group
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Path reference to this group.
|
||||
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/groups/{groupName}
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Name of the group.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] For optimistic concurrency control.
|
||||
attr_accessor :e_tag
|
||||
|
||||
# @return [String] Type of the object =
|
||||
# [Microsoft.Migrate/projects/groups].
|
||||
attr_accessor :type
|
||||
|
||||
# @return [Array<String>] List of machine names that are part of this
|
||||
# group.
|
||||
attr_accessor :machines
|
||||
|
||||
# @return [Array<String>] List of References to Assessments created on
|
||||
# this group.
|
||||
attr_accessor :assessments
|
||||
|
||||
# @return [DateTime] Time when this project was created. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :created_timestamp
|
||||
|
||||
# @return [DateTime] Time when this project was last updated. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :updated_timestamp
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Group class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Group',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Group',
|
||||
model_properties: {
|
||||
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'
|
||||
}
|
||||
},
|
||||
e_tag: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
machines: {
|
||||
client_side_validation: true,
|
||||
required: true,
|
||||
serialized_name: 'properties.machines',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
assessments: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.assessments',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.createdTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
updated_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.updatedTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of groups.
|
||||
#
|
||||
class GroupResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Group>] List of groups.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for GroupResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'GroupResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'GroupResultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'GroupElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Group'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,317 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A machine in a migration project.
|
||||
#
|
||||
class Machine
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Path reference to this machine.
|
||||
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}/machines/{machineName}
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Name of the machine. It is a GUID which is unique
|
||||
# identifier of machine in private data center. For user-readable name,
|
||||
# we have a displayName property on this machine.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] For optimistic concurrency control.
|
||||
attr_accessor :e_tag
|
||||
|
||||
# @return [String] Type of the object =
|
||||
# [Microsoft.Migrate/projects/machines].
|
||||
attr_accessor :type
|
||||
|
||||
# @return [MachineBootType] Boot type of the machine. Possible values
|
||||
# include: 'Unknown', 'EFI', 'BIOS'
|
||||
attr_accessor :boot_type
|
||||
|
||||
# @return [String] Container defined in the management solution that this
|
||||
# machine is part of in the datacenter.
|
||||
attr_accessor :datacenter_container
|
||||
|
||||
# @return [String] Name of the server hosting the datacenter management
|
||||
# solution.
|
||||
attr_accessor :datacenter_management_server
|
||||
|
||||
# @return [String] ID of the machine as tracked by the datacenter
|
||||
# management solution.
|
||||
attr_accessor :datacenter_machine_id
|
||||
|
||||
# @return [String] ID of the server hosting the datacenter management
|
||||
# solution.
|
||||
attr_accessor :datacenter_management_server_id
|
||||
|
||||
# @return [String] Description of the machine
|
||||
attr_accessor :description
|
||||
|
||||
# @return [String] User readable name of the machine as defined by the
|
||||
# user in their private datacenter.
|
||||
attr_accessor :display_name
|
||||
|
||||
# @return [Float] Memory in Megabytes.
|
||||
attr_accessor :megabytes_of_memory
|
||||
|
||||
# @return [Integer] Processor count.
|
||||
attr_accessor :number_of_cores
|
||||
|
||||
# @return [String] Operating System of the machine.
|
||||
attr_accessor :operating_system
|
||||
|
||||
# @return [Array<String>] List of references to the groups that the
|
||||
# machine is member of.
|
||||
attr_accessor :groups
|
||||
|
||||
# @return [DateTime] Time when this machine was created. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :created_timestamp
|
||||
|
||||
# @return [DateTime] Time when this machine was last updated. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :updated_timestamp
|
||||
|
||||
# @return [DateTime] Time when this machine was discovered by Azure
|
||||
# Migrate agent. Date-Time represented in ISO-8601 format.
|
||||
attr_accessor :discovered_timestamp
|
||||
|
||||
# @return [Hash{String => Disk}] Dictionary of disks attached to the
|
||||
# machine. Key is ID of disk. Value is a disk object
|
||||
attr_accessor :disks
|
||||
|
||||
# @return [Hash{String => NetworkAdapter}] Dictionary of network adapters
|
||||
# attached to the machine. Key is ID of network adapter. Value is a
|
||||
# network adapter object
|
||||
attr_accessor :network_adapters
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Machine class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Machine',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Machine',
|
||||
model_properties: {
|
||||
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'
|
||||
}
|
||||
},
|
||||
e_tag: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'type',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
boot_type: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.bootType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_container: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterContainer',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_management_server: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterManagementServer',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_machine_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterMachineId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
datacenter_management_server_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.datacenterManagementServerId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.description',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
display_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.displayName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
megabytes_of_memory: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.megabytesOfMemory',
|
||||
type: {
|
||||
name: 'Double'
|
||||
}
|
||||
},
|
||||
number_of_cores: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfCores',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
operating_system: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.operatingSystem',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
groups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.groups',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.createdTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
updated_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.updatedTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
discovered_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.discoveredTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
disks: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.disks',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'DiskElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Disk'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
network_adapters: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.networkAdapters',
|
||||
type: {
|
||||
name: 'Dictionary',
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'NetworkAdapterElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetworkAdapter'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for MachineBootType
|
||||
#
|
||||
module MachineBootType
|
||||
Unknown = "Unknown"
|
||||
EFI = "EFI"
|
||||
BIOS = "BIOS"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of machines.
|
||||
#
|
||||
class MachineResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Machine>] List of machines.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for MachineResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'MachineResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'MachineResultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'MachineElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Machine'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for NameAvailabilityReason
|
||||
#
|
||||
module NameAvailabilityReason
|
||||
Available = "Available"
|
||||
Invalid = "Invalid"
|
||||
AlreadyExists = "AlreadyExists"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A network adapter discovered on a machine.
|
||||
#
|
||||
class NetworkAdapter
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] MAC Address of the network adapter.
|
||||
attr_accessor :mac_address
|
||||
|
||||
# @return [Array<String>] List of IP Addresses on the network adapter.
|
||||
attr_accessor :ip_addresses
|
||||
|
||||
|
||||
#
|
||||
# Mapper for NetworkAdapter class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'NetworkAdapter',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'NetworkAdapter',
|
||||
model_properties: {
|
||||
mac_address: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'macAddress',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
ip_addresses: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'ipAddresses',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,71 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# A REST API operation supported by the provider.
|
||||
#
|
||||
class Operation
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Name of the operation.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [OperationDisplay] Displayable properties of the operation.
|
||||
attr_accessor :display
|
||||
|
||||
# @return [String] Origin of the operation.
|
||||
attr_accessor :origin
|
||||
|
||||
|
||||
#
|
||||
# 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,
|
||||
read_only: true,
|
||||
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,
|
||||
read_only: true,
|
||||
serialized_name: 'origin',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Displayable properties of the operation.
|
||||
#
|
||||
class OperationDisplay
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Provider of the operation.
|
||||
attr_accessor :provider
|
||||
|
||||
# @return [String] Resource operated on by the operation.
|
||||
attr_accessor :resource
|
||||
|
||||
# @return [String] Operation Type.
|
||||
attr_accessor :operation
|
||||
|
||||
# @return [String] Description of the operation.
|
||||
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: 'OperationDisplay',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationDisplay',
|
||||
model_properties: {
|
||||
provider: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'provider',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
resource: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'resource',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
operation: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'operation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
description: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'description',
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of API operations.
|
||||
#
|
||||
class OperationResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Operation>] List of operations.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for OperationResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'OperationResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'OperationResultList',
|
||||
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,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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for Percentile
|
||||
#
|
||||
module Percentile
|
||||
Percentile50 = "Percentile50"
|
||||
Percentile90 = "Percentile90"
|
||||
Percentile95 = "Percentile95"
|
||||
Percentile99 = "Percentile99"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,256 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Azure Migrate Project.
|
||||
#
|
||||
class Project
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Path reference to this project
|
||||
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}
|
||||
attr_accessor :id
|
||||
|
||||
# @return [String] Name of the project.
|
||||
attr_accessor :name
|
||||
|
||||
# @return [String] Type of the object = [Microsoft.Migrate/projects].
|
||||
attr_accessor :type
|
||||
|
||||
# @return [String] For optimistic concurrency control.
|
||||
attr_accessor :e_tag
|
||||
|
||||
# @return [String] Azure location in which project is created.
|
||||
attr_accessor :location
|
||||
|
||||
# @return Tags provided by Azure Tagging service.
|
||||
attr_accessor :tags
|
||||
|
||||
# @return [DateTime] Time when this project was created. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :created_timestamp
|
||||
|
||||
# @return [DateTime] Time when this project was last updated. Date-Time
|
||||
# represented in ISO-8601 format.
|
||||
attr_accessor :updated_timestamp
|
||||
|
||||
# @return [DiscoveryStatus] Reports whether project is under discovery.
|
||||
# Possible values include: 'Unknown', 'NotStarted', 'InProgress',
|
||||
# 'Completed'
|
||||
attr_accessor :discovery_status
|
||||
|
||||
# @return [String] ARM ID of the Service Map workspace created by user.
|
||||
attr_accessor :customer_workspace_id
|
||||
|
||||
# @return [String] Location of the Service Map workspace created by user.
|
||||
attr_accessor :customer_workspace_location
|
||||
|
||||
# @return [DateTime] Time when this project was created. Date-Time
|
||||
# represented in ISO-8601 format. This value will be null until discovery
|
||||
# is complete.
|
||||
attr_accessor :last_discovery_timestamp
|
||||
|
||||
# @return [String] Session id of the last discovery.
|
||||
attr_accessor :last_discovery_session_id
|
||||
|
||||
# @return [Integer] Number of groups created in the project.
|
||||
attr_accessor :number_of_groups
|
||||
|
||||
# @return [Integer] Number of machines in the project.
|
||||
attr_accessor :number_of_machines
|
||||
|
||||
# @return [Integer] Number of assessments created in the project.
|
||||
attr_accessor :number_of_assessments
|
||||
|
||||
# @return [DateTime] Time when last assessment was created. Date-Time
|
||||
# represented in ISO-8601 format. This value will be null until
|
||||
# assessment is created.
|
||||
attr_accessor :last_assessment_timestamp
|
||||
|
||||
# @return [ProvisioningState] Provisioning state of the project. Possible
|
||||
# values include: 'Accepted', 'Creating', 'Deleting', 'Failed', 'Moving',
|
||||
# 'Succeeded'
|
||||
attr_accessor :provisioning_state
|
||||
|
||||
|
||||
#
|
||||
# Mapper for Project class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'Project',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Project',
|
||||
model_properties: {
|
||||
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'
|
||||
}
|
||||
},
|
||||
e_tag: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'eTag',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'location',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'tags',
|
||||
type: {
|
||||
name: 'Object'
|
||||
}
|
||||
},
|
||||
created_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.createdTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
updated_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.updatedTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
discovery_status: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.discoveryStatus',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
customer_workspace_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.customerWorkspaceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
customer_workspace_location: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.customerWorkspaceLocation',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
last_discovery_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.lastDiscoveryTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
last_discovery_session_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.lastDiscoverySessionId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
number_of_groups: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfGroups',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_machines: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfMachines',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
number_of_assessments: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.numberOfAssessments',
|
||||
type: {
|
||||
name: 'Number'
|
||||
}
|
||||
},
|
||||
last_assessment_timestamp: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'properties.lastAssessmentTimestamp',
|
||||
type: {
|
||||
name: 'DateTime'
|
||||
}
|
||||
},
|
||||
provisioning_state: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'properties.provisioningState',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# ID and Key for Migration Project.
|
||||
#
|
||||
class ProjectKey
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] ID of Migration Project.
|
||||
attr_accessor :workspace_id
|
||||
|
||||
# @return [String] Key of Migration Project.
|
||||
attr_accessor :workspace_key
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ProjectKey class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ProjectKey',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ProjectKey',
|
||||
model_properties: {
|
||||
workspace_id: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'workspaceId',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
workspace_key: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'workspaceKey',
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# List of projects.
|
||||
#
|
||||
class ProjectResultList
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [Array<Project>] List of projects.
|
||||
attr_accessor :value
|
||||
|
||||
|
||||
#
|
||||
# Mapper for ProjectResultList class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ProjectResultList',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'ProjectResultList',
|
||||
model_properties: {
|
||||
value: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'value',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'ProjectElementType',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'Project'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for ProvisioningState
|
||||
#
|
||||
module ProvisioningState
|
||||
Accepted = "Accepted"
|
||||
Creating = "Creating"
|
||||
Deleting = "Deleting"
|
||||
Failed = "Failed"
|
||||
Moving = "Moving"
|
||||
Succeeded = "Succeeded"
|
||||
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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# Defines values for TimeRange
|
||||
#
|
||||
module TimeRange
|
||||
Day = "Day"
|
||||
Week = "Week"
|
||||
Month = "Month"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,88 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
module Models
|
||||
#
|
||||
# VM family name, the list of targeted azure locations and the category of
|
||||
# the family.
|
||||
#
|
||||
class VmFamily
|
||||
|
||||
include MsRestAzure
|
||||
|
||||
# @return [String] Name of the VM family.
|
||||
attr_accessor :family_name
|
||||
|
||||
# @return [Array<String>] List of Azure regions.
|
||||
attr_accessor :target_locations
|
||||
|
||||
# @return [Array<String>] Category of the VM family.
|
||||
attr_accessor :category
|
||||
|
||||
|
||||
#
|
||||
# Mapper for VmFamily class as Ruby Hash.
|
||||
# This will be used for serialization/deserialization.
|
||||
#
|
||||
def self.mapper()
|
||||
{
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'VmFamily',
|
||||
type: {
|
||||
name: 'Composite',
|
||||
class_name: 'VmFamily',
|
||||
model_properties: {
|
||||
family_name: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'familyName',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
},
|
||||
target_locations: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'targetLocations',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
category: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
read_only: true,
|
||||
serialized_name: 'category',
|
||||
type: {
|
||||
name: 'Sequence',
|
||||
element: {
|
||||
client_side_validation: true,
|
||||
required: false,
|
||||
serialized_name: 'StringElementType',
|
||||
type: {
|
||||
name: 'String'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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::Migrate end
|
||||
module Azure::Migrate::Mgmt end
|
||||
module Azure::Migrate::Mgmt::V2018_02_02 end
|
|
@ -0,0 +1,113 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
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 [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get list of operations supported in the API.
|
||||
#
|
||||
# Get a list of REST API supported by Microsoft.Migrate provider.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [OperationResultList] operation results.
|
||||
#
|
||||
def list(custom_headers:nil)
|
||||
response = list_async(custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get list of operations supported in the API.
|
||||
#
|
||||
# Get a list of REST API supported by Microsoft.Migrate provider.
|
||||
#
|
||||
# @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
|
||||
|
||||
#
|
||||
# Get list of operations supported in the API.
|
||||
#
|
||||
# Get a list of REST API supported by Microsoft.Migrate provider.
|
||||
#
|
||||
# @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)
|
||||
|
||||
|
||||
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.Migrate/operations'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::OperationResultList.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,756 @@
|
|||
# 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::Migrate::Mgmt::V2018_02_02
|
||||
#
|
||||
# Move your workloads to Azure.
|
||||
#
|
||||
class Projects
|
||||
include MsRestAzure
|
||||
|
||||
#
|
||||
# Creates and initializes a new instance of the Projects class.
|
||||
# @param client service class for accessing basic functionality.
|
||||
#
|
||||
def initialize(client)
|
||||
@client = client
|
||||
end
|
||||
|
||||
# @return [AzureMigrate] reference to the AzureMigrate
|
||||
attr_reader :client
|
||||
|
||||
#
|
||||
# Get all projects.
|
||||
#
|
||||
# Get all the projects in the subscription.
|
||||
#
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ProjectResultList] operation results.
|
||||
#
|
||||
def list_by_subscription(custom_headers:nil)
|
||||
response = list_by_subscription_async(custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all projects.
|
||||
#
|
||||
# Get all the projects in the subscription.
|
||||
#
|
||||
# @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_by_subscription_with_http_info(custom_headers:nil)
|
||||
list_by_subscription_async(custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all projects.
|
||||
#
|
||||
# Get all the projects in the subscription.
|
||||
#
|
||||
# @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_by_subscription_async(custom_headers:nil)
|
||||
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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}/providers/Microsoft.Migrate/projects'
|
||||
|
||||
request_url = @base_url || @client.base_url
|
||||
|
||||
options = {
|
||||
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
||||
path_params: {'subscriptionId' => @client.subscription_id},
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList.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 all projects.
|
||||
#
|
||||
# Get all the projects in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ProjectResultList] operation results.
|
||||
#
|
||||
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
||||
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get all projects.
|
||||
#
|
||||
# Get all the projects in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @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_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
||||
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get all projects.
|
||||
#
|
||||
# Get all the projects in the resource group.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @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_by_resource_group_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?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects'
|
||||
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList.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 the specified project.
|
||||
#
|
||||
# Get the project with the specified name.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Project] operation results.
|
||||
#
|
||||
def get(resource_group_name, project_name, custom_headers:nil)
|
||||
response = get_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get the specified project.
|
||||
#
|
||||
# Get the project with the specified name.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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, project_name, custom_headers:nil)
|
||||
get_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get the specified project.
|
||||
#
|
||||
# Get the project with the specified name.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::Project.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 project.
|
||||
#
|
||||
# Create a project with specified name. If a project already exists, update it.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] New or Updated project object.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Project] operation results.
|
||||
#
|
||||
def create(resource_group_name, project_name, project:nil, custom_headers:nil)
|
||||
response = create_async(resource_group_name, project_name, project:project, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update project.
|
||||
#
|
||||
# Create a project with specified name. If a project already exists, update it.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] New or Updated project object.
|
||||
# @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(resource_group_name, project_name, project:nil, custom_headers:nil)
|
||||
create_async(resource_group_name, project_name, project:project, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Create or update project.
|
||||
#
|
||||
# Create a project with specified name. If a project already exists, update it.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] New or Updated project object.
|
||||
# @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(resource_group_name, project_name, project: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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::Project.mapper()
|
||||
request_content = @client.serialize(request_mapper, project)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::Project.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::Migrate::Mgmt::V2018_02_02::Models::Project.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 project.
|
||||
#
|
||||
# Update a project with specified name. Supports partial updates, for example
|
||||
# only tags can be provided.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] Updated project object.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [Project] operation results.
|
||||
#
|
||||
def update(resource_group_name, project_name, project:nil, custom_headers:nil)
|
||||
response = update_async(resource_group_name, project_name, project:project, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Update project.
|
||||
#
|
||||
# Update a project with specified name. Supports partial updates, for example
|
||||
# only tags can be provided.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] Updated project object.
|
||||
# @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, project_name, project:nil, custom_headers:nil)
|
||||
update_async(resource_group_name, project_name, project:project, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Update project.
|
||||
#
|
||||
# Update a project with specified name. Supports partial updates, for example
|
||||
# only tags can be provided.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param project [Project] Updated project object.
|
||||
# @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, project_name, project: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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::Project.mapper()
|
||||
request_content = @client.serialize(request_mapper, project)
|
||||
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
||||
|
||||
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Migrate/projects/{projectName}'
|
||||
|
||||
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,'projectName' => project_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::Migrate::Mgmt::V2018_02_02::Models::Project.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 the project
|
||||
#
|
||||
# Delete the project. Deleting non-existent project is a no-operation.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
#
|
||||
def delete(resource_group_name, project_name, custom_headers:nil)
|
||||
response = delete_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
nil
|
||||
end
|
||||
|
||||
#
|
||||
# Delete the project
|
||||
#
|
||||
# Delete the project. Deleting non-existent project is a no-operation.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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 delete_with_http_info(resource_group_name, project_name, custom_headers:nil)
|
||||
delete_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Delete the project
|
||||
#
|
||||
# Delete the project. Deleting non-existent project is a no-operation.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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 delete_async(resource_group_name, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}'
|
||||
|
||||
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,'projectName' => project_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
|
||||
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
|
||||
|
||||
#
|
||||
# Get shared keys for the project.
|
||||
#
|
||||
# Gets the Log Analytics Workspace ID and Primary Key for the specified
|
||||
# project.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
||||
# will be added to the HTTP request.
|
||||
#
|
||||
# @return [ProjectKey] operation results.
|
||||
#
|
||||
def get_keys(resource_group_name, project_name, custom_headers:nil)
|
||||
response = get_keys_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
response.body unless response.nil?
|
||||
end
|
||||
|
||||
#
|
||||
# Get shared keys for the project.
|
||||
#
|
||||
# Gets the Log Analytics Workspace ID and Primary Key for the specified
|
||||
# project.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_keys_with_http_info(resource_group_name, project_name, custom_headers:nil)
|
||||
get_keys_async(resource_group_name, project_name, custom_headers:custom_headers).value!
|
||||
end
|
||||
|
||||
#
|
||||
# Get shared keys for the project.
|
||||
#
|
||||
# Gets the Log Analytics Workspace ID and Primary Key for the specified
|
||||
# project.
|
||||
#
|
||||
# @param resource_group_name [String] Name of the Azure Resource Group that
|
||||
# project is part of.
|
||||
# @param project_name [String] Name of the Azure Migrate project.
|
||||
# @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_keys_async(resource_group_name, project_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, 'project_name is nil' if project_name.nil?
|
||||
@client.api_version = '2018-02-02'
|
||||
|
||||
|
||||
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.Migrate/projects/{projectName}/keys'
|
||||
|
||||
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,'projectName' => project_name},
|
||||
query_params: {'api-version' => @client.api_version},
|
||||
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::Migrate::Mgmt::V2018_02_02::Models::ProjectKey.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,6 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require '2018-02-02/generated/azure_mgmt_migrate'
|
||||
require 'profiles/latest/migrate_latest_profile_client'
|
|
@ -0,0 +1,7 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
module Azure end
|
||||
module Azure::Migrate end
|
||||
module Azure::Migrate::Mgmt end
|
|
@ -0,0 +1,40 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require 'profiles/latest/migrate_module_definition'
|
||||
require 'profiles/latest/modules/migrate_profile_module'
|
||||
|
||||
module Azure::Migrate::Profiles::Latest
|
||||
module Mgmt
|
||||
#
|
||||
# Client class for the Latest profile SDK.
|
||||
#
|
||||
class Client < MigrateManagementClass
|
||||
include MsRestAzure::Common::Configurable
|
||||
|
||||
#
|
||||
# Initializes a new instance of the Client class.
|
||||
# @param options [Hash] hash of client options.
|
||||
# options = {
|
||||
# tenant_id: 'YOUR TENANT ID',
|
||||
# client_id: 'YOUR CLIENT ID',
|
||||
# client_secret: 'YOUR CLIENT SECRET',
|
||||
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
||||
# credentials: credentials,
|
||||
# active_directory_settings: active_directory_settings,
|
||||
# base_url: 'YOUR BASE URL',
|
||||
# options: options
|
||||
# }
|
||||
# 'credentials' are optional and if not passed in the hash, will be obtained
|
||||
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
||||
#
|
||||
# Also, base_url, active_directory_settings & options are optional.
|
||||
#
|
||||
def initialize(options = {})
|
||||
super(options)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
module Azure end
|
||||
module Azure::Migrate end
|
||||
module Azure::Migrate::Profiles end
|
||||
module Azure::Migrate::Profiles::Latest end
|
|
@ -0,0 +1,255 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require 'azure_mgmt_migrate'
|
||||
|
||||
module Azure::Migrate::Profiles::Latest
|
||||
module Mgmt
|
||||
Location = Azure::Migrate::Mgmt::V2018_02_02::Location
|
||||
AssessmentOptions = Azure::Migrate::Mgmt::V2018_02_02::AssessmentOptions
|
||||
Projects = Azure::Migrate::Mgmt::V2018_02_02::Projects
|
||||
Machines = Azure::Migrate::Mgmt::V2018_02_02::Machines
|
||||
Groups = Azure::Migrate::Mgmt::V2018_02_02::Groups
|
||||
Assessments = Azure::Migrate::Mgmt::V2018_02_02::Assessments
|
||||
AssessedMachines = Azure::Migrate::Mgmt::V2018_02_02::AssessedMachines
|
||||
Operations = Azure::Migrate::Mgmt::V2018_02_02::Operations
|
||||
|
||||
module Models
|
||||
DownloadUrl = Azure::Migrate::Mgmt::V2018_02_02::Models::DownloadUrl
|
||||
Project = Azure::Migrate::Mgmt::V2018_02_02::Models::Project
|
||||
VmFamily = Azure::Migrate::Mgmt::V2018_02_02::Models::VmFamily
|
||||
Assessment = Azure::Migrate::Mgmt::V2018_02_02::Models::Assessment
|
||||
ProjectResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList
|
||||
NetworkAdapter = Azure::Migrate::Mgmt::V2018_02_02::Models::NetworkAdapter
|
||||
MachineResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::MachineResultList
|
||||
AssessedDisk = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedDisk
|
||||
GroupResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::GroupResultList
|
||||
AssessedMachine = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachine
|
||||
AssessedMachineResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachineResultList
|
||||
OperationDisplay = Azure::Migrate::Mgmt::V2018_02_02::Models::OperationDisplay
|
||||
AssessmentResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList
|
||||
Group = Azure::Migrate::Mgmt::V2018_02_02::Models::Group
|
||||
OperationResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::OperationResultList
|
||||
Machine = Azure::Migrate::Mgmt::V2018_02_02::Models::Machine
|
||||
AssessmentOptionsResultList = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentOptionsResultList
|
||||
ProjectKey = Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectKey
|
||||
Disk = Azure::Migrate::Mgmt::V2018_02_02::Models::Disk
|
||||
Operation = Azure::Migrate::Mgmt::V2018_02_02::Models::Operation
|
||||
CheckNameAvailabilityParameters = Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityParameters
|
||||
AssessedNetworkAdapter = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedNetworkAdapter
|
||||
CheckNameAvailabilityResult = Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityResult
|
||||
DiscoveryStatus = Azure::Migrate::Mgmt::V2018_02_02::Models::DiscoveryStatus
|
||||
ProvisioningState = Azure::Migrate::Mgmt::V2018_02_02::Models::ProvisioningState
|
||||
AzureLocation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureLocation
|
||||
AzureOfferCode = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureOfferCode
|
||||
AzurePricingTier = Azure::Migrate::Mgmt::V2018_02_02::Models::AzurePricingTier
|
||||
AzureStorageRedundancy = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureStorageRedundancy
|
||||
Percentile = Azure::Migrate::Mgmt::V2018_02_02::Models::Percentile
|
||||
TimeRange = Azure::Migrate::Mgmt::V2018_02_02::Models::TimeRange
|
||||
AssessmentStage = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStage
|
||||
Currency = Azure::Migrate::Mgmt::V2018_02_02::Models::Currency
|
||||
AzureHybridUseBenefit = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureHybridUseBenefit
|
||||
AssessmentSizingCriterion = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentSizingCriterion
|
||||
AssessmentStatus = Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStatus
|
||||
MachineBootType = Azure::Migrate::Mgmt::V2018_02_02::Models::MachineBootType
|
||||
AzureDiskType = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskType
|
||||
AzureDiskSize = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSize
|
||||
CloudSuitability = Azure::Migrate::Mgmt::V2018_02_02::Models::CloudSuitability
|
||||
AzureDiskSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSuitabilityExplanation
|
||||
AzureNetworkAdapterSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureNetworkAdapterSuitabilityExplanation
|
||||
AzureVmSize = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSize
|
||||
AzureVmSuitabilityExplanation = Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSuitabilityExplanation
|
||||
NameAvailabilityReason = Azure::Migrate::Mgmt::V2018_02_02::Models::NameAvailabilityReason
|
||||
end
|
||||
|
||||
#
|
||||
# MigrateManagementClass
|
||||
#
|
||||
class MigrateManagementClass
|
||||
attr_reader :location, :assessment_options, :projects, :machines, :groups, :assessments, :assessed_machines, :operations, :configurable, :base_url, :options, :model_classes
|
||||
|
||||
def initialize(options = {})
|
||||
if options.is_a?(Hash) && options.length == 0
|
||||
@options = setup_default_options
|
||||
else
|
||||
@options = options
|
||||
end
|
||||
|
||||
reset!(options)
|
||||
|
||||
@configurable = self
|
||||
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
||||
@options = options[:options].nil? ? nil:options[:options]
|
||||
|
||||
@client_0 = Azure::Migrate::Mgmt::V2018_02_02::AzureMigrate.new(configurable.credentials, base_url, options)
|
||||
if(@client_0.respond_to?(:subscription_id))
|
||||
@client_0.subscription_id = configurable.subscription_id
|
||||
end
|
||||
add_telemetry(@client_0)
|
||||
@location = @client_0.location
|
||||
@assessment_options = @client_0.assessment_options
|
||||
@projects = @client_0.projects
|
||||
@machines = @client_0.machines
|
||||
@groups = @client_0.groups
|
||||
@assessments = @client_0.assessments
|
||||
@assessed_machines = @client_0.assessed_machines
|
||||
@operations = @client_0.operations
|
||||
|
||||
@model_classes = ModelClasses.new
|
||||
end
|
||||
|
||||
def add_telemetry(client)
|
||||
profile_information = 'Profiles/Latest/Migrate/Mgmt'
|
||||
client.add_user_agent_information(profile_information)
|
||||
end
|
||||
|
||||
def method_missing(method, *args)
|
||||
if @client_0.respond_to?method
|
||||
@client_0.send(method, *args)
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class ModelClasses
|
||||
def download_url
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::DownloadUrl
|
||||
end
|
||||
def project
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Project
|
||||
end
|
||||
def vm_family
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::VmFamily
|
||||
end
|
||||
def assessment
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Assessment
|
||||
end
|
||||
def project_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectResultList
|
||||
end
|
||||
def network_adapter
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::NetworkAdapter
|
||||
end
|
||||
def machine_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::MachineResultList
|
||||
end
|
||||
def assessed_disk
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedDisk
|
||||
end
|
||||
def group_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::GroupResultList
|
||||
end
|
||||
def assessed_machine
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachine
|
||||
end
|
||||
def assessed_machine_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedMachineResultList
|
||||
end
|
||||
def operation_display
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::OperationDisplay
|
||||
end
|
||||
def assessment_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentResultList
|
||||
end
|
||||
def group
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Group
|
||||
end
|
||||
def operation_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::OperationResultList
|
||||
end
|
||||
def machine
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Machine
|
||||
end
|
||||
def assessment_options_result_list
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentOptionsResultList
|
||||
end
|
||||
def project_key
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProjectKey
|
||||
end
|
||||
def disk
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Disk
|
||||
end
|
||||
def operation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Operation
|
||||
end
|
||||
def check_name_availability_parameters
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityParameters
|
||||
end
|
||||
def assessed_network_adapter
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessedNetworkAdapter
|
||||
end
|
||||
def check_name_availability_result
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CheckNameAvailabilityResult
|
||||
end
|
||||
def discovery_status
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::DiscoveryStatus
|
||||
end
|
||||
def provisioning_state
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::ProvisioningState
|
||||
end
|
||||
def azure_location
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureLocation
|
||||
end
|
||||
def azure_offer_code
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureOfferCode
|
||||
end
|
||||
def azure_pricing_tier
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzurePricingTier
|
||||
end
|
||||
def azure_storage_redundancy
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureStorageRedundancy
|
||||
end
|
||||
def percentile
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Percentile
|
||||
end
|
||||
def time_range
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::TimeRange
|
||||
end
|
||||
def assessment_stage
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStage
|
||||
end
|
||||
def currency
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::Currency
|
||||
end
|
||||
def azure_hybrid_use_benefit
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureHybridUseBenefit
|
||||
end
|
||||
def assessment_sizing_criterion
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentSizingCriterion
|
||||
end
|
||||
def assessment_status
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AssessmentStatus
|
||||
end
|
||||
def machine_boot_type
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::MachineBootType
|
||||
end
|
||||
def azure_disk_type
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskType
|
||||
end
|
||||
def azure_disk_size
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSize
|
||||
end
|
||||
def cloud_suitability
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::CloudSuitability
|
||||
end
|
||||
def azure_disk_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureDiskSuitabilityExplanation
|
||||
end
|
||||
def azure_network_adapter_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureNetworkAdapterSuitabilityExplanation
|
||||
end
|
||||
def azure_vm_size
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSize
|
||||
end
|
||||
def azure_vm_suitability_explanation
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::AzureVmSuitabilityExplanation
|
||||
end
|
||||
def name_availability_reason
|
||||
Azure::Migrate::Mgmt::V2018_02_02::Models::NameAvailabilityReason
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
module Azure::Migrate::Mgmt
|
||||
VERSION = '0.17.0'
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require 'dotenv'
|
||||
Dotenv.load(File.join(File.dirname(__FILE__), '../../../.env'))
|
Загрузка…
Ссылка в новой задаче