The highest tagged major version is
v51.
command
Version:
v10.3.1-beta+incompatible
Opens a new window with list of versions in this module.
Published: Sep 6, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Example Accessing the Azure DNS API
Prerequisites
-
Create an Azure Resource Group. The code assumes delete-dns
as the name: az group create -l westus -n delete-dns
-
Create a Service Principal to access the resource group for example with the Azure CLI
az ad sp create-for-rbac --role contributor --scopes /subscriptions/<your subscription id>/resourceGroups/delete-dns
{
"appId": "<appId>",
"displayName": "<displayName>",
"name": "<name>",
"password": "<password>",
"tenant": "<tenantId>"
}
- Set the following environment variables from the service principal
- AZURE_CLIENT_ID=
- AZURE_CLIENT_SECRET=
- AZURE_SUBSCRIPTION_ID=
- AZURE_TENANT_ID=
You can query the subscription id for your subscription with: az account show --query id
- Get the dependencies
- go get github.com/Azure/go-autorest/autorest
- go get github.com/Azure/go-autorest/autorest/azure
- github.com/Azure/azure-sdk-for-go/arm
Run the sample
Execute with go run create.go
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.