The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.Service

Inherits:
Object
  • Object
show all
Defined in:
lib/service.js

Overview

The service class representing an AWS service.

Abstract Class:

  • This class is an abstract class.

Direct Known Subclasses

AWS.ACM, AWS.ACMPCA, AWS.APIGateway, AWS.ARCZonalShift, AWS.AccessAnalyzer, AWS.Account, AWS.Amp, AWS.Amplify, AWS.AmplifyBackend, AWS.AmplifyUIBuilder, AWS.ApiGatewayManagementApi, AWS.ApiGatewayV2, AWS.AppConfig, AWS.AppConfigData, AWS.AppFabric, AWS.AppIntegrations, AWS.AppMesh, AWS.AppMesh_20181001, AWS.AppRunner, AWS.AppStream, AWS.AppSync, AWS.AppTest, AWS.Appflow, AWS.ApplicationAutoScaling, AWS.ApplicationCostProfiler, AWS.ApplicationInsights, AWS.ApplicationSignals, AWS.Artifact, AWS.Athena, AWS.AuditManager, AWS.AugmentedAIRuntime, AWS.AutoScaling, AWS.AutoScalingPlans, AWS.B2bi, AWS.BCMDataExports, AWS.Backup, AWS.BackupGateway, AWS.Batch, AWS.Bedrock, AWS.BedrockAgent, AWS.BedrockAgentRuntime, AWS.BedrockRuntime, AWS.Billingconductor, AWS.Braket, AWS.Budgets, AWS.CUR, AWS.Chatbot, AWS.Chime, AWS.ChimeSDKIdentity, AWS.ChimeSDKMediaPipelines, AWS.ChimeSDKMeetings, AWS.ChimeSDKMessaging, AWS.ChimeSDKVoice, AWS.CleanRooms, AWS.CleanRoomsML, AWS.Cloud9, AWS.CloudControl, AWS.CloudDirectory, AWS.CloudDirectory_20160510, AWS.CloudFormation, AWS.CloudFront, AWS.CloudFront_20161125, AWS.CloudFront_20170325, AWS.CloudFront_20171030, AWS.CloudFront_20180618, AWS.CloudFront_20181105, AWS.CloudFront_20190326, AWS.CloudHSM, AWS.CloudHSMV2, AWS.CloudSearch, AWS.CloudSearchDomain, AWS.CloudSearch_20110201, AWS.CloudTrail, AWS.CloudTrailData, AWS.CloudWatch, AWS.CloudWatchEvents, AWS.CloudWatchLogs, AWS.CodeArtifact, AWS.CodeBuild, AWS.CodeCatalyst, AWS.CodeCommit, AWS.CodeConnections, AWS.CodeDeploy, AWS.CodeGuruProfiler, AWS.CodeGuruReviewer, AWS.CodeGuruSecurity, AWS.CodePipeline, AWS.CodeStarNotifications, AWS.CodeStarconnections, AWS.CognitoIdentity, AWS.CognitoIdentityServiceProvider, AWS.CognitoSync, AWS.Comprehend, AWS.ComprehendMedical, AWS.ComputeOptimizer, AWS.ConfigService, AWS.Connect, AWS.ConnectCampaigns, AWS.ConnectCases, AWS.ConnectContactLens, AWS.ConnectParticipant, AWS.ControlCatalog, AWS.ControlTower, AWS.CostExplorer, AWS.CostOptimizationHub, AWS.CustomerProfiles, AWS.DAX, AWS.DLM, AWS.DMS, AWS.DataBrew, AWS.DataExchange, AWS.DataPipeline, AWS.DataSync, AWS.DataZone, AWS.Deadline, AWS.Detective, AWS.DevOpsGuru, AWS.DeviceFarm, AWS.DirectConnect, AWS.DirectoryService, AWS.Discovery, AWS.DocDB, AWS.DocDBElastic, AWS.Drs, AWS.DynamoDB, AWS.DynamoDBStreams, AWS.DynamoDB_20111205, AWS.EBS, AWS.EC2, AWS.EC2InstanceConnect, AWS.ECR, AWS.ECRPUBLIC, AWS.ECS, AWS.EFS, AWS.EKS, AWS.EKSAuth, AWS.ELB, AWS.ELBv2, AWS.EMR, AWS.EMRServerless, AWS.EMRcontainers, AWS.ES, AWS.ElastiCache, AWS.ElasticBeanstalk, AWS.ElasticInference, AWS.ElasticTranscoder, AWS.EntityResolution, AWS.EventBridge, AWS.Evidently, AWS.FMS, AWS.FSx, AWS.Finspace, AWS.Finspacedata, AWS.Firehose, AWS.Fis, AWS.ForecastQueryService, AWS.ForecastService, AWS.FraudDetector, AWS.FreeTier, AWS.GameLift, AWS.Glacier, AWS.GlobalAccelerator, AWS.Glue, AWS.Grafana, AWS.Greengrass, AWS.GreengrassV2, AWS.GroundStation, AWS.GuardDuty, AWS.Health, AWS.HealthLake, AWS.IAM, AWS.IVS, AWS.IVSRealTime, AWS.IdentityStore, AWS.Imagebuilder, AWS.ImportExport, AWS.Inspector, AWS.Inspector2, AWS.InspectorScan, AWS.InternetMonitor, AWS.IoT1ClickDevicesService, AWS.IoT1ClickProjects, AWS.IoTAnalytics, AWS.IoTEvents, AWS.IoTEventsData, AWS.IoTFleetHub, AWS.IoTFleetWise, AWS.IoTJobsDataPlane, AWS.IoTSecureTunneling, AWS.IoTSiteWise, AWS.IoTThingsGraph, AWS.IoTTwinMaker, AWS.IoTWireless, AWS.Iot, AWS.IotData, AWS.IotDeviceAdvisor, AWS.Ivschat, AWS.KMS, AWS.Kafka, AWS.KafkaConnect, AWS.Kendra, AWS.KendraRanking, AWS.Keyspaces, AWS.Kinesis, AWS.KinesisAnalytics, AWS.KinesisAnalyticsV2, AWS.KinesisVideo, AWS.KinesisVideoArchivedMedia, AWS.KinesisVideoMedia, AWS.KinesisVideoSignalingChannels, AWS.KinesisVideoWebRTCStorage, AWS.LakeFormation, AWS.Lambda, AWS.Lambda_20141111, AWS.LaunchWizard, AWS.LexModelBuildingService, AWS.LexModelsV2, AWS.LexRuntime, AWS.LexRuntimeV2, AWS.LicenseManager, AWS.LicenseManagerLinuxSubscriptions, AWS.LicenseManagerUserSubscriptions, AWS.Lightsail, AWS.Location, AWS.LookoutEquipment, AWS.LookoutMetrics, AWS.LookoutVision, AWS.M2, AWS.MQ, AWS.MTurk, AWS.MWAA, AWS.MachineLearning, AWS.Macie2, AWS.MailManager, AWS.ManagedBlockchain, AWS.ManagedBlockchainQuery, AWS.MarketplaceAgreement, AWS.MarketplaceCatalog, AWS.MarketplaceCommerceAnalytics, AWS.MarketplaceDeployment, AWS.MarketplaceEntitlementService, AWS.MarketplaceMetering, AWS.MediaConnect, AWS.MediaConvert, AWS.MediaLive, AWS.MediaPackage, AWS.MediaPackageV2, AWS.MediaPackageVod, AWS.MediaStore, AWS.MediaStoreData, AWS.MediaTailor, AWS.MedicalImaging, AWS.MemoryDB, AWS.Mgn, AWS.MigrationHub, AWS.MigrationHubConfig, AWS.MigrationHubOrchestrator, AWS.MigrationHubRefactorSpaces, AWS.MigrationHubStrategy, AWS.MobileAnalytics, AWS.Neptune, AWS.Neptunedata, AWS.NetworkFirewall, AWS.NetworkManager, AWS.NetworkMonitor, AWS.Nimble, AWS.OAM, AWS.OSIS, AWS.Omics, AWS.OpenSearch, AWS.OpenSearchServerless, AWS.OpsWorks, AWS.OpsWorksCM, AWS.Organizations, AWS.Outposts, AWS.PCS, AWS.PI, AWS.Panorama, AWS.PaymentCryptography, AWS.PaymentCryptographyData, AWS.PcaConnectorAd, AWS.PcaConnectorScep, AWS.Personalize, AWS.PersonalizeEvents, AWS.PersonalizeRuntime, AWS.Pinpoint, AWS.PinpointEmail, AWS.PinpointSMSVoice, AWS.PinpointSMSVoiceV2, AWS.Pipes, AWS.Polly, AWS.Pricing, AWS.PrivateNetworks, AWS.Proton, AWS.QApps, AWS.QBusiness, AWS.QConnect, AWS.QLDB, AWS.QLDBSession, AWS.QuickSight, AWS.RAM, AWS.RDS, AWS.RDSDataService, AWS.RDS_20130110, AWS.RDS_20130212, AWS.RDS_20130909, AWS.RDS_20140901, AWS.RUM, AWS.Rbin, AWS.Redshift, AWS.RedshiftData, AWS.RedshiftServerless, AWS.Rekognition, AWS.Repostspace, AWS.Resiliencehub, AWS.ResourceExplorer2, AWS.ResourceGroups, AWS.ResourceGroupsTaggingAPI, AWS.RoboMaker, AWS.RolesAnywhere, AWS.Route53, AWS.Route53Domains, AWS.Route53Profiles, AWS.Route53RecoveryCluster, AWS.Route53RecoveryControlConfig, AWS.Route53RecoveryReadiness, AWS.Route53Resolver, AWS.S3, AWS.S3Control, AWS.S3Outposts, AWS.SES, AWS.SESV2, AWS.SMS, AWS.SNS, AWS.SQS, AWS.SSM, AWS.SSMContacts, AWS.SSMIncidents, AWS.SSMQuickSetup, AWS.SSO, AWS.SSOAdmin, AWS.SSOOIDC, AWS.STS, AWS.SWF, AWS.SageMaker, AWS.SageMakerFeatureStoreRuntime, AWS.SageMakerGeospatial, AWS.SageMakerMetrics, AWS.SageMakerRuntime, AWS.SagemakerEdge, AWS.SavingsPlans, AWS.Scheduler, AWS.Schemas, AWS.SecretsManager, AWS.SecurityHub, AWS.SecurityLake, AWS.ServerlessApplicationRepository, AWS.ServiceCatalog, AWS.ServiceCatalogAppRegistry, AWS.ServiceDiscovery, AWS.ServiceQuotas, AWS.Shield, AWS.Signer, AWS.SimSpaceWeaver, AWS.SimpleDB, AWS.SnowDeviceManagement, AWS.Snowball, AWS.SsmSap, AWS.StepFunctions, AWS.StorageGateway, AWS.SupplyChain, AWS.Support, AWS.SupportApp, AWS.Synthetics, AWS.TaxSettings, AWS.Textract, AWS.TimestreamInfluxDB, AWS.TimestreamQuery, AWS.TimestreamWrite, AWS.Tnb, AWS.TranscribeService, AWS.Transfer, AWS.Translate, AWS.TrustedAdvisor, AWS.VPCLattice, AWS.VerifiedPermissions, AWS.VoiceID, AWS.WAF, AWS.WAFRegional, AWS.WAFV2, AWS.WellArchitected, AWS.Wisdom, AWS.WorkDocs, AWS.WorkLink, AWS.WorkMail, AWS.WorkMailMessageFlow, AWS.WorkSpaces, AWS.WorkSpacesThinClient, AWS.WorkSpacesWeb, AWS.XRay

Constructor Summary collapse

Property Summary collapse

Method Summary collapse

Constructor Details

new AWS.Service(config) ⇒ void

Create a new service object with a configuration object

Parameters:

  • config (map)

    a map of configuration options

Property Details

apiVersionsArray<String> (readonly)

Returns the list of API versions supported by this service.

Returns:

  • (Array<String>)

    the list of API versions supported by this service.

Method Details

defineService(serviceIdentifier, versions, features) ⇒ Class<Service>

Defines a new Service class using a service identifier and list of versions including an optional set of features (functions) to apply to the class prototype.

Parameters:

  • serviceIdentifier (String)

    the identifier for the service

  • versions (Array<String>)

    a list of versions that work with this service

  • features (Object)

    an object to attach to the prototype

Returns:

  • (Class<Service>)

    the service class defined by this function.

makeRequest(operation, params, callback) ⇒ void

Calls an operation on a service with the given input parameters.

Parameters:

  • operation (String)

    the name of the operation to call on the service.

  • params (map)

    a map of input options for the operation

Callback (callback):

  • function(err, data) { ... }

    If a callback is supplied, it is called when a response is returned from the service.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

makeUnauthenticatedRequest(operation, params, callback) ⇒ void

Calls an operation on a service with the given input parameters, without any authentication data. This method is useful for "public" API operations.

Parameters:

  • operation (String)

    the name of the operation to call on the service.

  • params (map)

    a map of input options for the operation

Callback (callback):

  • function(err, data) { ... }

    If a callback is supplied, it is called when a response is returned from the service.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

setupRequestListeners(request) ⇒ void

Override this method to setup any custom request listeners for each new request to the service.

Abstract Method:

  • This is an abstract method.

waitFor(state, params, callback) ⇒ void

Waits for a given state

Parameters:

  • state (String)

    the state on the service to wait for

  • params (map)

    a map of parameters to pass with each request

Callback (callback):

  • function(err, data) { ... }

    If a callback is supplied, it is called when a response is returned from the service.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Options Hash (params):

  • $waiter (map)

    a map of configuration options for the waiter

  • $waiter.delay (Number)

    The number of seconds to wait between requests

  • $waiter.maxAttempts (Number)

    The maximum number of requests to send while waiting