Options
All
  • Public
  • Public/Protected
  • All
Menu

CloudWatch Client - AWS SDK for JavaScript v3

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AlarmType

AlarmType: "CompositeAlarm" | "MetricAlarm"

AnomalyDetectorStateValue

AnomalyDetectorStateValue: "PENDING_TRAINING" | "TRAINED" | "TRAINED_INSUFFICIENT_DATA"

CloudWatchClientConfigType

CloudWatchClientConfigType: Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig

CloudWatchClientResolvedConfigType

CloudWatchClientResolvedConfigType: __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig

ComparisonOperator

ComparisonOperator: "GreaterThanOrEqualToThreshold" | "GreaterThanThreshold" | "GreaterThanUpperThreshold" | "LessThanLowerOrGreaterThanUpperThreshold" | "LessThanLowerThreshold" | "LessThanOrEqualToThreshold" | "LessThanThreshold"

CredentialProvider

CredentialProvider: Provider<Credentials>

DateInput

DateInput: number | string | Date

A {Date} object, a unix (epoch) timestamp in seconds, or a string that can be understood by the JavaScript {Date} constructor.

DocumentType

DocumentType: null | boolean | number | string | DocumentType[] | {}

A document type represents an untyped JSON-like value. Not all protocols support document types, and the serialization format of a document type is protocol specific. All JSON protocols SHOULD support document types and they SHOULD serialize document types inline as normal JSON values.

EndpointVariant

EndpointVariant: { hostname: string; tags: EndpointVariantTag[] }

Provides hostname information for specific host label.

Type declaration

EndpointVariantTag

EndpointVariantTag: "fips" | "dualstack"

The tag which mentions which area variant is providing information for. Can be either "fips" or "dualstack".

FromStaticConfig

FromStaticConfig<T>: T | (() => T)

Type parameters

  • T

GetterFromConfig

GetterFromConfig<T>: (profile: Profile) => T | undefined

Type parameters

  • T

Type declaration

    • (profile: Profile): T | undefined
    • Parameters

      Returns T | undefined

GetterFromEnv

GetterFromEnv<T>: (env: ProcessEnv) => T | undefined

Type parameters

  • T

Type declaration

    • (env: ProcessEnv): T | undefined
    • Parameters

      • env: ProcessEnv

      Returns T | undefined

Handler

Handler<Input, Output>: InitializeHandler<Input, Output>

Type parameters

  • Input: object

  • Output: object

HistoryItemType

HistoryItemType: "Action" | "ConfigurationUpdate" | "StateUpdate"

HttpHandler

HttpHandler: RequestHandler<HttpRequest, HttpResponse, HttpHandlerOptions>

HttpRequestOptions

HttpRequestOptions: Partial<HttpMessage> & Partial<Endpoint> & { method?: undefined | string }

HttpResponseOptions

HttpResponseOptions: Partial<HttpMessage> & { statusCode: number }

LocalConfigOptions

LocalConfigOptions: SharedConfigInit

LogLevel

LogLevel: "all" | "log" | "info" | "warn" | "error" | "off"

A list of logger's log level. These levels are sorted in order of increasing severity. Each log level includes itself and all the levels behind itself.

example

new Logger({logLevel: 'warn'}) will print all the warn and error message.

LowerCaseKey

LowerCaseKey<T>: {}

Type parameters

  • T

Type declaration

MessageHeaderValue

MiddlewareType

MiddlewareType<Input, Output>: InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>

Type parameters

  • Input: object

  • Output: object

Paginator

Paginator<T>: AsyncGenerator<T, T, unknown>

Expected type definition of a paginator.

Type parameters

  • T

PartitionHash

PartitionHash: {}

The hash of partition with the information specific to that partition. The information includes the list of regions belonging to that partition, and the hostname to be used for the partition.

Type declaration

  • [key: string]: { endpoint?: undefined | string; regionRegex: string; regions: string[]; variants: EndpointVariant[] }
    • Optional endpoint?: undefined | string
    • regionRegex: string
    • regions: string[]
    • variants: EndpointVariant[]

Priority

Priority: "high" | "normal" | "low"

RegionHash

RegionHash: {}

The hash of region with the information specific to that region. The information can include hostname, signingService and signingRegion.

Type declaration

  • [key: string]: { signingRegion?: undefined | string; signingService?: undefined | string; variants: EndpointVariant[] }
    • Optional signingRegion?: undefined | string
    • Optional signingService?: undefined | string
    • variants: EndpointVariant[]

Relation

Relation: "before" | "after"

RelativeMiddlewareOptions

RelativeMiddlewareOptions: RelativeLocation & Omit<HandlerOptions, "step">

RemoteProviderInit

RemoteProviderInit: Partial<RemoteProviderConfig>

RequestHandlerOutput

RequestHandlerOutput<ResponseType>: { response: ResponseType }

Type parameters

  • ResponseType

Type declaration

  • response: ResponseType

SSOClientConfigType

SSOClientConfigType: Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig

SSOClientResolvedConfigType

SSOClientResolvedConfigType: __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig

STSClientConfigType

STSClientConfigType: Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & StsAuthInputConfig & UserAgentInputConfig

STSClientResolvedConfigType

STSClientResolvedConfigType: __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & StsAuthResolvedConfig & UserAgentResolvedConfig

SdkError

SdkError: Error & Partial<SmithyException> & Partial<MetadataBearer>

ServiceInputTypes

ServiceInputTypes: DeleteAlarmsCommandInput | DeleteAnomalyDetectorCommandInput | DeleteDashboardsCommandInput | DeleteInsightRulesCommandInput | DeleteMetricStreamCommandInput | DescribeAlarmHistoryCommandInput | DescribeAlarmsCommandInput | DescribeAlarmsForMetricCommandInput | DescribeAnomalyDetectorsCommandInput | DescribeInsightRulesCommandInput | DisableAlarmActionsCommandInput | DisableInsightRulesCommandInput | EnableAlarmActionsCommandInput | EnableInsightRulesCommandInput | GetDashboardCommandInput | GetInsightRuleReportCommandInput | GetMetricDataCommandInput | GetMetricStatisticsCommandInput | GetMetricStreamCommandInput | GetMetricWidgetImageCommandInput | ListDashboardsCommandInput | ListMetricStreamsCommandInput | ListMetricsCommandInput | ListTagsForResourceCommandInput | PutAnomalyDetectorCommandInput | PutCompositeAlarmCommandInput | PutDashboardCommandInput | PutInsightRuleCommandInput | PutMetricAlarmCommandInput | PutMetricDataCommandInput | PutMetricStreamCommandInput | SetAlarmStateCommandInput | StartMetricStreamsCommandInput | StopMetricStreamsCommandInput | TagResourceCommandInput | UntagResourceCommandInput

ServiceOutputTypes

ServiceOutputTypes: DeleteAlarmsCommandOutput | DeleteAnomalyDetectorCommandOutput | DeleteDashboardsCommandOutput | DeleteInsightRulesCommandOutput | DeleteMetricStreamCommandOutput | DescribeAlarmHistoryCommandOutput | DescribeAlarmsCommandOutput | DescribeAlarmsForMetricCommandOutput | DescribeAnomalyDetectorsCommandOutput | DescribeInsightRulesCommandOutput | DisableAlarmActionsCommandOutput | DisableInsightRulesCommandOutput | EnableAlarmActionsCommandOutput | EnableInsightRulesCommandOutput | GetDashboardCommandOutput | GetInsightRuleReportCommandOutput | GetMetricDataCommandOutput | GetMetricStatisticsCommandOutput | GetMetricStreamCommandOutput | GetMetricWidgetImageCommandOutput | ListDashboardsCommandOutput | ListMetricStreamsCommandOutput | ListMetricsCommandOutput | ListTagsForResourceCommandOutput | PutAnomalyDetectorCommandOutput | PutCompositeAlarmCommandOutput | PutDashboardCommandOutput | PutInsightRuleCommandOutput | PutMetricAlarmCommandOutput | PutMetricDataCommandOutput | PutMetricStreamCommandOutput | SetAlarmStateCommandOutput | StartMetricStreamsCommandOutput | StopMetricStreamsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput

SmithyResolvedConfiguration

SmithyResolvedConfiguration<HandlerOptions>: SmithyConfiguration<HandlerOptions>

Type parameters

  • HandlerOptions

SourceData

SourceData: string | ArrayBuffer | ArrayBufferView

StandardUnit

StandardUnit: "Bits" | "Bits/Second" | "Bytes" | "Bytes/Second" | "Count" | "Count/Second" | "Gigabits" | "Gigabits/Second" | "Gigabytes" | "Gigabytes/Second" | "Kilobits" | "Kilobits/Second" | "Kilobytes" | "Kilobytes/Second" | "Megabits" | "Megabits/Second" | "Megabytes" | "Megabytes/Second" | "Microseconds" | "Milliseconds" | "None" | "Percent" | "Seconds" | "Terabits" | "Terabits/Second" | "Terabytes" | "Terabytes/Second"

StateValue

StateValue: "ALARM" | "INSUFFICIENT_DATA" | "OK"

Statistic

Statistic: "Average" | "Maximum" | "Minimum" | "SampleCount" | "Sum"

Step

Step: "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize"

UserAgent

UserAgent: UserAgentPair[]

User agent data that to be put into the request's user agent.

UserAgentPair

UserAgentPair: [name: string, version?: string]

A tuple that represents an API name and optional version of a library built using the AWS SDK.

WaiterResult

WaiterResult: { reason?: any; state: WaiterState }

Type declaration

  • Optional reason?: any

    (optional) Indicates a reason for why a waiter has reached its state.

  • state: WaiterState

Variables

Const CONFIG_MAX_ATTEMPTS

CONFIG_MAX_ATTEMPTS: "max_attempts" = "max_attempts"

Const CONFIG_RETRY_MODE

CONFIG_RETRY_MODE: "retry_mode" = "retry_mode"

Const CONFIG_USE_DUALSTACK_ENDPOINT

CONFIG_USE_DUALSTACK_ENDPOINT: "use_dualstack_endpoint" = "use_dualstack_endpoint"

Const CONFIG_USE_FIPS_ENDPOINT

CONFIG_USE_FIPS_ENDPOINT: "use_fips_endpoint" = "use_fips_endpoint"

Const DEFAULT_MAX_ATTEMPTS

DEFAULT_MAX_ATTEMPTS: 3 = 3

The default value for how many HTTP requests an SDK should make for a single SDK operation invocation before giving up

Const DEFAULT_MAX_RETRIES

DEFAULT_MAX_RETRIES: 0 = 0

Const DEFAULT_PROFILE

DEFAULT_PROFILE: "default" = "default"

Const DEFAULT_RETRY_MODE

DEFAULT_RETRY_MODE: STANDARD = RETRY_MODES.STANDARD

The default retry algorithm to use.

Const DEFAULT_TIMEOUT

DEFAULT_TIMEOUT: 1000 = 1000

Const DEFAULT_USE_DUALSTACK_ENDPOINT

DEFAULT_USE_DUALSTACK_ENDPOINT: false = false

Const DEFAULT_USE_FIPS_ENDPOINT

DEFAULT_USE_FIPS_ENDPOINT: false = false

Const ENV_CMDS_AUTH_TOKEN

ENV_CMDS_AUTH_TOKEN: "AWS_CONTAINER_AUTHORIZATION_TOKEN" = "AWS_CONTAINER_AUTHORIZATION_TOKEN"

Const ENV_CMDS_FULL_URI

ENV_CMDS_FULL_URI: "AWS_CONTAINER_CREDENTIALS_FULL_URI" = "AWS_CONTAINER_CREDENTIALS_FULL_URI"

Const ENV_CMDS_RELATIVE_URI

ENV_CMDS_RELATIVE_URI: "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"

Const ENV_CONFIG_PATH

ENV_CONFIG_PATH: "AWS_CONFIG_FILE" = "AWS_CONFIG_FILE"

Const ENV_CREDENTIALS_PATH

ENV_CREDENTIALS_PATH: "AWS_SHARED_CREDENTIALS_FILE" = "AWS_SHARED_CREDENTIALS_FILE"

Const ENV_IMDS_DISABLED

ENV_IMDS_DISABLED: "AWS_EC2_METADATA_DISABLED" = "AWS_EC2_METADATA_DISABLED"

Const ENV_MAX_ATTEMPTS

ENV_MAX_ATTEMPTS: "AWS_MAX_ATTEMPTS" = "AWS_MAX_ATTEMPTS"

Const ENV_RETRY_MODE

ENV_RETRY_MODE: "AWS_RETRY_MODE" = "AWS_RETRY_MODE"

Const ENV_USE_DUALSTACK_ENDPOINT

ENV_USE_DUALSTACK_ENDPOINT: "AWS_USE_DUALSTACK_ENDPOINT" = "AWS_USE_DUALSTACK_ENDPOINT"

Const ENV_USE_FIPS_ENDPOINT

ENV_USE_FIPS_ENDPOINT: "AWS_USE_FIPS_ENDPOINT" = "AWS_USE_FIPS_ENDPOINT"

Const NODE_MAX_ATTEMPT_CONFIG_OPTIONS

NODE_MAX_ATTEMPT_CONFIG_OPTIONS: LoadedConfigSelectors<number>

Const NODE_REGION_CONFIG_FILE_OPTIONS

NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions

Const NODE_REGION_CONFIG_OPTIONS

NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<string>

Const NODE_RETRY_MODE_CONFIG_OPTIONS

NODE_RETRY_MODE_CONFIG_OPTIONS: LoadedConfigSelectors<string>

Const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS

NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors<boolean>

Const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS

NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: LoadedConfigSelectors<boolean>

Const REGION_ENV_NAME

REGION_ENV_NAME: "AWS_REGION" = "AWS_REGION"

Const REGION_INI_NAME

REGION_INI_NAME: "region" = "region"

Const SENSITIVE_STRING

SENSITIVE_STRING: "***SensitiveInformation***" = "***SensitiveInformation***"

Const StringWrapper

StringWrapper: StringWrapper

Because of https://github.com/microsoft/tslib/issues/95, TS 'extends' shim doesn't support extending native types like String. So here we create StringWrapper that duplicate everything from String class including its prototype chain. So we can extend from here.

Const UA_APP_ID_ENV_NAME

UA_APP_ID_ENV_NAME: "AWS_SDK_UA_APP_ID" = "AWS_SDK_UA_APP_ID"

Const UA_APP_ID_INI_NAME

UA_APP_ID_INI_NAME: "sdk-ua-app-id" = "sdk-ua-app-id"

Const awsAuthMiddleware

awsAuthMiddleware: <Input, Output>(options: AwsAuthResolvedConfig) => FinalizeRequestMiddleware<Input, Output>

Type declaration

Const awsAuthMiddlewareOptions

awsAuthMiddlewareOptions: RelativeMiddlewareOptions

Const checkExceptions

checkExceptions: (result: WaiterResult) => WaiterResult

Handles and throws exceptions resulting from the waiterResult

param

WaiterResult

Type declaration

Const contentLengthMiddlewareOptions

contentLengthMiddlewareOptions: BuildHandlerOptions

Const createScope

createScope: (shortDate: string, region: string, service: string) => string

Create a string describing the scope of credentials used to sign a request.

param

The current calendar date in the form YYYYMMDD.

param

The AWS region in which the service resides.

param

The service to which the signed request is being sent.

Type declaration

    • (shortDate: string, region: string, service: string): string
    • Parameters

      • shortDate: string
      • region: string
      • service: string

      Returns string

Const defaultDelayDecider

defaultDelayDecider: (delayBase: number, attempts: number) => number

Calculate a capped, fully-jittered exponential backoff time.

Type declaration

    • (delayBase: number, attempts: number): number
    • Parameters

      • delayBase: number
      • attempts: number

      Returns number

Const defaultProvider

Creates a credential provider that will attempt to find credentials from the following sources (listed in order of precedence):

  • Environment variables exposed via process.env
  • SSO credentials from token cache
  • Web identity token credentials
  • Shared credentials and config ini files
  • The EC2/ECS Instance Metadata Service The default credential provider will invoke one provider at a time and only continue to the next if no credentials have been located. For example, if the process finds values defined via the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, the files at ~/.aws/credentials and ~/.aws/config will not be read, nor will any messages be sent to the Instance Metadata Service.
param

Configuration that is passed to each individual provider

see

fromEnv The function used to source credentials from environment variables

see

fromSSO The function used to source credentials from resolved SSO token cache

see

fromTokenFile The function used to source credentials from token file

see

fromIni The function used to source credentials from INI files

see

fromProcess The function used to sources credentials from credential_process in INI files

see

fromInstanceMetadata The function used to source credentials from the EC2 Instance Metadata Service

see

fromContainerMetadata The function used to source credentials from the ECS Container Metadata Service

Const defaultRegionInfoProvider

defaultRegionInfoProvider: RegionInfoProvider

Const defaultRetryDecider

defaultRetryDecider: (error: SdkError) => boolean

Type declaration

Const defaultUserAgent

defaultUserAgent: (__namedParameters: { clientVersion: string; serviceId: undefined | string }) => Provider<UserAgent>

Default provider to the user agent in browsers. It's a best effort to infer the device information. It uses bowser library to detect the browser and version

Type declaration

    • (__namedParameters: { clientVersion: string; serviceId: undefined | string }): Provider<UserAgent>
    • Parameters

      • __namedParameters: { clientVersion: string; serviceId: undefined | string }
        • clientVersion: string
        • serviceId: undefined | string

      Returns Provider<UserAgent>

Const deserializerMiddleware

deserializerMiddleware: <Input, Output, RuntimeUtils>(options: RuntimeUtils, deserializer: ResponseDeserializer<any, any, RuntimeUtils>) => DeserializeMiddleware<Input, Output>

Type declaration

Const deserializerMiddlewareOption

deserializerMiddlewareOption: DeserializeHandlerOptions

Const emitWarningIfUnsupportedVersion

emitWarningIfUnsupportedVersion: (version: string) => void

Emits warning if the provided Node.js version string is pending deprecation.

param

The Node.js version string.

Type declaration

    • (version: string): void
    • Parameters

      • version: string

      Returns void

Const expectBoolean

expectBoolean: (value: any) => boolean | undefined

Type declaration

    • (value: any): boolean | undefined
    • Parameters

      • value: any

      Returns boolean | undefined

Const expectByte

expectByte: (value: any) => number | undefined

Asserts a value is an 8-bit integer and returns it.

param

A value that is expected to be an integer.

returns

The value if it's an integer, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectFloat32

expectFloat32: (value: any) => number | undefined

Asserts a value is a 32-bit float and returns it.

param

A value that is expected to be a 32-bit float.

returns

The value if it's a float, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectInt

expectInt: (value: any) => number | undefined
deprecated

Use expectLong

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectInt32

expectInt32: (value: any) => number | undefined

Asserts a value is a 32-bit integer and returns it.

param

A value that is expected to be an integer.

returns

The value if it's an integer, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectLong

expectLong: (value: any) => number | undefined

Asserts a value is an integer and returns it.

param

A value that is expected to be an integer.

returns

The value if it's an integer, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectNonNull

expectNonNull: <T>(value: T | null | undefined, location?: string | undefined) => T

Asserts a value is not null or undefined and returns it, or throws an error.

param

A value that is expected to be defined

param

The location where we're expecting to find a defined object (optional)

returns

The value if it's not undefined, otherwise throws an error

Type declaration

    • <T>(value: T | null | undefined, location?: string | undefined): T
    • Type parameters

      • T

      Parameters

      • value: T | null | undefined
      • Optional location: string | undefined

      Returns T

Const expectNumber

expectNumber: (value: any) => number | undefined

Asserts a value is a number and returns it.

param

A value that is expected to be a number.

returns

The value if it's a number, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectObject

expectObject: (value: any) => {} | undefined

Asserts a value is an JSON-like object and returns it. This is expected to be used with values parsed from JSON (arrays, objects, numbers, strings, booleans).

param

A value that is expected to be an object

returns

The value if it's an object, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): {} | undefined
    • Parameters

      • value: any

      Returns {} | undefined

Const expectShort

expectShort: (value: any) => number | undefined

Asserts a value is a 16-bit integer and returns it.

param

A value that is expected to be an integer.

returns

The value if it's an integer, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): number | undefined
    • Parameters

      • value: any

      Returns number | undefined

Const expectString

expectString: (value: any) => string | undefined

Asserts a value is a string and returns it.

param

A value that is expected to be a string.

returns

The value if it's a string, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: any): string | undefined
    • Parameters

      • value: any

      Returns string | undefined

Const expectUnion

expectUnion: (value: unknown) => {} | undefined

Asserts a value is a JSON-like object with only one non-null/non-undefined key and returns it.

param

A value that is expected to be an object with exactly one non-null, non-undefined key.

returns

the value if it's a union, undefined if it's null/undefined, otherwise an error is thrown.

Type declaration

    • (value: unknown): {} | undefined
    • Parameters

      • value: unknown

      Returns {} | undefined

Const fromContainerMetadata

fromContainerMetadata: (init?: RemoteProviderInit) => CredentialProvider

Creates a credential provider that will source credentials from the ECS Container Metadata Service

Type declaration

Const fromEnv

fromEnv: <T>(envVarSelector: GetterFromEnv<T>) => Provider<T>

Get config value given the environment variable name or getter from environment variable.

Type declaration

Const fromIni

fromIni: (init?: FromIniInit) => CredentialProvider

Creates a credential provider that will read from ini files and supports role assumption and multi-factor authentication.

Type declaration

Const fromInstanceMetadata

fromInstanceMetadata: (init?: RemoteProviderInit) => CredentialProvider

Creates a credential provider that will source credentials from the EC2 Instance Metadata Service

Type declaration

Const fromProcess

fromProcess: (init?: FromProcessInit) => CredentialProvider

Creates a credential provider that will read from a credential_process specified in ini files.

Type declaration

Const fromSSO

Creates a credential provider that will read from a credential_process specified in ini files.

Type declaration

Const fromSharedConfigFiles

fromSharedConfigFiles: <T>(configSelector: GetterFromConfig<T>, __namedParameters?: { init: init; preferredFile: undefined | "config" | "credentials" }) => Provider<T>

Get config value from the shared config files with inferred profile name.

Type declaration

    • <T>(configSelector: GetterFromConfig<T>, __namedParameters?: { init: init; preferredFile: undefined | "config" | "credentials" }): Provider<T>
    • Type parameters

      • T = string

      Parameters

      • configSelector: GetterFromConfig<T>
      • Optional __namedParameters: { init: init; preferredFile: undefined | "config" | "credentials" }
        • init: init
        • preferredFile: undefined | "config" | "credentials"

      Returns Provider<T>

Const fromStatic

fromStatic: <T>(defaultValue: FromStaticConfig<T>) => Provider<T>

Type declaration

Const fromTokenFile

fromTokenFile: (init?: FromTokenFileInit) => CredentialProvider

Represents OIDC credentials from a file on disk.

Type declaration

Const fromUtf8

fromUtf8: (input: string) => Uint8Array

Type declaration

    • (input: string): Uint8Array
    • Parameters

      • input: string

      Returns Uint8Array

Const fromWebToken

fromWebToken: (init: FromWebTokenInit) => CredentialProvider

Type declaration

Const getArrayIfSingleItem

getArrayIfSingleItem: <T>(mayBeArray: T) => T | T[]

The XML parser will set one K:V for a member that could return multiple entries but only has one.

Type declaration

    • <T>(mayBeArray: T): T | T[]
    • Type parameters

      • T

      Parameters

      • mayBeArray: T

      Returns T | T[]

Const getAwsAuthPlugin

getAwsAuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>

Type declaration

Const getContentLengthPlugin

getContentLengthPlugin: (options: { bodyLengthChecker: BodyLengthCalculator }) => Pluggable<any, any>

Type declaration

Const getDefaultRoleAssumer

getDefaultRoleAssumer: (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">) => RoleAssumer

The default role assumer that used by credential providers when sts:AssumeRole API is needed.

Type declaration

    • (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">): RoleAssumer
    • Parameters

      • Optional stsOptions: Pick<STSClientConfig, "logger" | "region" | "requestHandler">

      Returns RoleAssumer

Const getDefaultRoleAssumerWithWebIdentity

getDefaultRoleAssumerWithWebIdentity: (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">) => RoleAssumerWithWebIdentity

The default role assumer that used by credential providers when sts:AssumeRoleWithWebIdentity API is needed.

Type declaration

    • (stsOptions?: Pick<STSClientConfig, "logger" | "region" | "requestHandler">): RoleAssumerWithWebIdentity
    • Parameters

      • Optional stsOptions: Pick<STSClientConfig, "logger" | "region" | "requestHandler">

      Returns RoleAssumerWithWebIdentity

Const getHostHeaderPlugin

getHostHeaderPlugin: (options: HostHeaderResolvedConfig) => Pluggable<any, any>

Type declaration

Const getLoggerPlugin

getLoggerPlugin: (options: any) => Pluggable<any, any>

Type declaration

Const getOmitRetryHeadersPlugin

getOmitRetryHeadersPlugin: (options: unknown) => Pluggable<any, any>

Type declaration

    • Parameters

      • options: unknown

      Returns Pluggable<any, any>

Const getRegionInfo

getRegionInfo: (region: string, __namedParameters: { partitionHash: PartitionHash; regionHash: RegionHash; signingService: string; useDualstackEndpoint: undefined | false | true; useFipsEndpoint: undefined | false | true }) => RegionInfo

Type declaration

    • (region: string, __namedParameters: { partitionHash: PartitionHash; regionHash: RegionHash; signingService: string; useDualstackEndpoint: undefined | false | true; useFipsEndpoint: undefined | false | true }): RegionInfo
    • Parameters

      • region: string
      • __namedParameters: { partitionHash: PartitionHash; regionHash: RegionHash; signingService: string; useDualstackEndpoint: undefined | false | true; useFipsEndpoint: undefined | false | true }
        • partitionHash: PartitionHash
        • regionHash: RegionHash
        • signingService: string
        • useDualstackEndpoint: undefined | false | true
        • useFipsEndpoint: undefined | false | true

      Returns RegionInfo

Const getRetryPlugin

getRetryPlugin: (options: RetryResolvedConfig) => Pluggable<any, any>

Type declaration

Const getSigV4AuthPlugin

getSigV4AuthPlugin: (options: AwsAuthResolvedConfig) => Pluggable<any, any>

Type declaration

Const getSigningKey

getSigningKey: (sha256Constructor: HashConstructor, credentials: Credentials, shortDate: string, region: string, service: string) => Promise<Uint8Array>

Derive a signing key from its composite parts

param

A constructor function that can instantiate SHA-256 hash objects.

param

The credentials with which the request will be signed.

param

The current calendar date in the form YYYYMMDD.

param

The AWS region in which the service resides.

param

The service to which the signed request is being sent.

Type declaration

    • (sha256Constructor: HashConstructor, credentials: Credentials, shortDate: string, region: string, service: string): Promise<Uint8Array>
    • Parameters

      Returns Promise<Uint8Array>

Const getUserAgentMiddlewareOptions

getUserAgentMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation

Const getUserAgentPlugin

getUserAgentPlugin: (config: UserAgentResolvedConfig) => Pluggable<any, any>

Type declaration

Const getValueFromTextNode

getValueFromTextNode: (obj: any) => any

Recursively parses object and populates value is node from "#text" key if it's available

Type declaration

    • (obj: any): any
    • Parameters

      • obj: any

      Returns any

Const handleFloat

handleFloat: (value: string | number) => number | undefined
deprecated

Use limitedParseDouble

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const hostHeaderMiddleware

hostHeaderMiddleware: <Input, Output>(options: HostHeaderResolvedConfig) => BuildMiddleware<Input, Output>

Type declaration

Const hostHeaderMiddlewareOptions

hostHeaderMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation

Const invalidFunction

invalidFunction: (message: string) => () => never

Type declaration

    • (message: string): () => never
    • Parameters

      • message: string

      Returns () => never

        • (): never
        • Returns never

Const invalidProvider

invalidProvider: (message: string) => Provider<any>

Type declaration

    • Parameters

      • message: string

      Returns Provider<any>

Const limitedParseDouble

limitedParseDouble: (value: string | number) => number | undefined

Asserts a value is a number and returns it. If the value is a string representation of a non-numeric number type (NaN, Infinity, -Infinity), the value will be parsed. Any other string value will result in an exception being thrown. Null or undefined will be returned as undefined. Any other type will result in an exception being thrown.

param

A number or string representation of a non-numeric float.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const limitedParseFloat

limitedParseFloat: (value: string | number) => number | undefined
deprecated

Use limitedParseDouble

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const limitedParseFloat32

limitedParseFloat32: (value: string | number) => number | undefined

Asserts a value is a 32-bit float and returns it. If the value is a string representation of a non-numeric number type (NaN, Infinity, -Infinity), the value will be parsed. Any other string value will result in an exception being thrown. Null or undefined will be returned as undefined. Any other type will result in an exception being thrown.

param

A number or string representation of a non-numeric float.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const loadConfig

loadConfig: <T>(__namedParameters: { configFileSelector: GetterFromConfig<T>; defaultValue: FromStaticConfig<T>; environmentVariableSelector: GetterFromEnv<T> }, configuration?: LocalConfigOptions) => Provider<T>

Type declaration

Const loadSharedConfigFiles

loadSharedConfigFiles: (init?: SharedConfigInit) => Promise<SharedConfigFiles>

Type declaration

Const loggerMiddleware

loggerMiddleware: () => <Output>(next: InitializeHandler<any, Output>, context: HandlerExecutionContext) => InitializeHandler<any, Output>

Type declaration

Const loggerMiddlewareOptions

loggerMiddlewareOptions: InitializeHandlerOptions & AbsoluteLocation

Const omitRetryHeadersMiddleware

omitRetryHeadersMiddleware: () => <Output>(next: FinalizeHandler<any, Output>) => FinalizeHandler<any, Output>

Type declaration

Const omitRetryHeadersMiddlewareOptions

omitRetryHeadersMiddlewareOptions: RelativeMiddlewareOptions

Const parseBoolean

parseBoolean: (value: string) => boolean

Give an input string, strictly parses a boolean value.

param

The boolean string to parse.

returns

true for "true", false for "false", otherwise an error is thrown.

Type declaration

    • (value: string): boolean
    • Parameters

      • value: string

      Returns boolean

Const parseEpochTimestamp

parseEpochTimestamp: (value: unknown) => Date | undefined

Parses a value into a Date. Returns undefined if the input is null or undefined, throws an error if the input is not a number or a parseable string. Input strings must be an integer or floating point number. Fractional seconds are supported.

param

the value to parse

returns

a Date or undefined

Type declaration

    • (value: unknown): Date | undefined
    • Parameters

      • value: unknown

      Returns Date | undefined

Const parseRfc3339DateTime

parseRfc3339DateTime: (value: unknown) => Date | undefined

Parses a value into a Date. Returns undefined if the input is null or undefined, throws an error if the input is not a string that can be parsed as an RFC 3339 date. Input strings must conform to RFC3339 section 5.6, and cannot have a UTC offset. Fractional precision is supported. {@see https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14}

param

the value to parse

returns

a Date or undefined

Type declaration

    • (value: unknown): Date | undefined
    • Parameters

      • value: unknown

      Returns Date | undefined

Const parseRfc7231DateTime

parseRfc7231DateTime: (value: unknown) => Date | undefined

Parses a value into a Date. Returns undefined if the input is null or undefined, throws an error if the input is not a string that can be parsed as an RFC 7231 IMF-fixdate or obs-date. Input strings must conform to RFC7231 section 7.1.1.1. Fractional seconds are supported. {@see https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1}

param

the value to parse

returns

a Date or undefined

Type declaration

    • (value: unknown): Date | undefined
    • Parameters

      • value: unknown

      Returns Date | undefined

Const parseUrl

parseUrl: UrlParser

Const providerConfigFromInit

providerConfigFromInit: (__namedParameters: { maxRetries: undefined | number; timeout: undefined | number }) => RemoteProviderConfig

Type declaration

    • (__namedParameters: { maxRetries: undefined | number; timeout: undefined | number }): RemoteProviderConfig
    • Parameters

      • __namedParameters: { maxRetries: undefined | number; timeout: undefined | number }
        • maxRetries: undefined | number
        • timeout: undefined | number

      Returns RemoteProviderConfig

Const resolveAwsAuthConfig

resolveAwsAuthConfig: <T>(input: T & AwsAuthInputConfig & PreviouslyResolved) => T & AwsAuthResolvedConfig

Type declaration

Const resolveCustomEndpointsConfig

resolveCustomEndpointsConfig: <T>(input: T & CustomEndpointsInputConfig & PreviouslyResolved) => T & CustomEndpointsResolvedConfig

Type declaration

Const resolveEndpointsConfig

resolveEndpointsConfig: <T>(input: T & EndpointsInputConfig & PreviouslyResolved) => T & EndpointsResolvedConfig

Type declaration

Const resolveRegionConfig

resolveRegionConfig: <T>(input: T & RegionInputConfig & PreviouslyResolved) => T & RegionResolvedConfig

Type declaration

Const resolveRetryConfig

resolveRetryConfig: <T>(input: T & PreviouslyResolved & RetryInputConfig) => T & RetryResolvedConfig

Type declaration

Const resolveSigV4AuthConfig

resolveSigV4AuthConfig: <T>(input: T & SigV4AuthInputConfig & SigV4PreviouslyResolved) => T & SigV4AuthResolvedConfig

Type declaration

Const resolveStsAuthConfig

resolveStsAuthConfig: <T>(input: T & PreviouslyResolved & StsAuthInputConfig, __namedParameters: { stsClientCtor: {} }) => T & StsAuthResolvedConfig

Set STS client constructor to stsClientCtor config parameter. It is used for role assumers for STS client internally. See clients/client-sts/defaultStsRoleAssumers.ts and clients/client-sts/STSClient.ts.

Type declaration

Const retryMiddleware

retryMiddleware: (options: RetryResolvedConfig) => <Output>(next: FinalizeHandler<any, Output>, context: HandlerExecutionContext) => FinalizeHandler<any, Output>

Type declaration

Const retryMiddlewareOptions

Const serializeFloat

serializeFloat: (value: number) => string | number

Serializes a number, turning non-numeric values into strings.

param

The number to serialize.

returns

A number, or a string if the given number was non-numeric.

Type declaration

    • (value: number): string | number
    • Parameters

      • value: number

      Returns string | number

Const serializerMiddleware

serializerMiddleware: <Input, Output, RuntimeUtils>(options: RuntimeUtils, serializer: RequestSerializer<any, RuntimeUtils>) => SerializeMiddleware<Input, Output>

Type declaration

Const serializerMiddlewareOption

serializerMiddlewareOption: SerializeHandlerOptions

Const streamCollector

streamCollector: StreamCollector

Const strictParseByte

strictParseByte: (value: string | number) => number | undefined

Parses a value into an 8-bit integer. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by parseFloat and the result will be asserted to be an integer. If the parsed value is not an integer, or the raw value is any type other than a string or number, an exception will be thrown.

param

A number or string representation of an 8-bit integer.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseDouble

strictParseDouble: (value: string | number) => number | undefined

Parses a value into a double. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by the standard parseFloat with one exception: NaN may only be explicitly set as the string "NaN", any implicit Nan values will result in an error being thrown. If any other type is provided, an exception will be thrown.

param

A number or string representation of a double.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseFloat

strictParseFloat: (value: string | number) => number | undefined
deprecated

Use strictParseDouble

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseFloat32

strictParseFloat32: (value: string | number) => number | undefined

Parses a value into a float. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by the standard parseFloat with one exception: NaN may only be explicitly set as the string "NaN", any implicit Nan values will result in an error being thrown. If any other type is provided, an exception will be thrown.

param

A number or string representation of a float.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseInt

strictParseInt: (value: string | number) => number | undefined
deprecated

Use strictParseLong

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseInt32

strictParseInt32: (value: string | number) => number | undefined

Parses a value into a 32-bit integer. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by parseFloat and the result will be asserted to be an integer. If the parsed value is not an integer, or the raw value is any type other than a string or number, an exception will be thrown.

param

A number or string representation of a 32-bit integer.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseLong

strictParseLong: (value: string | number) => number | undefined

Parses a value into an integer. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by parseFloat and the result will be asserted to be an integer. If the parsed value is not an integer, or the raw value is any type other than a string or number, an exception will be thrown.

param

A number or string representation of an integer.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const strictParseShort

strictParseShort: (value: string | number) => number | undefined

Parses a value into a 16-bit integer. If the value is null or undefined, undefined will be returned. If the value is a string, it will be parsed by parseFloat and the result will be asserted to be an integer. If the parsed value is not an integer, or the raw value is any type other than a string or number, an exception will be thrown.

param

A number or string representation of a 16-bit integer.

returns

The value as a number, or undefined if it's null/undefined.

Type declaration

    • (value: string | number): number | undefined
    • Parameters

      • value: string | number

      Returns number | undefined

Const toUtf8

toUtf8: (input: Uint8Array) => string

Type declaration

    • (input: Uint8Array): string
    • Parameters

      • input: Uint8Array

      Returns string

Const userAgentMiddleware

userAgentMiddleware: (options: UserAgentResolvedConfig) => <Output>(next: BuildHandler<any, any>, context: HandlerExecutionContext) => BuildHandler<any, any>

Build user agent header sections from:

  1. runtime-specific default user agent provider;
  2. custom user agent from customUserAgent client config;
  3. handler execution context set by internal SDK components; The built user agent will be set to x-amz-user-agent header for ALL the runtimes. Please note that any override to the user-agent or x-amz-user-agent header in the HTTP request is discouraged. Please use customUserAgent client config or middleware setting the userAgent context to generate desired user agent.

Type declaration

Functions

calculateBodyLength

  • calculateBodyLength(body: any): number | undefined
  • calculateBodyLength(body: any): number | undefined
  • Parameters

    • body: any

    Returns number | undefined

  • Parameters

    • body: any

    Returns number | undefined

Const checkState

  • checkState(client: CloudWatchClient, input: DescribeAlarmsCommandInput): Promise<WaiterResult>
  • checkState(client: CloudWatchClient, input: DescribeAlarmsCommandInput): Promise<WaiterResult>

contentLengthMiddleware

dateToUtcString

  • dateToUtcString(date: Date): string
  • Builds a proper UTC HttpDate timestamp from a Date object since not all environments will have this as the expected format.

    See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString

    Prior to ECMAScript 2018, the format of the return value varied according to the platform. The most common return value was an RFC-1123 formatted date stamp, which is a slightly updated version of RFC-822 date stamps.

    Parameters

    • date: Date

    Returns string

extendedEncodeURIComponent

  • extendedEncodeURIComponent(str: string): string
  • Function that wraps encodeURIComponent to encode additional characters to fully adhere to RFC 3986.

    Parameters

    • str: string

    Returns string

fromBase64

  • fromBase64(input: string): Uint8Array
  • fromBase64(input: string): Uint8Array
  • Converts a base-64 encoded string to a Uint8Array of bytes using Node.JS's buffer module.

    Parameters

    • input: string

      The base-64 encoded string

    Returns Uint8Array

  • Converts a base-64 encoded string to a Uint8Array of bytes.

    see

    https://tools.ietf.org/html/rfc4648#section-4

    Parameters

    • input: string

      The base-64 encoded string

    Returns Uint8Array

getSerdePlugin

isValidHostname

  • isValidHostname(hostname: string): boolean
  • Parameters

    • hostname: string

    Returns boolean

paginateDescribeAlarmHistory

paginateDescribeAlarms

  • Parameters

    Returns Paginator<DescribeAlarmsCommandOutput>

  • Parameters

    • config: CloudWatchPaginationConfiguration
    • input: DescribeAlarmsCommandInput
    • Rest ...additionalArguments: any

    Returns Paginator<DescribeAlarmsCommandOutput>

paginateDescribeInsightRules

paginateGetMetricData

  • Parameters

    Returns Paginator<GetMetricDataCommandOutput>

  • Parameters

    • config: CloudWatchPaginationConfiguration
    • input: GetMetricDataCommandInput
    • Rest ...additionalArguments: any

    Returns Paginator<GetMetricDataCommandOutput>

paginateListAccountRoles

paginateListAccounts

paginateListDashboards

  • Parameters

    Returns Paginator<ListDashboardsCommandOutput>

  • Parameters

    • config: CloudWatchPaginationConfiguration
    • input: ListDashboardsCommandInput
    • Rest ...additionalArguments: any

    Returns Paginator<ListDashboardsCommandOutput>

paginateListMetricStreams

paginateListMetrics

  • Parameters

    Returns Paginator<ListMetricsCommandOutput>

  • Parameters

    • config: CloudWatchPaginationConfiguration
    • input: ListMetricsCommandInput
    • Rest ...additionalArguments: any

    Returns Paginator<ListMetricsCommandOutput>

resolveHostHeaderConfig

resolveUserAgentConfig

splitEvery

  • splitEvery(value: string, delimiter: string, numDelimiters: number): Array<string>
  • Given an input string, splits based on the delimiter after a given number of delimiters has been encountered.

    Parameters

    • value: string

      The input string to split.

    • delimiter: string

      The delimiter to split on.

    • numDelimiters: number

      The number of delimiters to have encountered to split.

    Returns Array<string>

toBase64

  • toBase64(input: Uint8Array): string
  • toBase64(input: Uint8Array): string
  • Converts a Uint8Array of binary data to a base-64 encoded string using Node.JS's buffer module.

    Parameters

    • input: Uint8Array

      The binary data to encode

    Returns string

  • Converts a Uint8Array of binary data to a base-64 encoded string.

    see

    https://tools.ietf.org/html/rfc4648#section-4

    Parameters

    • input: Uint8Array

      The binary data to encode

    Returns string

Const waitForAlarmExists

  • waitForAlarmExists(params: WaiterConfiguration<CloudWatchClient>, input: DescribeAlarmsCommandInput): Promise<WaiterResult>

Const waitForCompositeAlarmExists

  • waitForCompositeAlarmExists(params: WaiterConfiguration<CloudWatchClient>, input: DescribeAlarmsCommandInput): Promise<WaiterResult>

Const waitUntilAlarmExists

  • waitUntilAlarmExists(params: WaiterConfiguration<CloudWatchClient>, input: DescribeAlarmsCommandInput): Promise<WaiterResult>

Const waitUntilCompositeAlarmExists

  • waitUntilCompositeAlarmExists(params: WaiterConfiguration<CloudWatchClient>, input: DescribeAlarmsCommandInput): Promise<WaiterResult>