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.AlexaForBusiness, AWS.Amplify, AWS.ApiGatewayManagementApi, AWS.ApiGatewayV2, AWS.AppMesh, AWS.AppMesh_20181001, AWS.AppStream, AWS.AppSync, AWS.ApplicationAutoScaling, AWS.Athena, AWS.AutoScaling, AWS.AutoScalingPlans, AWS.Backup, AWS.Batch, AWS.Budgets, AWS.CUR, AWS.Chime, AWS.Cloud9, AWS.CloudDirectory, AWS.CloudDirectory_20160510, AWS.CloudFormation, AWS.CloudFront, AWS.CloudFront_20161125, AWS.CloudFront_20170325, AWS.CloudFront_20171030, AWS.CloudFront_20180618, AWS.CloudHSM, AWS.CloudHSMV2, AWS.CloudSearch, AWS.CloudSearchDomain, AWS.CloudSearch_20110201, AWS.CloudTrail, AWS.CloudWatch, AWS.CloudWatchEvents, AWS.CloudWatchLogs, AWS.CodeBuild, AWS.CodeCommit, AWS.CodeDeploy, AWS.CodePipeline, AWS.CodeStar, AWS.CognitoIdentity, AWS.CognitoIdentityServiceProvider, AWS.CognitoSync, AWS.Comprehend, AWS.ComprehendMedical, AWS.ConfigService, AWS.Connect, AWS.CostExplorer, AWS.DAX, AWS.DLM, AWS.DMS, AWS.DataPipeline, AWS.DataSync, AWS.DeviceFarm, AWS.DirectConnect, AWS.DirectoryService, AWS.Discovery, AWS.DocDB, AWS.DynamoDB, AWS.DynamoDBStreams, AWS.DynamoDB_20111205, AWS.EC2, AWS.ECR, AWS.ECS, AWS.EFS, AWS.EKS, AWS.ELB, AWS.ELBv2, AWS.EMR, AWS.ES, AWS.ElastiCache, AWS.ElasticBeanstalk, AWS.ElasticTranscoder, AWS.FMS, AWS.FSx, AWS.Firehose, AWS.GameLift, AWS.Glacier, AWS.GlobalAccelerator, AWS.Glue, AWS.Greengrass, AWS.GuardDuty, AWS.Health, AWS.IAM, AWS.ImportExport, AWS.Inspector, AWS.IoT1ClickDevicesService, AWS.IoT1ClickProjects, AWS.IoTAnalytics, AWS.IoTJobsDataPlane, AWS.Iot, AWS.IotData, AWS.KMS, AWS.Kafka, AWS.Kinesis, AWS.KinesisAnalytics, AWS.KinesisAnalyticsV2, AWS.KinesisVideo, AWS.KinesisVideoArchivedMedia, AWS.KinesisVideoMedia, AWS.Lambda, AWS.Lambda_20141111, AWS.LexModelBuildingService, AWS.LexRuntime, AWS.LicenseManager, AWS.Lightsail, AWS.MQ, AWS.MTurk, AWS.MachineLearning, AWS.Macie, AWS.ManagedBlockchain, AWS.MarketplaceCommerceAnalytics, AWS.MarketplaceEntitlementService, AWS.MarketplaceMetering, AWS.MediaConnect, AWS.MediaConvert, AWS.MediaLive, AWS.MediaPackage, AWS.MediaStore, AWS.MediaStoreData, AWS.MediaTailor, AWS.MigrationHub, AWS.Mobile, AWS.MobileAnalytics, AWS.Neptune, AWS.OpsWorks, AWS.OpsWorksCM, AWS.Organizations, AWS.PI, AWS.Pinpoint, AWS.PinpointEmail, AWS.PinpointSMSVoice, AWS.Polly, AWS.Pricing, AWS.QuickSight, AWS.RAM, AWS.RDS, AWS.RDSDataService, AWS.RDS_20130110, AWS.RDS_20130212, AWS.RDS_20130909, AWS.RDS_20140901, AWS.Redshift, AWS.Rekognition, AWS.ResourceGroups, AWS.ResourceGroupsTaggingAPI, AWS.RoboMaker, AWS.Route53, AWS.Route53Domains, AWS.Route53Resolver, AWS.S3, AWS.S3Control, AWS.SES, AWS.SMS, AWS.SNS, AWS.SQS, AWS.SSM, AWS.STS, AWS.SWF, AWS.SageMaker, AWS.SageMakerRuntime, AWS.SecretsManager, AWS.SecurityHub, AWS.ServerlessApplicationRepository, AWS.ServiceCatalog, AWS.ServiceDiscovery, AWS.Shield, AWS.Signer, AWS.SimpleDB, AWS.Snowball, AWS.StepFunctions, AWS.StorageGateway, AWS.Support, AWS.Textract, AWS.TranscribeService, AWS.Transfer, AWS.Translate, AWS.WAF, AWS.WAFRegional, AWS.WorkDocs, AWS.WorkLink, AWS.WorkMail, AWS.WorkSpaces, AWS.XRay

Constructor Summary

Property Summary

Method Summary

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