Class: Seahorse::Client::Base
- Inherits:
-
Object
- Object
- Seahorse::Client::Base
- Includes:
- HandlerBuilder
- Defined in:
- gems/aws-sdk-core/lib/seahorse/client/base.rb
Direct Known Subclasses
Aws::ACM::Client, Aws::ACMPCA::Client, Aws::APIGateway::Client, Aws::ARCZonalShift::Client, Aws::AccessAnalyzer::Client, Aws::Account::Client, Aws::Amplify::Client, Aws::AmplifyBackend::Client, Aws::AmplifyUIBuilder::Client, Aws::ApiGatewayManagementApi::Client, Aws::ApiGatewayV2::Client, Aws::AppConfig::Client, Aws::AppConfigData::Client, Aws::AppFabric::Client, Aws::AppIntegrationsService::Client, Aws::AppMesh::Client, Aws::AppRegistry::Client, Aws::AppRunner::Client, Aws::AppStream::Client, Aws::AppSync::Client, Aws::AppTest::Client, Aws::Appflow::Client, Aws::ApplicationAutoScaling::Client, Aws::ApplicationCostProfiler::Client, Aws::ApplicationDiscoveryService::Client, Aws::ApplicationInsights::Client, Aws::ApplicationSignals::Client, Aws::Artifact::Client, Aws::Athena::Client, Aws::AuditManager::Client, Aws::AugmentedAIRuntime::Client, Aws::AutoScaling::Client, Aws::AutoScalingPlans::Client, Aws::B2bi::Client, Aws::BCMDataExports::Client, Aws::BCMPricingCalculator::Client, Aws::Backup::Client, Aws::BackupGateway::Client, Aws::BackupSearch::Client, Aws::Batch::Client, Aws::Bedrock::Client, Aws::BedrockAgent::Client, Aws::BedrockAgentRuntime::Client, Aws::BedrockDataAutomation::Client, Aws::BedrockDataAutomationRuntime::Client, Aws::BedrockRuntime::Client, Aws::Billing::Client, Aws::BillingConductor::Client, Aws::Braket::Client, Aws::Budgets::Client, Aws::Chatbot::Client, Aws::Chime::Client, Aws::ChimeSDKIdentity::Client, Aws::ChimeSDKMediaPipelines::Client, Aws::ChimeSDKMeetings::Client, Aws::ChimeSDKMessaging::Client, Aws::ChimeSDKVoice::Client, Aws::CleanRooms::Client, Aws::CleanRoomsML::Client, Aws::Cloud9::Client, Aws::CloudControlApi::Client, Aws::CloudDirectory::Client, Aws::CloudFormation::Client, Aws::CloudFront::Client, Aws::CloudFrontKeyValueStore::Client, Aws::CloudHSM::Client, Aws::CloudHSMV2::Client, Aws::CloudSearch::Client, Aws::CloudSearchDomain::Client, Aws::CloudTrail::Client, Aws::CloudTrailData::Client, Aws::CloudWatch::Client, Aws::CloudWatchEvents::Client, Aws::CloudWatchEvidently::Client, Aws::CloudWatchLogs::Client, Aws::CloudWatchRUM::Client, Aws::CodeArtifact::Client, Aws::CodeBuild::Client, Aws::CodeCatalyst::Client, Aws::CodeCommit::Client, Aws::CodeConnections::Client, Aws::CodeDeploy::Client, Aws::CodeGuruProfiler::Client, Aws::CodeGuruReviewer::Client, Aws::CodeGuruSecurity::Client, Aws::CodePipeline::Client, Aws::CodeStarNotifications::Client, Aws::CodeStarconnections::Client, Aws::CognitoIdentity::Client, Aws::CognitoIdentityProvider::Client, Aws::CognitoSync::Client, Aws::Comprehend::Client, Aws::ComprehendMedical::Client, Aws::ComputeOptimizer::Client, Aws::ConfigService::Client, Aws::Connect::Client, Aws::ConnectCampaignService::Client, Aws::ConnectCampaignsV2::Client, Aws::ConnectCases::Client, Aws::ConnectContactLens::Client, Aws::ConnectParticipant::Client, Aws::ConnectWisdomService::Client, Aws::ControlCatalog::Client, Aws::ControlTower::Client, Aws::CostExplorer::Client, Aws::CostOptimizationHub::Client, Aws::CostandUsageReportService::Client, Aws::CustomerProfiles::Client, Aws::DAX::Client, Aws::DLM::Client, Aws::DSQL::Client, Aws::DataExchange::Client, Aws::DataPipeline::Client, Aws::DataSync::Client, Aws::DataZone::Client, Aws::DatabaseMigrationService::Client, Aws::Deadline::Client, Aws::Detective::Client, Aws::DevOpsGuru::Client, Aws::DeviceFarm::Client, Aws::DirectConnect::Client, Aws::DirectoryService::Client, Aws::DirectoryServiceData::Client, Aws::DocDB::Client, Aws::DocDBElastic::Client, Aws::Drs::Client, Aws::DynamoDB::Client, Aws::DynamoDBStreams::Client, Aws::EBS::Client, Aws::EC2::Client, Aws::EC2InstanceConnect::Client, Aws::ECR::Client, Aws::ECRPublic::Client, Aws::ECS::Client, Aws::EFS::Client, Aws::EKS::Client, Aws::EKSAuth::Client, Aws::EMR::Client, Aws::EMRContainers::Client, Aws::EMRServerless::Client, Aws::ElastiCache::Client, Aws::ElasticBeanstalk::Client, Aws::ElasticInference::Client, Aws::ElasticLoadBalancing::Client, Aws::ElasticLoadBalancingV2::Client, Aws::ElasticTranscoder::Client, Aws::ElasticsearchService::Client, Aws::EntityResolution::Client, Aws::EventBridge::Client, Aws::FIS::Client, Aws::FMS::Client, Aws::FSx::Client, Aws::FinSpaceData::Client, Aws::Finspace::Client, Aws::Firehose::Client, Aws::ForecastQueryService::Client, Aws::ForecastService::Client, Aws::FraudDetector::Client, Aws::FreeTier::Client, Aws::GameLift::Client, Aws::GeoMaps::Client, Aws::GeoPlaces::Client, Aws::GeoRoutes::Client, Aws::Glacier::Client, Aws::GlobalAccelerator::Client, Aws::Glue::Client, Aws::GlueDataBrew::Client, Aws::Greengrass::Client, Aws::GreengrassV2::Client, Aws::GroundStation::Client, Aws::GuardDuty::Client, Aws::Health::Client, Aws::HealthLake::Client, Aws::IAM::Client, Aws::IVS::Client, Aws::IVSRealTime::Client, Aws::IdentityStore::Client, Aws::Imagebuilder::Client, Aws::ImportExport::Client, Aws::Inspector2::Client, Aws::Inspector::Client, Aws::InspectorScan::Client, Aws::InternetMonitor::Client, Aws::Invoicing::Client, Aws::IoT1ClickDevicesService::Client, Aws::IoT1ClickProjects::Client, Aws::IoT::Client, Aws::IoTAnalytics::Client, Aws::IoTDataPlane::Client, Aws::IoTDeviceAdvisor::Client, Aws::IoTEvents::Client, Aws::IoTEventsData::Client, Aws::IoTFleetHub::Client, Aws::IoTFleetWise::Client, Aws::IoTJobsDataPlane::Client, Aws::IoTSecureTunneling::Client, Aws::IoTSiteWise::Client, Aws::IoTThingsGraph::Client, Aws::IoTTwinMaker::Client, Aws::IoTWireless::Client, Aws::Ivschat::Client, Aws::KMS::Client, Aws::Kafka::Client, Aws::KafkaConnect::Client, Aws::Kendra::Client, Aws::KendraRanking::Client, Aws::Keyspaces::Client, Aws::Kinesis::Client, Aws::KinesisAnalytics::Client, Aws::KinesisAnalyticsV2::Client, Aws::KinesisVideo::Client, Aws::KinesisVideoArchivedMedia::Client, Aws::KinesisVideoMedia::Client, Aws::KinesisVideoSignalingChannels::Client, Aws::KinesisVideoWebRTCStorage::Client, Aws::LakeFormation::Client, Aws::Lambda::Client, Aws::LaunchWizard::Client, Aws::Lex::Client, Aws::LexModelBuildingService::Client, Aws::LexModelsV2::Client, Aws::LexRuntimeV2::Client, Aws::LicenseManager::Client, Aws::LicenseManagerLinuxSubscriptions::Client, Aws::LicenseManagerUserSubscriptions::Client, Aws::Lightsail::Client, Aws::LocationService::Client, Aws::LookoutEquipment::Client, Aws::LookoutMetrics::Client, Aws::LookoutforVision::Client, Aws::MQ::Client, Aws::MTurk::Client, Aws::MWAA::Client, Aws::MachineLearning::Client, Aws::Macie2::Client, Aws::MailManager::Client, Aws::MainframeModernization::Client, Aws::ManagedBlockchain::Client, Aws::ManagedBlockchainQuery::Client, Aws::ManagedGrafana::Client, Aws::MarketplaceAgreement::Client, Aws::MarketplaceCatalog::Client, Aws::MarketplaceCommerceAnalytics::Client, Aws::MarketplaceDeployment::Client, Aws::MarketplaceEntitlementService::Client, Aws::MarketplaceMetering::Client, Aws::MarketplaceReporting::Client, Aws::MediaConnect::Client, Aws::MediaConvert::Client, Aws::MediaLive::Client, Aws::MediaPackage::Client, Aws::MediaPackageV2::Client, Aws::MediaPackageVod::Client, Aws::MediaStore::Client, Aws::MediaStoreData::Client, Aws::MediaTailor::Client, Aws::MedicalImaging::Client, Aws::MemoryDB::Client, Aws::Mgn::Client, Aws::MigrationHub::Client, Aws::MigrationHubConfig::Client, Aws::MigrationHubOrchestrator::Client, Aws::MigrationHubRefactorSpaces::Client, Aws::MigrationHubStrategyRecommendations::Client, Aws::Neptune::Client, Aws::NeptuneGraph::Client, Aws::Neptunedata::Client, Aws::NetworkFirewall::Client, Aws::NetworkFlowMonitor::Client, Aws::NetworkManager::Client, Aws::NetworkMonitor::Client, Aws::Notifications::Client, Aws::NotificationsContacts::Client, Aws::OAM::Client, Aws::OSIS::Client, Aws::ObservabilityAdmin::Client, Aws::Omics::Client, Aws::OpenSearchServerless::Client, Aws::OpenSearchService::Client, Aws::OpsWorks::Client, Aws::OpsWorksCM::Client, Aws::Organizations::Client, Aws::Outposts::Client, Aws::PCS::Client, Aws::PI::Client, Aws::Panorama::Client, Aws::PartnerCentralSelling::Client, Aws::PaymentCryptography::Client, Aws::PaymentCryptographyData::Client, Aws::PcaConnectorAd::Client, Aws::PcaConnectorScep::Client, Aws::Personalize::Client, Aws::PersonalizeEvents::Client, Aws::PersonalizeRuntime::Client, Aws::Pinpoint::Client, Aws::PinpointEmail::Client, Aws::PinpointSMSVoice::Client, Aws::PinpointSMSVoiceV2::Client, Aws::Pipes::Client, Aws::Polly::Client, Aws::Pricing::Client, Aws::PrivateNetworks::Client, Aws::PrometheusService::Client, Aws::Proton::Client, Aws::QApps::Client, Aws::QBusiness::Client, Aws::QConnect::Client, Aws::QLDB::Client, Aws::QLDBSession::Client, Aws::QuickSight::Client, Aws::RAM::Client, Aws::RDS::Client, Aws::RDSDataService::Client, Aws::RecycleBin::Client, Aws::Redshift::Client, Aws::RedshiftDataAPIService::Client, Aws::RedshiftServerless::Client, Aws::Rekognition::Client, Aws::Repostspace::Client, Aws::ResilienceHub::Client, Aws::ResourceExplorer2::Client, Aws::ResourceGroups::Client, Aws::ResourceGroupsTaggingAPI::Client, Aws::RoboMaker::Client, Aws::RolesAnywhere::Client, Aws::Route53::Client, Aws::Route53Domains::Client, Aws::Route53Profiles::Client, Aws::Route53RecoveryCluster::Client, Aws::Route53RecoveryControlConfig::Client, Aws::Route53RecoveryReadiness::Client, Aws::Route53Resolver::Client, Aws::S3::Client, Aws::S3Control::Client, Aws::S3Outposts::Client, Aws::S3Tables::Client, Aws::SES::Client, Aws::SESV2::Client, Aws::SMS::Client, Aws::SNS::Client, Aws::SQS::Client, Aws::SSM::Client, Aws::SSMContacts::Client, Aws::SSMIncidents::Client, Aws::SSMQuickSetup::Client, Aws::SSO::Client, Aws::SSOAdmin::Client, Aws::SSOOIDC::Client, Aws::STS::Client, Aws::SWF::Client, Aws::SageMaker::Client, Aws::SageMakerFeatureStoreRuntime::Client, Aws::SageMakerGeospatial::Client, Aws::SageMakerMetrics::Client, Aws::SageMakerRuntime::Client, Aws::SagemakerEdgeManager::Client, Aws::SavingsPlans::Client, Aws::Scheduler::Client, Aws::Schemas::Client, Aws::SecretsManager::Client, Aws::SecurityHub::Client, Aws::SecurityIR::Client, Aws::SecurityLake::Client, Aws::ServerlessApplicationRepository::Client, Aws::ServiceCatalog::Client, Aws::ServiceDiscovery::Client, Aws::ServiceQuotas::Client, Aws::Shield::Client, Aws::Signer::Client, Aws::SimSpaceWeaver::Client, Aws::SimpleDB::Client, Aws::SnowDeviceManagement::Client, Aws::Snowball::Client, Aws::SocialMessaging::Client, Aws::SsmSap::Client, Aws::States::Client, Aws::StorageGateway::Client, Aws::SupplyChain::Client, Aws::Support::Client, Aws::SupportApp::Client, Aws::Synthetics::Client, Aws::TaxSettings::Client, Aws::Textract::Client, Aws::TimestreamInfluxDB::Client, Aws::TimestreamQuery::Client, Aws::TimestreamWrite::Client, Aws::Tnb::Client, Aws::TranscribeService::Client, Aws::TranscribeStreamingService::Client, Aws::Transfer::Client, Aws::Translate::Client, Aws::TrustedAdvisor::Client, Aws::VPCLattice::Client, Aws::VerifiedPermissions::Client, Aws::VoiceID::Client, Aws::WAF::Client, Aws::WAFRegional::Client, Aws::WAFV2::Client, Aws::WellArchitected::Client, Aws::WorkDocs::Client, Aws::WorkMail::Client, Aws::WorkMailMessageFlow::Client, Aws::WorkSpaces::Client, Aws::WorkSpacesThinClient::Client, Aws::WorkSpacesWeb::Client, Aws::XRay::Client, AsyncBase
Instance Attribute Summary collapse
-
#config ⇒ Configuration<Struct>
readonly
-
#handlers ⇒ HandlerList
readonly
Class Method Summary collapse
-
.add_plugin(plugin) ⇒ void
Registers a plugin with this client.
-
.api ⇒ Model::Api
-
.clear_plugins ⇒ void
-
.define(options = {}) ⇒ Class<Client::Base>
(also: extend)
-
.new(options = {}) ⇒ Object
-
.plugins ⇒ Array<Plugin>
Returns the list of registered plugins for this Client.
-
.remove_plugin(plugin) ⇒ void
-
.set_api(api) ⇒ Model::Api
-
.set_plugins(plugins) ⇒ void
Instance Method Summary collapse
-
#build_request(operation_name, params = {}) ⇒ Request
Builds and returns a Request for the named operation.
-
#operation_names ⇒ Array<Symbol>
Returns a list of valid request operation names.
Methods included from HandlerBuilder
#handle, #handle_request, #handle_response
Instance Attribute Details
#config ⇒ Configuration<Struct> (readonly)
27 28 29 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 27 def config @config end |
#handlers ⇒ HandlerList (readonly)
30 31 32 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 30 def handlers @handlers end |
Class Method Details
.add_plugin(plugin) ⇒ void
This method returns an undefined value.
Registers a plugin with this client.
127 128 129 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 127 def add_plugin(plugin) @plugins.add(plugin) end |
.api ⇒ Model::Api
171 172 173 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 171 def api @api ||= Model::Api.new end |
.clear_plugins ⇒ void
This method returns an undefined value.
145 146 147 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 145 def clear_plugins @plugins.set([]) end |
.define(options = {}) ⇒ Class<Client::Base> Also known as: extend
187 188 189 190 191 192 193 194 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 187 def define( = {}) subclass = Class.new(self) subclass.set_api([:api] || api) Array([:plugins]).each do |plugin| subclass.add_plugin(plugin) end subclass end |
.new(options = {}) ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 97 def new( = {}) = .dup plugins = build_plugins(self.plugins + .fetch(:plugins, [])) plugins = before_initialize(plugins, ) client = allocate client.send(:initialize, plugins, ) client end |
.plugins ⇒ Array<Plugin>
Returns the list of registered plugins for this Client. Plugins are inherited from the client super class when the client is defined.
166 167 168 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 166 def plugins Array(@plugins).freeze end |
.remove_plugin(plugin) ⇒ void
This method returns an undefined value.
136 137 138 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 136 def remove_plugin(plugin) @plugins.remove(plugin) end |
.set_api(api) ⇒ Model::Api
177 178 179 180 181 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 177 def set_api(api) @api = api define_operation_methods @api end |
.set_plugins(plugins) ⇒ void
This method returns an undefined value.
155 156 157 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 155 def set_plugins(plugins) @plugins.set(plugins) end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Request
Builds and returns a Request for the named operation. The request will not have been sent.
36 37 38 39 40 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 36 def build_request(operation_name, params = {}) Request.new( @handlers.for(operation_name), context_for(operation_name, params)) end |
#operation_names ⇒ Array<Symbol>
Returns a list of valid request operation names. These are valid arguments to #build_request and are also valid methods.
50 51 52 |
# File 'gems/aws-sdk-core/lib/seahorse/client/base.rb', line 50 def operation_names self.class.api.operation_names - self.class.api.async_operation_names end |