diff --git a/.changes/next-release/feature-MetadataService-3a550e8f.json b/.changes/next-release/feature-MetadataService-3a550e8f.json new file mode 100644 index 0000000000..40a74ded9a --- /dev/null +++ b/.changes/next-release/feature-MetadataService-3a550e8f.json @@ -0,0 +1,5 @@ +{ + "type": "feature", + "category": "MetadataService", + "description": "Update AWS.MetadataService to expose the fetchMetadataToken function." +} \ No newline at end of file diff --git a/lib/metadata_service.d.ts b/lib/metadata_service.d.ts index 329fdc2d65..30db29cc6a 100644 --- a/lib/metadata_service.d.ts +++ b/lib/metadata_service.d.ts @@ -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 */ diff --git a/lib/metadata_service.js b/lib/metadata_service.js index 24dad3002b..2e1cc06245 100644 --- a/lib/metadata_service.js +++ b/lib/metadata_service.js @@ -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 */