Note: You are viewing the documentation for an older major version of the AWS SDK for JavaScript (v2).
The modular AWS SDK for JavaScript (v3) is now General Available. For more information see the Developer Guide or API Reference.
Class: AWS.MetadataService
- Inherits:
-
Object
- Object
- AWS.MetadataService
- Defined in:
- lib/metadata_service.js
Overview
This feature is not supported in the browser environment of the SDK.
Represents a metadata service available on EC2 instances. Using the request() method, you can receieve metadata about any available resource on the metadata service.
You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED environment variable to a truthy value.
Constructor Summary
-
new AWS.MetadataService(options) ⇒ void
constructor
Creates a new MetadataService object with a given set of options.
Property Summary
-
disableFetchToken ⇒ Boolean
static
readwrite
when enabled, metadata service will not fetch token.
-
host ⇒ String
static
readwrite
-
httpOptions ⇒ map
readwrite
A map of options to pass to the underlying HTTP request:.
Method Summary
-
request(path, options, callback) ⇒ void
Sends a request to the instance metadata service for a given resource.