IBM COS SDK for JavaScript V2 - v1.0.0
    Preparing search index...

    Interface S3ClientConfig

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

    interface S3ClientConfig {
        credentials?: AwsCredentialIdentityProvider | AwsCredentialIdentity;
        signer?:
            | RequestSigner
            | ((authScheme?: AuthScheme) => Promise<RequestSigner>);
        systemClockOffset?: number;
        signingRegion?: string;
        signerConstructor?: new (
            options: SignatureV4Init & SignatureV4CryptoInit,
        ) => RequestSigner;
        requestChecksumCalculation?:
            | RequestChecksumCalculation
            | Provider<RequestChecksumCalculation>;
        responseChecksumValidation?:
            | ResponseChecksumValidation
            | Provider<ResponseChecksumValidation>;
        requestStreamBufferSize?: number | false;
        forcePathStyle?: boolean & (boolean | Provider<boolean | undefined>);
        useAccelerateEndpoint?: boolean & (boolean | Provider<boolean | undefined>);
        disableMultiregionAccessPoints?: boolean & (boolean | Provider<boolean | undefined>);
        followRegionRedirects?: boolean;
        s3ExpressIdentityProvider?: S3ExpressIdentityProvider;
        bucketEndpoint?: boolean;
        expectContinueHeader?: number | boolean;
        customUserAgent?: string | UserAgent;
        userAgentAppId?: string | Provider<string | undefined>;
        sha256?: ChecksumConstructor | HashConstructor;
        urlParser?: UrlParser;
        bodyLengthChecker?: BodyLengthCalculator;
        streamCollector?: StreamCollector;
        base64Decoder?: Decoder;
        base64Encoder?: Encoder;
        utf8Decoder?: Decoder;
        utf8Encoder?: Encoder;
        runtime?: string;
        disableHostPrefix?: boolean;
        serviceId?: string;
        profile?: string;
        defaultUserAgentProvider?: Provider<UserAgent>;
        streamHasher?: StreamHasher<Readable> | StreamHasher<Blob>;
        md5?: ChecksumConstructor | HashConstructor;
        sha1?: ChecksumConstructor | HashConstructor;
        getAwsChunkedEncodingStream?: GetAwsChunkedEncodingStream<any>;
        credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
        retryMode?: string | Provider<string>;
        logger?: Logger;
        extensions?: RuntimeExtension[];
        eventStreamSerdeProvider?: EventStreamSerdeProvider;
        defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
        signingEscapePath?: boolean;
        useArnRegion?: boolean | Provider<boolean | undefined>;
        sdkStreamMixin?: SdkStreamMixinInjector;
        authSchemePreference?: string[] | Provider<string[]>;
        httpAuthSchemes?: HttpAuthScheme[];
        httpAuthSchemeProvider?: S3HttpAuthSchemeProvider;
        clientContextParams?: {
            disableS3ExpressSessionAuth?: boolean | Provider<boolean | undefined>;
        };
        useGlobalEndpoint?: boolean
        | Provider<boolean | undefined>;
        disableS3ExpressSessionAuth?: boolean | Provider<boolean | undefined>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    credentials?: AwsCredentialIdentityProvider | AwsCredentialIdentity

    The credentials used to sign requests.

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

    The signer to use when signing requests.

    systemClockOffset?: number

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

    signingRegion?: string

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

    signerConstructor?: new (
        options: SignatureV4Init & SignatureV4CryptoInit,
    ) => RequestSigner

    The injectable SigV4-compatible signer class constructor. If not supplied, regular SignatureV4 constructor will be used.

    requestChecksumCalculation?:
        | RequestChecksumCalculation
        | Provider<RequestChecksumCalculation>

    Determines when a checksum will be calculated for request payloads.

    responseChecksumValidation?:
        | ResponseChecksumValidation
        | Provider<ResponseChecksumValidation>

    Determines when checksum validation will be performed on response payloads.

    requestStreamBufferSize?: number | false

    Default 0 (off).

    When set to a value greater than or equal to 8192, sets the minimum number of bytes to buffer into a chunk when processing input streams with chunked encoding (that is, when request checksums are enabled). A minimum of 8kb = 8 * 1024 is required, and 64kb or higher is recommended.

    See https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html.

    This has a slight performance penalty because it must wrap and buffer your input stream. You do not need to set this value if your stream already flows chunks of 8kb or greater.

    forcePathStyle?: boolean & (boolean | Provider<boolean | undefined>)

    Whether to force path style URLs for S3 objects (e.g., https://s3.amazonaws.com// instead of https://.s3.amazonaws.com/

    useAccelerateEndpoint?: boolean & (boolean | Provider<boolean | undefined>)

    Whether to use the S3 Transfer Acceleration endpoint by default

    disableMultiregionAccessPoints?: boolean & (boolean | Provider<boolean | undefined>)

    Whether multi-region access points (MRAP) should be disabled.

    followRegionRedirects?: boolean

    This feature was previously called the S3 Global Client. This can result in additional latency as failed requests are retried with a corrected region when receiving a permanent redirect error with status 301. This feature should only be used as a last resort if you do not know the region of your bucket(s) ahead of time.

    s3ExpressIdentityProvider?: S3ExpressIdentityProvider

    Identity provider for an S3 feature.

    bucketEndpoint?: boolean

    Whether to use the bucket name as the endpoint for this client.

    expectContinueHeader?: number | boolean

    This field configures the SDK's behavior around setting the expect: 100-continue header.

    Default: 2_097_152 (2 MB)

    When given as a boolean - always send or omit the header. When given as a number - minimum byte threshold of the payload before setting the header. Unmeasurable payload sizes (streams) will set the header too.

    The expect: 100-continue header is used to allow the server a chance to validate the PUT request headers before the client begins to send the object payload. This avoids wasteful data transmission for a request that is rejected.

    However, there is a trade-off where the request will take longer to complete.

    customUserAgent?: string | UserAgent

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

    userAgentAppId?: string | Provider<string | undefined>

    The application ID used to identify the application.

    sha256?: ChecksumConstructor | HashConstructor

    A constructor for a class implementing the @smithy/types#ChecksumConstructor interface that computes the SHA-256 HMAC or checksum of a string or binary buffer.

    urlParser?: UrlParser

    The function that will be used to convert strings into HTTP endpoints.

    bodyLengthChecker?: BodyLengthCalculator

    A function that can calculate the length of a request body.

    streamCollector?: StreamCollector

    A function that converts a stream into an array of bytes.

    base64Decoder?: Decoder

    The function that will be used to convert a base64-encoded string to a byte array.

    base64Encoder?: Encoder

    The function that will be used to convert binary data to a base64-encoded string.

    utf8Decoder?: Decoder

    The function that will be used to convert a UTF8-encoded string to a byte array.

    utf8Encoder?: Encoder

    The function that will be used to convert binary data to a UTF-8 encoded string.

    runtime?: string

    The runtime environment.

    disableHostPrefix?: boolean

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

    serviceId?: string

    Unique service identifier.

    profile?: string

    Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.

    When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.

    For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.

    defaultUserAgentProvider?: Provider<UserAgent>

    The provider populating default tracking information to be sent with user-agent, x-amz-user-agent header

    streamHasher?: StreamHasher<Readable> | StreamHasher<Blob>

    A function that, given a hash constructor and a stream, calculates the hash of the streamed value.

    md5?: ChecksumConstructor | HashConstructor

    A constructor for a class implementing the __Checksum interface that computes MD5 hashes.

    sha1?: ChecksumConstructor | HashConstructor

    A constructor for a class implementing the __Checksum interface that computes SHA1 hashes.

    getAwsChunkedEncodingStream?: GetAwsChunkedEncodingStream<any>

    A function that returns Readable Stream which follows aws-chunked encoding stream.

    credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider

    Default credentials provider; Not available in browser runtime.

    retryMode?: string | Provider<string>

    Specifies which retry algorithm to use.

    logger?: Logger

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

    extensions?: RuntimeExtension[]

    Optional extensions

    eventStreamSerdeProvider?: EventStreamSerdeProvider

    The function that provides necessary utilities for generating and parsing event stream

    defaultsMode?: DefaultsMode | Provider<DefaultsMode>

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

    signingEscapePath?: boolean

    Whether to escape request path when signing the request.

    useArnRegion?: boolean | Provider<boolean | undefined>

    Whether to override the request region with the region inferred from requested resource's ARN. Defaults to undefined.

    sdkStreamMixin?: SdkStreamMixinInjector

    The internal function that inject utilities to runtime-specific stream to help users consume the data

    authSchemePreference?: string[] | Provider<string[]>

    A comma-separated list of case-sensitive auth scheme names. An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.

    httpAuthSchemes?: HttpAuthScheme[]

    Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.

    httpAuthSchemeProvider?: S3HttpAuthSchemeProvider

    Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.

    clientContextParams?: {
        disableS3ExpressSessionAuth?: boolean | Provider<boolean | undefined>;
    }
    useGlobalEndpoint?: boolean | Provider<boolean | undefined>
    disableS3ExpressSessionAuth?: boolean | Provider<boolean | undefined>