Skip to content

Commit

Permalink
Update fetchMetadataToken (#4240)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewzhaocc committed May 22, 2024
1 parent dacfa24 commit 9fa11fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/feature-MetadataService-3a550e8f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "feature",
"category": "MetadataService",
"description": "Update AWS.MetadataService to expose the fetchMetadataToken function."
}
4 changes: 4 additions & 0 deletions lib/metadata_service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export class MetadataService {
options: {method?: string, headers?: {[key: string]: String} },
callback: (err: AWSError, data: string) => void
): void;
/**
* Fetches metadata token used for authenticating against the instance metadata service.
*/
fetchMetadataToken(callback: (err: AWSError, token: string) => void): void;
/**
* 169.254.169.254
*/
Expand Down
3 changes: 1 addition & 2 deletions lib/metadata_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ AWS.MetadataService = inherit({
loadCredentialsCallbacks: [],

/**
* Fetches metadata token used for getting credentials
* Fetches metadata token used for authenticating against the instance metadata service.
*
* @api private
* @callback callback function(err, token)
* Called when token is loaded from the resource
*/
Expand Down

0 comments on commit 9fa11fe

Please sign in to comment.