# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::FSx # When FSx returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::FSx::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all FSx errors using ServiceError: # # begin # # do stuff # rescue Aws::FSx::Errors::ServiceError # # rescues all FSx API errors # end # # # ## Request Context # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns # information about the request that generated the error. # See {Seahorse::Client::RequestContext} for more information. # # ## Error Classes # * {ActiveDirectoryError} # * {BackupBeingCopied} # * {BackupInProgress} # * {BackupNotFound} # * {BackupRestoring} # * {BadRequest} # * {DataRepositoryTaskEnded} # * {DataRepositoryTaskExecuting} # * {DataRepositoryTaskNotFound} # * {FileSystemNotFound} # * {IncompatibleParameterError} # * {IncompatibleRegionForMultiAZ} # * {InternalServerError} # * {InvalidDestinationKmsKey} # * {InvalidExportPath} # * {InvalidImportPath} # * {InvalidNetworkSettings} # * {InvalidPerUnitStorageThroughput} # * {InvalidRegion} # * {InvalidSourceKmsKey} # * {MissingFileSystemConfiguration} # * {MissingVolumeConfiguration} # * {NotServiceResourceError} # * {ResourceDoesNotSupportTagging} # * {ResourceNotFound} # * {ServiceLimitExceeded} # * {SourceBackupUnavailable} # * {StorageVirtualMachineNotFound} # * {UnsupportedOperation} # * {VolumeNotFound} # # Additionally, error classes are dynamically generated for service errors based on the error code # if they are not defined above. module Errors extend Aws::Errors::DynamicErrors class ActiveDirectoryError < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::ActiveDirectoryError] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def active_directory_id @data[:active_directory_id] end # @return [String] def type @data[:type] end # @return [String] def message @message || @data[:message] end end class BackupBeingCopied < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::BackupBeingCopied] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end # @return [String] def backup_id @data[:backup_id] end end class BackupInProgress < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::BackupInProgress] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class BackupNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::BackupNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class BackupRestoring < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::BackupRestoring] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end # @return [String] def file_system_id @data[:file_system_id] end end class BadRequest < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::BadRequest] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class DataRepositoryTaskEnded < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::DataRepositoryTaskEnded] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class DataRepositoryTaskExecuting < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::DataRepositoryTaskExecuting] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class DataRepositoryTaskNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::DataRepositoryTaskNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class FileSystemNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::FileSystemNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class IncompatibleParameterError < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::IncompatibleParameterError] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def parameter @data[:parameter] end # @return [String] def message @message || @data[:message] end end class IncompatibleRegionForMultiAZ < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::IncompatibleRegionForMultiAZ] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InternalServerError < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InternalServerError] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidDestinationKmsKey < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidDestinationKmsKey] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidExportPath < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidExportPath] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidImportPath < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidImportPath] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidNetworkSettings < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidNetworkSettings] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end # @return [String] def invalid_subnet_id @data[:invalid_subnet_id] end # @return [String] def invalid_security_group_id @data[:invalid_security_group_id] end # @return [String] def invalid_route_table_id @data[:invalid_route_table_id] end end class InvalidPerUnitStorageThroughput < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidPerUnitStorageThroughput] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidRegion < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidRegion] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidSourceKmsKey < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::InvalidSourceKmsKey] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class MissingFileSystemConfiguration < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::MissingFileSystemConfiguration] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class MissingVolumeConfiguration < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::MissingVolumeConfiguration] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class NotServiceResourceError < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::NotServiceResourceError] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def resource_arn @data[:resource_arn] end # @return [String] def message @message || @data[:message] end end class ResourceDoesNotSupportTagging < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::ResourceDoesNotSupportTagging] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def resource_arn @data[:resource_arn] end # @return [String] def message @message || @data[:message] end end class ResourceNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::ResourceNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def resource_arn @data[:resource_arn] end # @return [String] def message @message || @data[:message] end end class ServiceLimitExceeded < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::ServiceLimitExceeded] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def limit @data[:limit] end # @return [String] def message @message || @data[:message] end end class SourceBackupUnavailable < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::SourceBackupUnavailable] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end # @return [String] def backup_id @data[:backup_id] end end class StorageVirtualMachineNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::StorageVirtualMachineNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedOperation < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::UnsupportedOperation] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class VolumeNotFound < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::FSx::Types::VolumeNotFound] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end end end