Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup.md example -> TypeError: client.jobs.list is not a function #255

Open
ghost opened this issue Jan 25, 2018 · 1 comment
Open

Backup.md example -> TypeError: client.jobs.list is not a function #255

ghost opened this issue Jan 25, 2018 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Jan 25, 2018

Hi,

When I execute code example provided at
https://github.com/MicrosoftDocs/azure-docs-sdk-node/blob/master/docs-ref-services/backup.md I get the following error message:

To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code CA3LZDEPE to authenticate. TypeError: client.jobs.list is not a function at msRestAzure.interactiveLogin.then.credentials (C:\Temp\AzureFunction\BackupCheck.js:15:24) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

I did provide the subscriptionId, vault and resourceGroupName information.

Can you please point out what I'm doing wrong?

Cheers,
Marc

@ghost
Copy link
Author

ghost commented Feb 2, 2018

Managed to figure out the solution myself.

return client.jobs.list(vault, resourceGroupName);

should be

return client.*backupJobs.list(vault, resourceGroupName);

Class jobs does not have method list.
https://docs.microsoft.com/en-us/javascript/api/azure-arm-recoveryservicesbackup/jobs?view=azure-node-latest&viewFallbackFrom=azure-node-2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants