IBM COS SDK for JavaScript V2 - v1.0.0
    Preparing search index...
    • Create a credential provider function that reads from ECS container metadata service.

      import { fromContainerMetadata } from "@ibm-cos/credential-providers"; // ES6 import
      // const { fromContainerMetadata } = require("@ibm-cos/credential-providers"); // CommonJS import

      const foo = new FooClient({
      credentials: fromContainerMetadata({
      // Optional. The connection timeout (in milliseconds) to apply to any remote requests. If not specified, a default value
      // of`1000` (one second) is used.
      timeout: 1000,
      // Optional. The maximum number of times any HTTP connections should be retried. If not specified, a default value of `0`
      // will be used.
      maxRetries: 0,
      }),
      });

      Parameters

      Returns AwsCredentialIdentityProvider