ecs_credentials.js 1007 B

12345678910111213141516171819202122232425262728
  1. var AWS = require('../core');
  2. /**
  3. * Represents credentials received from relative URI specified in the ECS container.
  4. *
  5. * This class will request refreshable credentials from the relative URI
  6. * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the
  7. * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials
  8. * are returned in the response, these will be used with zero configuration.
  9. *
  10. * This credentials class will by default timeout after 1 second of inactivity
  11. * and retry 3 times.
  12. * If your requests to the relative URI are timing out, you can increase
  13. * the value by configuring them directly:
  14. *
  15. * ```javascript
  16. * AWS.config.credentials = new AWS.ECSCredentials({
  17. * httpOptions: { timeout: 5000 }, // 5 second timeout
  18. * maxRetries: 10, // retry 10 times
  19. * retryDelayOptions: { base: 200 } // see AWS.Config for information
  20. * });
  21. * ```
  22. *
  23. * @see AWS.Config.retryDelayOptions
  24. *
  25. * @!macro nobrowser
  26. */
  27. AWS.ECSCredentials = AWS.RemoteCredentials;