You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

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.AccessAnalyzer, AWS.Account, AWS.AlexaForBusiness, AWS.Amp, AWS.Amplify, AWS.AmplifyBackend, AWS.ApiGatewayManagementApi, AWS.ApiGatewayV2, AWS.AppConfig, AWS.AppIntegrations, AWS.AppMesh, AWS.AppMesh_20181001, AWS.AppRunner, AWS.AppStream, AWS.AppSync, AWS.Appflow, AWS.ApplicationAutoScaling, AWS.ApplicationCostProfiler, AWS.ApplicationInsights, AWS.Athena, AWS.AuditManager, AWS.AugmentedAIRuntime, AWS.AutoScaling, AWS.AutoScalingPlans, AWS.Backup, AWS.Batch, AWS.Braket, AWS.Budgets, AWS.CUR, AWS.Chime, AWS.ChimeSDKIdentity, AWS.ChimeSDKMeetings, AWS.ChimeSDKMessaging, 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.CloudWatch, AWS.CloudWatchEvents, AWS.CloudWatchLogs, AWS.CodeArtifact, AWS.CodeBuild, AWS.CodeCommit, AWS.CodeDeploy, AWS.CodeGuruProfiler, AWS.CodeGuruReviewer, AWS.CodePipeline, AWS.CodeStar, AWS.CodeStarNotifications, AWS.CodeStarconnections, AWS.CognitoIdentity, AWS.CognitoIdentityServiceProvider, AWS.CognitoSync, AWS.Comprehend, AWS.ComprehendMedical, AWS.ComputeOptimizer, AWS.ConfigService, AWS.Connect, AWS.ConnectContactLens, AWS.ConnectParticipant, AWS.CostExplorer, AWS.CustomerProfiles, AWS.DAX, AWS.DLM, AWS.DMS, AWS.DataBrew, AWS.DataExchange, AWS.DataPipeline, AWS.DataSync, AWS.Detective, AWS.DevOpsGuru, AWS.DeviceFarm, AWS.DirectConnect, AWS.DirectoryService, AWS.Discovery, AWS.DocDB, AWS.DynamoDB, AWS.DynamoDBStreams, AWS.DynamoDB_20111205, AWS.EBS, AWS.EC2, AWS.EC2InstanceConnect, AWS.ECR, AWS.ECRPUBLIC, AWS.ECS, AWS.EFS, AWS.EKS, AWS.ELB, AWS.ELBv2, AWS.EMR, AWS.EMRcontainers, AWS.ES, AWS.ElastiCache, AWS.ElasticBeanstalk, AWS.ElasticInference, AWS.ElasticTranscoder, AWS.EventBridge, AWS.FMS, AWS.FSx, AWS.Finspace, AWS.Finspacedata, AWS.Firehose, AWS.Fis, AWS.ForecastQueryService, AWS.ForecastService, AWS.FraudDetector, AWS.GameLift, AWS.Glacier, AWS.GlobalAccelerator, AWS.Glue, AWS.Grafana, AWS.Greengrass, AWS.GreengrassV2, AWS.GroundStation, AWS.GuardDuty, AWS.Health, AWS.HealthLake, AWS.Honeycode, AWS.IAM, AWS.IVS, AWS.IdentityStore, AWS.Imagebuilder, AWS.ImportExport, AWS.Inspector, AWS.IoT1ClickDevicesService, AWS.IoT1ClickProjects, AWS.IoTAnalytics, AWS.IoTEvents, AWS.IoTEventsData, AWS.IoTFleetHub, AWS.IoTJobsDataPlane, AWS.IoTSecureTunneling, AWS.IoTSiteWise, AWS.IoTThingsGraph, AWS.IoTWireless, AWS.Iot, AWS.IotData, AWS.IotDeviceAdvisor, AWS.KMS, AWS.Kafka, AWS.KafkaConnect, AWS.Kendra, AWS.Kinesis, AWS.KinesisAnalytics, AWS.KinesisAnalyticsV2, AWS.KinesisVideo, AWS.KinesisVideoArchivedMedia, AWS.KinesisVideoMedia, AWS.KinesisVideoSignalingChannels, AWS.LakeFormation, AWS.Lambda, AWS.Lambda_20141111, AWS.LexModelBuildingService, AWS.LexModelsV2, AWS.LexRuntime, AWS.LexRuntimeV2, AWS.LicenseManager, AWS.Lightsail, AWS.Location, AWS.LookoutEquipment, AWS.LookoutMetrics, AWS.LookoutVision, AWS.MQ, AWS.MTurk, AWS.MWAA, AWS.MachineLearning, AWS.Macie, AWS.Macie2, AWS.ManagedBlockchain, AWS.MarketplaceCatalog, AWS.MarketplaceCommerceAnalytics, AWS.MarketplaceEntitlementService, AWS.MarketplaceMetering, AWS.MediaConnect, AWS.MediaConvert, AWS.MediaLive, AWS.MediaPackage, AWS.MediaPackageVod, AWS.MediaStore, AWS.MediaStoreData, AWS.MediaTailor, AWS.MemoryDB, AWS.Mgn, AWS.MigrationHub, AWS.MigrationHubConfig, AWS.Mobile, AWS.MobileAnalytics, AWS.Neptune, AWS.NetworkFirewall, AWS.NetworkManager, AWS.Nimble, AWS.OpenSearch, AWS.OpsWorks, AWS.OpsWorksCM, AWS.Organizations, AWS.Outposts, AWS.PI, AWS.Panorama, AWS.Personalize, AWS.PersonalizeEvents, AWS.PersonalizeRuntime, AWS.Pinpoint, AWS.PinpointEmail, AWS.PinpointSMSVoice, AWS.Polly, AWS.Pricing, AWS.Proton, 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.Redshift, AWS.RedshiftData, AWS.Rekognition, AWS.Resiliencehub, AWS.ResourceGroups, AWS.ResourceGroupsTaggingAPI, AWS.RoboMaker, AWS.Route53, AWS.Route53Domains, 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.SSO, AWS.SSOAdmin, AWS.SSOOIDC, AWS.STS, AWS.SWF, AWS.SageMaker, AWS.SageMakerFeatureStoreRuntime, AWS.SageMakerRuntime, AWS.SagemakerEdge, AWS.SavingsPlans, AWS.Schemas, AWS.SecretsManager, AWS.SecurityHub, AWS.ServerlessApplicationRepository, AWS.ServiceCatalog, AWS.ServiceCatalogAppRegistry, AWS.ServiceDiscovery, AWS.ServiceQuotas, AWS.Shield, AWS.Signer, AWS.SimpleDB, AWS.SnowDeviceManagement, AWS.Snowball, AWS.StepFunctions, AWS.StorageGateway, AWS.Support, AWS.Synthetics, AWS.Textract, AWS.TimestreamQuery, AWS.TimestreamWrite, AWS.TranscribeService, AWS.Transfer, AWS.Translate, AWS.VoiceID, AWS.WAF, AWS.WAFRegional, AWS.WAFV2, AWS.WellArchitected, AWS.Wisdom, AWS.WorkDocs, AWS.WorkLink, AWS.WorkMail, AWS.WorkMailMessageFlow, AWS.WorkSpaces, 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