Module

x/aws_api/client/instance-metadata.ts>IMDSv2

From-scratch Typescript client for accessing AWS APIs
Extremely Popular
Latest
class IMDSv2
import { IMDSv2 } from "https://dotland.deno.dev/x/aws_api@v0.8.1/client/instance-metadata.ts";

Constructors

new
IMDSv2(unnamed 0?: { serviceEndpoint?: string; endpointMode?: "IPv4" | "IPv6"; endpointPath?: string; timeoutMs?: number; apiTimeoutMs?: number; tokenTtlSeconds?: number; })

Properties

apiTimeoutMs: number
baseUrl: URL
cachedToken: string | null
timeoutMs: number
tokenTtlSeconds: number

Methods

fetchNewToken(): Promise<[string, number]>
performRequest(method?: "GET" | "HEAD" | "PUT", path?)