The configuration interface of RekognitionClient class constructor that set the region, credentials and other options.

interface RekognitionClientConfig {
    cacheMiddleware?: boolean;
    credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
    customUserAgent?: string | UserAgent;
    defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
    disableHostPrefix?: boolean;
    endpoint?: (string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>) & (string | Provider<string> | Endpoint | Provider<...> | EndpointV2 | Provider<...>);
    endpointProvider?: ((params, context?) => EndpointV2);
    extensions?: RuntimeExtension[];
    logger?: Logger;
    maxAttempts?: number | Provider<number>;
    region?: string | Provider<string>;
    requestHandler?: (NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<string, unknown> | RequestHandler<any, any, HttpHandlerOptions>) & HttpHandlerUserInput;
    retryMode?: string | Provider<string>;
    retryStrategy?: RetryStrategy | RetryStrategyV2;
    signer?: RequestSigner | ((authScheme?) => Promise<RequestSigner>);
    signingEscapePath?: boolean;
    signingRegion?: string;
    systemClockOffset?: number;
    tls?: boolean;
    useDualstackEndpoint?: boolean | Provider<boolean>;
    useFipsEndpoint?: boolean | Provider<boolean>;
}

Hierarchy (view full)

Properties

cacheMiddleware?: boolean

Default false.

When true, the client will only resolve the middleware stack once per Command class. This means modifying the middlewareStack of the command or client after requests have been made will not be recognized.

Calling client.destroy() also clears this cache.

Enable this only if needing the additional time saved (0-1ms per request) and not needing middleware modifications between requests.

The credentials used to sign requests.

customUserAgent?: string | UserAgent

The custom user agent header that would be appended to default one

The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.

disableHostPrefix?: boolean

Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.

endpoint?: (string | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>) & (string | Provider<string> | Endpoint | Provider<...> | EndpointV2 | Provider<...>)

The fully qualified endpoint of the webservice. This is only for using a custom endpoint (for example, when using a local version of S3).

Endpoint transformations such as S3 applying a bucket to the hostname are still applicable to this custom endpoint.

endpointProvider?: ((params, context?) => EndpointV2)

Providing a custom endpointProvider will override built-in transformations of the endpoint such as S3 adding the bucket name to the hostname, since they are part of the default endpointProvider.

Type declaration

    • (params, context?): EndpointV2
    • Providing a custom endpointProvider will override built-in transformations of the endpoint such as S3 adding the bucket name to the hostname, since they are part of the default endpointProvider.

      Parameters

      Returns EndpointV2

extensions?: RuntimeExtension[]

Optional extensions

logger?: Logger

Optional logger for logging debug/info/warn/error.

maxAttempts?: number | Provider<number>

Value for how many times a request will be made at most in case of retry.

region?: string | Provider<string>

The AWS region to which this client will send requests

requestHandler?: (NodeHttpHandlerOptions | FetchHttpHandlerOptions | Record<string, unknown> | RequestHandler<any, any, HttpHandlerOptions>) & HttpHandlerUserInput

The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.

retryMode?: string | Provider<string>

Specifies which retry algorithm to use.

retryStrategy?: RetryStrategy | RetryStrategyV2

The strategy to retry the request. Using built-in exponential backoff strategy by default.

signer?: RequestSigner | ((authScheme?) => Promise<RequestSigner>)

The signer to use when signing requests.

Type declaration

signingEscapePath?: boolean

Whether to escape request path when signing the request.

signingRegion?: string

The region where you want to sign your request against. This can be different to the region in the endpoint.

systemClockOffset?: number

An offset value in milliseconds to apply to all signing times.

tls?: boolean

Whether TLS is enabled for requests.

Deprecated

useDualstackEndpoint?: boolean | Provider<boolean>

Enables IPv6/IPv4 dualstack endpoint.

useFipsEndpoint?: boolean | Provider<boolean>

Enables FIPS compatible endpoints.