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

    Input for the fromHttp function in the HTTP Credentials Provider for Node.js.

    interface FromHttpOptions {
        awsContainerCredentialsFullUri?: string;
        awsContainerCredentialsRelativeUri?: string;
        awsContainerAuthorizationTokenFile?: string;
        awsContainerAuthorizationToken?: string;
        credentialsFullUri?: string;
        authorizationToken?: string;
        maxRetries?: number;
        timeout?: number;
        logger?: Logger;
        parentClientConfig?: {
            region?: string | Provider<string>;
            profile?: string;
            logger?: Logger;
            userAgentAppId?(): Promise<string | undefined>;
            [key: string]: unknown;
        };
    }

    Hierarchy

    • CredentialProviderOptions
      • FromHttpOptions
    Index

    Properties

    awsContainerCredentialsFullUri?: string

    If this value is provided, it will be used as-is.

    For browser environments, use instead credentialsFullUri.

    awsContainerCredentialsRelativeUri?: string

    If this value is provided instead of the full URI, it will be appended to the default link local host of 169.254.170.2.

    Not supported in browsers.

    awsContainerAuthorizationTokenFile?: string

    Will be read on each credentials request to add an Authorization request header value.

    Not supported in browsers.

    awsContainerAuthorizationToken?: string

    An alternative to awsContainerAuthorizationTokenFile, this is the token value itself.

    For browser environments, use instead authorizationToken.

    credentialsFullUri?: string

    BROWSER ONLY.

    In browsers, a relative URI is not allowed, and a full URI must be provided. HTTPS is required.

    This value is required for the browser environment.

    authorizationToken?: string

    BROWSER ONLY.

    Providing this value will set an "Authorization" request header value on the GET request.

    maxRetries?: number

    Default is 3 retry attempts or 4 total attempts.

    timeout?: number

    Default is 1000ms. Time in milliseconds to spend waiting between retry attempts.

    logger?: Logger

    This logger is only used to provide information on what credential providers were used during resolution.

    It does not log credentials.

    parentClientConfig?: {
        region?: string | Provider<string>;
        profile?: string;
        logger?: Logger;
        userAgentAppId?(): Promise<string | undefined>;
        [key: string]: unknown;
    }

    Present if the credential provider was created by calling the defaultCredentialProvider in a client's middleware, having access to the client's config.

    The region of that parent or outer client is important because an inner client used by the credential provider may need to match its default partition or region with that of the outer client.

    • not truly deprecated, marked as a warning to not use this.