AZ-204 · Question #176
You have the following code (line numbers are included for reference only): BatchTokenCredentials = GetCredentialsf); BatchClient client^ BatchClient.Open(credentials); CloudJob job =…
The correct answer is A. Add the following code between lines 02 and 03: var pool = client. PoolOperations.CreatePool(); B. Add the following code between lines 03 and 04: job. Pool I nformation. Pool I d = pool. Id. You should add the following code between lines 02 and 03: var pool = client.PoolOperations.CreatePool(); This creates a batch pool. A pool is a set of virtual machines (VMs) for running batch jobs. You should also add the following code between lines 03 and 04: job. Pool…
Question
Options
- AAdd the following code between lines 02 and 03: var pool = client. PoolOperations.CreatePool();
- BAdd the following code between lines 03 and 04: job. Pool I nformation. Pool I d = pool. Id;
- CModify line 05 as follows:
- DRemove line 06.
How the community answered
(43 responses)- A70% (30)
- C21% (9)
- D9% (4)
Explanation
You should add the following code between lines 02 and 03: var pool = client.PoolOperations.CreatePool(); This creates a batch pool. A pool is a set of virtual machines (VMs) for running batch jobs. You should also add the following code between lines 03 and 04: job. Pool Information. Poolld = This allows you to assign the job to the pool you created. A job cannot run outside of a pool. You should not remove line 06. The Commit method creates the job in Azure. You should not modify line 05 as follows: clientJobOperations.AddTask(MSampleTask", task); You can either use client.JobOperations.AddTask or job.AddTask. Using the former, you must specify the ID of the job to which the task applies. In this scenario, you did not create a job with an ID named SampleTask.
Topics
Community Discussion
No community discussion yet for this question.