我有一个现有的服务总线,其中使用 Azure 资源管理器部署了一个队列和事件中心。
现在我有兴趣使用 Azure PowerShell 检索主键和连接字符串,而不使用 ServiceBus.dll。是否可以??
作为一种解决方法,我创建了一个 ARM 模板,它不部署任何东西,只是查询现有资源并检索我需要的信息。以下模板检索特定服务总线命名空间的事件中心/队列的连接字符串和主键
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serviceBusNamespace": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the service bus namespace to create."
}
},
"resourceName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the resource to be retreived."
}
},
"resourceType": {
"type": "string",
"minLength": 1,
"allowedValues": [
"queues",
"eventhubs"
],
"metadata": {
"description": "The type of the resource"
}
},
"policy": { …
Run Code Online (Sandbox Code Playgroud) azure azure-powershell azure-resource-manager azure-rm-template
我已经创建了一个用于部署Azure Service Bus的ARM模板,该模板还包括事件中心和队列.模板成功创建了队列和事件中心,但有时授权规则有些未创建(20%的时间).下面是我在挣扎之后创建的模板的修剪版本:P.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "South Central US",
"metadata": {
"description": "The location where all azure resources will be deployed."
}
},
"serviceBusNamespace": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the service bus namespace to create."
}
},
"queueName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the queue to create."
}
},
"hubName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The …
Run Code Online (Sandbox Code Playgroud) azure azure-powershell azure-resource-manager azure-rm-template
我有一个连续运行的Web作业,它监听start
队列和停止queue
各自的功能.Web作业中有3个预定义进程,start
队列中包含一条消息,该消息提到要启动的进程名称,而stop
队列中包含一条消息,提示要停止进程名称.
当webjob停止进程时,它会在过去4周内因上述异常而崩溃并重新启动.
Executing: 'Functions.StartProcess' because New queue message detected on 'start'.
Updated the status of Process A to 1
Process A Started
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Process A processed 200 records
Executing: 'Functions.StopProcess' because New queue message detected on 'stop'.
Process A stopped
Disposed Process A
Updated the status of Process A to 3
Unhandled Exception: …
Run Code Online (Sandbox Code Playgroud) 我为DocumentDB,Azure SQL Server,存储帐户,Azure Key Vault,Azure Batch,HDInsight Cluster创建了单独的ARM模板.
New-AzureRmResourceGroupDeployment
当我在同一资源组中的循环中部署上述资源时使用powershell命令,我发现了一个奇怪的行为.在部署DocDB时,资源组中以前部署的所有资源都会消失(可能会自动删除).部署Azure SQL Server时的情况也是如此.
有人遇到过同样的问题吗?有修复吗?