Azure powershell cmdlet to create an Azure Service bus queue and pace

Are there any Azure command line tools for creating and managing the Azure Service bus queue and themes? The following link does not provide this: http://msdn.microsoft.com/library/windowsazure/jj983731.aspx

Is Microsoft planning to release this anytime soon?

+4
source share
3 answers

There are currently no PowerShell cmdlets for queues and Service Bus themes. They have cmdlets for creating namespaces and some ACS objects, but they are not used yet. The cross-platform Azure command-line tool has the same features.

You can track what's in PowerShell Cmdlets, or even see a bit before releasing on Windows Azure SDK-Tools Backup on GitHub. This is the public repo of the code that makes up PowerShell cmdlets.

I have not seen any public announcements about when / when this feature will be added to cmdlets or CLI tools.

+3
source
 Save the given below template in json file and execute the given below powershell command 
 ----------------------------------------------------------------
 param(
 [Parameter(Mandatory=$True)]
 [string]
 $resourceGroupName,
 [string]
 $resourceGroupLocation,
 [Parameter(Mandatory=$True)]
 [string]
 $templateFilePath = "C:\ARM-ServiceBus\sb_template.json",
 [string]
 $parametersFilePath = "C:\ARM-ServiceBus\sb_parameters.json"
  )

 #***********************************************************************
 # Script body
 # Execution begins here
 #***********************************************************************
  $ErrorActionPreference = "Stop"
  $subscriptionId ='1234-545-474f-4544-5454454545'

  # sign in
   Write-Host "Logging in...";
   Login-AzureRmAccount;

  # select subscription
  Write-Host "Selecting subscription '$subscriptionId'";
  Select-AzureRmSubscription -SubscriptionID $subscriptionId;

  #Create or check for existing resource group
   $resourceGroup = Get-AzureRmResourceGroup -Name $resourceGroupName -
    ErrorAction SilentlyContinue
  if(!$resourceGroup)
  {
     Write-Host "Resource group '$resourceGroupName' does not exist. To 
     create a new resource group, please enter a location.";
   if(!$resourceGroupLocation) {
        $resourceGroupLocation = Read-Host "resourceGroupLocation";
     }
    Write-Host "Creating resource group '$resourceGroupName' in location 
   '$resourceGroupLocation'";
    New-AzureRmResourceGroup -Name $resourceGroupName -Location 
    $resourceGroupLocation
    }
    else{
       Write-Host "Using existing resource group '$resourceGroupName'";
        }

     # Start the deployment
       Write-Host "Starting deployment...";
       if(Test-Path $parametersFilePath) {
       New-AzureRmResourceGroupDeployment -ResourceGroupName 
        $resourceGroupName -TemplateFile $templateFilePath -
       TemplateParameterFile $parametersFilePath;
     } else {
     New-AzureRmResourceGroupDeployment -ResourceGroupName 
       $resourceGroupName -TemplateFile $templateFilePath;
        }

      --------------Template(sb_template.json)--------------------------

     {
      "$schema": "http://schema.management.azure.com/schemas/2014-04-01-
        preview/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
             "serviceBusNamespaceName": {
             "type": "string",
             "metadata": {
             "description": "Name of the Service Bus namespace"
              }
            },
             "serviceBusQueueName": {
             "type": "string",
             "metadata": {
             "description": "Name of the Queue"
               }
             },
             "serviceBusApiVersion": {
             "type": "string",
             "defaultValue": "2015-08-01",
             "metadata": {
               "description": "Service Bus ApiVersion used by the template"
                     }
            }
       },
      "variables": {
      "location": "[resourceGroup().location]",
      "sbVersion": "[parameters('serviceBusApiVersion')]",
      "defaultSASKeyName": "RootManageSharedAccessKey",
      "authRuleResourceId": "
        [resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', 
       parameters('serviceBusNamespaceName'), 
       variables('defaultSASKeyName'))]"
     },
   "resources": [{
    "apiVersion": "[variables('sbVersion')]",
    "name": "[parameters('serviceBusNamespaceName')]",
    "type": "Microsoft.ServiceBus/Namespaces",
    "location": "[variables('location')]",
    "kind": "Messaging",
  "sku": {
    "name": "StandardSku",
    "tier": "Standard",
    "capacity": 1
  },
    "resources": [{
        "apiVersion": "[variables('sbVersion')]",
        "name": "[parameters('serviceBusQueueName')]",
        "type": "Queues",
        "dependsOn": [
            "[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]"
        ],
        "properties": {
            "path": "[parameters('serviceBusQueueName')]"
        }
    }]
}],
"outputs": {
    "NamespaceConnectionString": {
        "type": "string",
        "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryConnectionString]"
    },
    "SharedAccessPolicyPrimaryKey": {
        "type": "string",
        "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryKey]"
    }
}
}
0
source

All Articles