exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 6 question 6 discussion

Actual exam question from Microsoft's AZ-204
Question #: 6
Topic #: 6
[All AZ-204 Questions]

A company is developing a solution that allows smart refrigerators to send temperature information to a central location.
The solution must receive and store messages until they can be processed. You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location.
You need to complete the configuration.
Which Azure CLI or PowerShell command should you run?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: C
A service bus instance has already been created (Step 2 below). Next is step 3, Create a Service Bus queue.
Note:
Steps:
Step 1: # Create a resource group
resourceGroupName="myResourceGroup"
az group create --name $resourceGroupName --location eastus
Step 2: # Create a Service Bus messaging namespace with a unique name namespaceName=myNameSpace$RANDOM az servicebus namespace create --resource-group $resourceGroupName --name $namespaceName --location eastus
Step 3: # Create a Service Bus queue
az servicebus queue create --resource-group $resourceGroupName --namespace-name $namespaceName --name BasicQueue
Step 4: # Get the connection string for the namespace
connectionString=$(az servicebus namespace authorization-rule keys list --resource-group $resourceGroupName --namespace-name $namespaceName --name
RootManageSharedAccessKey --query primaryConnectionString --output tsv)
Reference:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
manojchavan
Highly Voted 3 years, 11 months ago
Question is poorly worded. I think what is asked here is that service bus instance is already created and now you need to complete the configuration to start using the bus. In this case, you will need to create Queue and hence correct answer is C
upvoted 34 times
...
Franz22
Highly Voted 3 years, 7 months ago
This question is equal to the question #9, the ONLY difference here is that we have to pick the Powershell answer, because it's the only that has the creation of the service bus queue. Go to the question #9 to see my answer why we should create the queue.
upvoted 14 times
...
Jobalos009
Most Recent 11 months ago
I'm confused. This powershell cmd creates a service bus queue: New-AzServiceBusQueue -ResourceGroupName ContosoRG -NamespaceName ContosoSBusNS -Name ContosoOrdersQueue But the answer is New-AzureRmServiceBusQueue (...) ?
upvoted 1 times
...
AbidooKing
1 year, 10 months ago
Got this 2023July13. Went with given answer. score 917
upvoted 5 times
...
elequiel
2 years, 7 months ago
Got it in exam 20/10/2022
upvoted 3 times
...
Eltooth
2 years, 11 months ago
C is correct answer.
upvoted 6 times
...
[Removed]
3 years, 1 month ago
Agree with the accepted answer but given question 9, this seems less like it is testing your knowledge and more an attempt to trick you.
upvoted 4 times
...
SivajiTheBoss
3 years, 2 months ago
This is the command to create Service bus namespace. New-AzServiceBusNamespace -ResourceGroupName ContosoRG -Name ContosoSBusNS -Location eastus Option C is wrong New-AzureRM....
upvoted 1 times
SivajiTheBoss
3 years, 2 months ago
To create ServiceBusQueue this is the command in Powershell New-AzServiceBusQueue -ResourceGroupName ContosoRG -NamespaceName ContosoSBusNS -Name ContosoOrdersQueue
upvoted 1 times
SivajiTheBoss
3 years, 2 months ago
Correct Answer C: As needs to creata instance of Queue
upvoted 1 times
...
...
...
edengoforit
3 years, 4 months ago
The description is almost the same as the question #9. Hence, after creating a namespace, we should create a Service Bus Queue thus provided answer is correct. Answer should be C
upvoted 3 times
...
Richard2021
3 years, 8 months ago
the correction answer is B.
upvoted 2 times
...
Illumielle
3 years, 9 months ago
This is a repeat of question 9. But it seems to have different answers.
upvoted 2 times
ReniRechner
3 years, 3 months ago
this is because there is more than 1 way to do it...
upvoted 2 times
...
...
ning
3 years, 9 months ago
No idea what question is this ... Steps should be 1. create a resource group 2. create a service bus namespace 3. create a service bus queue 4. get connection string for the queue
upvoted 2 times
ning
3 years, 9 months ago
There is no such thing called service bus instance ... Only Service Bus Namespace, Service Bus Queue Or Service Bus Topic
upvoted 1 times
ReniRechner
3 years, 3 months ago
namespace = instance
upvoted 1 times
warchoon
2 years, 2 months ago
Everything created is an instance. It's a trick
upvoted 1 times
...
...
...
...
mc0re
3 years, 9 months ago
A namespace must be created before creating a queue. So why not B or D? https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-cli
upvoted 1 times
asdasdasg2
3 years, 5 months ago
The question states that you have already created the service bus, which is what "creating a namespace" does. So therefore the next step is to create the queue
upvoted 2 times
...
...
if54uran
3 years, 11 months ago
This question does not seem to make much sense
upvoted 4 times
...
jokergester
4 years, 2 months ago
There is a requirement to provide an instance and yet the correct answer does not have the prior creation of the namespace. "C" would be ideal if the namespace is created prior to the script.
upvoted 2 times
Zidimirite
4 years, 1 month ago
"You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location." They seem to ask you to do this, but in this case I think they mean that you've done that and next "You need to complete the configuration.", which is adding a queue to the just created namespace. So C is right. It has to be right, A makes no sense and B and D both do the same thing.
upvoted 14 times
rustycables
3 years, 9 months ago
I don't know but guessed D. D seems more like a CLI command, and it also has location - which is specified in the question. C does not have location and does not look like a typical CLI command that begins AZ.
upvoted 2 times
satyadharma
3 years, 7 months ago
It is a powershell command which is mentioned in question as well. C is correct answer
upvoted 2 times
ArturoM64
5 months, 1 week ago
The answer C command is from the older AzureRM module. For newer Azure PowerShell deployments, you should use the Az module equivalent: New-AzServiceBusQueue
upvoted 1 times
...
...
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...