├── storage ├── version.go ├── util_1.7.go ├── util_1.8.go ├── odata.go ├── recordings │ ├── StorageClientSuite │ │ └── TestReturnsStorageServiceError_withoutResponseBody.yaml │ ├── StorageTableSuite │ │ └── TestSetPermissionsUnsuccessfully.yaml │ └── StorageQueueSuite │ │ └── TestCreateQueue_DeleteQueue.yaml ├── queueserviceclient.go └── storagepolicy.go ├── management ├── version.go ├── util.go ├── virtualmachine │ ├── resourceextensions_test.go │ └── resourceextensions.go ├── location │ ├── client.go │ └── entities.go ├── vmutils │ ├── configurationset.go │ ├── extensions_test.go │ ├── rolestate.go │ └── datadisks.go ├── README.md ├── errors_test.go ├── storageservice │ └── entities_test.go ├── errors.go ├── osimage │ └── client.go └── virtualnetwork │ └── client.go ├── NOTICE ├── glide.yaml ├── .gitignore ├── rungas.sh ├── arm ├── examples │ ├── dns │ │ └── README.md │ └── helpers │ │ └── helpers.go ├── sql │ └── version.go ├── web │ └── version.go ├── cdn │ └── version.go ├── dns │ ├── version.go │ └── client.go ├── compute │ ├── version.go │ └── client.go ├── insights │ ├── version.go │ └── client.go ├── monitor │ ├── version.go │ └── client.go ├── network │ └── version.go ├── batch │ ├── version.go │ └── client.go ├── disk │ ├── version.go │ └── client.go ├── iothub │ ├── version.go │ └── client.go ├── logic │ └── version.go ├── redis │ ├── version.go │ └── client.go ├── relay │ ├── version.go │ └── client.go ├── search │ ├── version.go │ └── client.go ├── advisor │ ├── version.go │ └── client.go ├── eventhub │ ├── version.go │ └── client.go ├── graphrbac │ ├── version.go │ └── client.go ├── keyvault │ └── version.go ├── mysql │ ├── version.go │ └── mysql_test.go ├── storage │ ├── version.go │ └── client.go ├── apimanagement │ ├── version.go │ └── client.go ├── billing │ └── version.go ├── cosmos-db │ ├── version.go │ └── client.go ├── intune │ └── version.go ├── resources │ ├── links │ │ └── version.go │ ├── locks │ │ └── version.go │ ├── policy │ │ └── version.go │ ├── features │ │ └── version.go │ ├── resources │ │ ├── version.go │ │ └── client.go │ ├── subscriptions │ │ └── version.go │ └── managedapplications │ │ └── version.go ├── scheduler │ ├── version.go │ └── client.go ├── appinsights │ ├── version.go │ └── client.go ├── automation │ ├── version.go │ └── client.go ├── commerce │ ├── version.go │ └── client.go ├── devtestlabs │ ├── version.go │ └── client.go ├── servicebus │ ├── version.go │ └── client.go ├── authorization │ └── version.go ├── datalake-store │ └── account │ │ ├── version.go │ │ └── client.go ├── documentdb │ ├── version.go │ └── client.go ├── eventgrid │ ├── version.go │ └── client.go ├── hdinsight │ ├── version.go │ └── client.go ├── mediaservices │ ├── version.go │ └── client.go ├── postgresql │ ├── version.go │ └── postgresql_test.go ├── recoveryservices │ ├── version.go │ └── client.go ├── service-map │ ├── version.go │ └── client.go ├── servicefabric │ ├── version.go │ └── client.go ├── consumption │ └── version.go ├── datalake-analytics │ └── account │ │ ├── version.go │ │ └── client.go ├── resourcehealth │ └── version.go ├── trafficmanager │ ├── version.go │ └── client.go ├── containerservice │ ├── version.go │ └── client.go ├── customer-insights │ └── version.go ├── machinelearning │ ├── webservices │ │ └── version.go │ └── commitmentplans │ │ └── version.go ├── mobileengagement │ ├── version.go │ └── client.go ├── notificationhubs │ ├── version.go │ └── client.go ├── powerbiembedded │ └── version.go ├── streamanalytics │ ├── version.go │ └── client.go ├── analysisservices │ └── version.go ├── cognitiveservices │ ├── version.go │ └── client.go ├── containerinstance │ ├── version.go │ └── client.go ├── containerregistry │ ├── version.go │ └── client.go ├── recoveryservicesbackup │ ├── version.go │ └── client.go ├── servermanagement │ └── version.go ├── storageimportexport │ └── version.go ├── operationalinsights │ └── version.go ├── storsimple8000series │ ├── version.go │ └── client.go ├── recoveryservicessiterecovery │ └── version.go ├── deployment │ └── deployment.go ├── apimdeployment │ └── version.go └── networkwatcher │ └── version.go ├── dataplane └── keyvault │ └── version.go ├── datalake-store └── filesystem │ ├── version.go │ └── client.go └── .travis.yml /storage/version.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | var ( 4 | sdkVersion = "10.0.2" 5 | ) 6 | -------------------------------------------------------------------------------- /management/version.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package management 4 | 5 | var ( 6 | sdkVersion = "v10.3.1-beta" 7 | ) 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Microsoft Azure-SDK-for-Go 2 | Copyright 2014-2017 Microsoft 3 | 4 | This product includes software developed at 5 | the Microsoft Corporation (https://www.microsoft.com). 6 | -------------------------------------------------------------------------------- /storage/util_1.7.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package storage 4 | 5 | import ( 6 | "io" 7 | "net/http" 8 | ) 9 | 10 | func setContentLengthFromLimitedReader(req *http.Request, lr *io.LimitedReader) { 11 | req.ContentLength = lr.N 12 | } 13 | -------------------------------------------------------------------------------- /management/util.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package management 4 | 5 | import ( 6 | "io/ioutil" 7 | "net/http" 8 | ) 9 | 10 | func getResponseBody(response *http.Response) ([]byte, error) { 11 | defer response.Body.Close() 12 | return ioutil.ReadAll(response.Body) 13 | } 14 | -------------------------------------------------------------------------------- /glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/Azure/azure-sdk-for-go 2 | import: 3 | - package: github.com/Azure/go-autorest 4 | version: ~8.2.0 5 | subpackages: 6 | - /autorest 7 | - autorest/azure 8 | - autorest/date 9 | - autorest/to 10 | - package: golang.org/x/crypto 11 | subpackages: 12 | - /pkcs12 13 | - package: gopkg.in/check.v1 14 | -------------------------------------------------------------------------------- /storage/util_1.8.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package storage 4 | 5 | import ( 6 | "io" 7 | "io/ioutil" 8 | "net/http" 9 | ) 10 | 11 | func setContentLengthFromLimitedReader(req *http.Request, lr *io.LimitedReader) { 12 | req.ContentLength = lr.N 13 | snapshot := *lr 14 | req.GetBody = func() (io.ReadCloser, error) { 15 | r := snapshot 16 | return ioutil.NopCloser(&r), nil 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | # Editor swap files 27 | *.swp 28 | *~ 29 | .DS_Store 30 | 31 | # ignore vendor/ 32 | vendor/ 33 | -------------------------------------------------------------------------------- /rungas.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GITBRANCH=`git rev-parse --abbrev-ref HEAD` 3 | #We intend to only run gas on release branches. 4 | if [ "master" != $GITBRANCH ]; then 5 | exit 0 6 | fi 7 | REALEXITSTATUS=0 8 | go get -u github.com/HewlettPackard/gas 9 | gas -skip=*/arm/*/models.go -skip=*/management/examples/*.go -skip=*vendor* -skip=*/Gododir/* ./... | tee /dev/stderr 10 | REALEXITSTATUS=$(($REALEXITSTATUS+$?)) 11 | gas -exclude=G101 ./arm/... ./management/examples/... | tee /dev/stderr 12 | REALEXITSTATUS=$(($REALEXITSTATUS+$?)) 13 | gas -exclude=G204 ./Gododir/... | tee /dev/stderr 14 | REALEXITSTATUS=$(($REALEXITSTATUS+$?)) 15 | exit $REALEXITSTATUS -------------------------------------------------------------------------------- /management/virtualmachine/resourceextensions_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package virtualmachine 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/Azure/azure-sdk-for-go/management/testutils" 9 | ) 10 | 11 | func TestAzureGetResourceExtensions(t *testing.T) { 12 | client := testutils.GetTestClient(t) 13 | 14 | list, err := NewClient(client).GetResourceExtensions() 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | 19 | t.Logf("Found %d extensions", len(list)) 20 | if len(list) == 0 { 21 | t.Fatal("Huh, no resource extensions at all? Something must be wrong.") 22 | } 23 | 24 | for _, extension := range list { 25 | if extension.Name == "" { 26 | t.Fatalf("Resource with empty name? Something must have gone wrong with serialization: %+v", extension) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /management/virtualmachine/resourceextensions.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package virtualmachine 4 | 5 | import ( 6 | "encoding/xml" 7 | ) 8 | 9 | const ( 10 | azureResourceExtensionsURL = "services/resourceextensions" 11 | ) 12 | 13 | // GetResourceExtensions lists the resource extensions that are available to add 14 | // to a virtual machine. 15 | // 16 | // See https://msdn.microsoft.com/en-us/library/azure/dn495441.aspx 17 | func (c VirtualMachineClient) GetResourceExtensions() (extensions []ResourceExtension, err error) { 18 | data, err := c.client.SendAzureGetRequest(azureResourceExtensionsURL) 19 | if err != nil { 20 | return extensions, err 21 | } 22 | 23 | var response ResourceExtensions 24 | err = xml.Unmarshal(data, &response) 25 | extensions = response.List 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /management/location/client.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | // Package location provides a client for Locations. 4 | package location 5 | 6 | import ( 7 | "encoding/xml" 8 | 9 | "github.com/Azure/azure-sdk-for-go/management" 10 | ) 11 | 12 | const ( 13 | azureLocationListURL = "locations" 14 | errParamNotSpecified = "Parameter %s is not specified." 15 | ) 16 | 17 | //NewClient is used to instantiate a new LocationClient from an Azure client 18 | func NewClient(client management.Client) LocationClient { 19 | return LocationClient{client: client} 20 | } 21 | 22 | func (c LocationClient) ListLocations() (ListLocationsResponse, error) { 23 | var l ListLocationsResponse 24 | 25 | response, err := c.client.SendAzureGetRequest(azureLocationListURL) 26 | if err != nil { 27 | return l, err 28 | } 29 | 30 | err = xml.Unmarshal(response, &l) 31 | return l, err 32 | } 33 | -------------------------------------------------------------------------------- /management/vmutils/configurationset.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package vmutils 4 | 5 | import ( 6 | vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine" 7 | ) 8 | 9 | func updateOrAddConfig(configs []vm.ConfigurationSet, configType vm.ConfigurationSetType, update func(*vm.ConfigurationSet)) []vm.ConfigurationSet { 10 | config := findConfig(configs, configType) 11 | if config == nil { 12 | configs = append(configs, vm.ConfigurationSet{ConfigurationSetType: configType}) 13 | config = findConfig(configs, configType) 14 | } 15 | update(config) 16 | 17 | return configs 18 | } 19 | 20 | func findConfig(configs []vm.ConfigurationSet, configType vm.ConfigurationSetType) *vm.ConfigurationSet { 21 | for i, config := range configs { 22 | if config.ConfigurationSetType == configType { 23 | // need to return a pointer to the original set in configs, 24 | // not the copy made by the range iterator 25 | return &configs[i] 26 | } 27 | } 28 | 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /storage/odata.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | // MetadataLevel determines if operations should return a paylod, 4 | // and it level of detail. 5 | type MetadataLevel string 6 | 7 | // This consts are meant to help with Odata supported operations 8 | const ( 9 | OdataTypeSuffix = "@odata.type" 10 | 11 | // Types 12 | 13 | OdataBinary = "Edm.Binary" 14 | OdataDateTime = "Edm.DateTime" 15 | OdataGUID = "Edm.Guid" 16 | OdataInt64 = "Edm.Int64" 17 | 18 | // Query options 19 | 20 | OdataFilter = "$filter" 21 | OdataOrderBy = "$orderby" 22 | OdataTop = "$top" 23 | OdataSkip = "$skip" 24 | OdataCount = "$count" 25 | OdataExpand = "$expand" 26 | OdataSelect = "$select" 27 | OdataSearch = "$search" 28 | 29 | EmptyPayload MetadataLevel = "" 30 | NoMetadata MetadataLevel = "application/json;odata=nometadata" 31 | MinimalMetadata MetadataLevel = "application/json;odata=minimalmetadata" 32 | FullMetadata MetadataLevel = "application/json;odata=fullmetadata" 33 | ) 34 | -------------------------------------------------------------------------------- /storage/recordings/StorageClientSuite/TestReturnsStorageServiceError_withoutResponseBody.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | rwmutex: {} 4 | interactions: 5 | - request: 6 | body: "" 7 | form: {} 8 | headers: 9 | Authorization: 10 | - SharedKey golangrocksonazure:qhGZiaCHNiYsRfaoTtCYO77QlFb5n7sHmR132syWtto= 11 | User-Agent: 12 | - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 13 | blob 14 | x-ms-date: 15 | - Thu, 20 Jul 2017 23:33:55 GMT 16 | x-ms-version: 17 | - 2016-05-31 18 | url: https://golangrocksonazure.blob.core.windows.net/non-existing-container/non-existing-blob 19 | method: HEAD 20 | response: 21 | body: "" 22 | headers: 23 | Date: 24 | - Thu, 20 Jul 2017 23:33:55 GMT 25 | Server: 26 | - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 27 | X-Ms-Request-Id: 28 | - 7d612eea-0001-0009-14b0-01ca46000000 29 | X-Ms-Version: 30 | - 2016-05-31 31 | status: 404 The specified container does not exist. 32 | code: 404 33 | -------------------------------------------------------------------------------- /management/README.md: -------------------------------------------------------------------------------- 1 | # Azure Service Management packages for Go 2 | 3 | The `github.com/Azure/azure-sdk-for-go/management` packages are used to perform operations using the Azure Service Management (ASM), aka classic deployment model. Read more about [Azure Resource Manager vs. classic deployment](https://azure.microsoft.com/documentation/articles/resource-manager-deployment-model/). Packages for Azure Resource Manager are in the [arm](../arm) folder. 4 | Note that this package requires Go 1.7+ to build. 5 | This package is in mainteinance mode and will only receive bug fixes. It is recommended to [migrate to Azure Resource Manager](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-deployment-model) deployment model. 6 | 7 | ## First a Sidenote: Authentication and the Azure Service Manager 8 | 9 | The client currently supports authentication to the Service Management 10 | API with certificates or Azure `.publishSettings` file. You can 11 | download the `.publishSettings` file for your subscriptions 12 | [here](https://manage.windowsazure.com/publishsettings). 13 | -------------------------------------------------------------------------------- /management/errors_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package management_test 4 | 5 | import ( 6 | "fmt" 7 | "testing" 8 | 9 | "github.com/Azure/azure-sdk-for-go/management" 10 | ) 11 | 12 | // TestIsResourceNotFoundError tests IsResourceNotFoundError with the 13 | // set of given test cases. 14 | func TestIsResourceNotFoundError(t *testing.T) { 15 | // isResourceNotFoundTestCases is a set of structs comprising of the error 16 | // IsResourceNotFoundError should test and the expected result. 17 | var isResourceNotFoundTestCases = []struct { 18 | err error 19 | expected bool 20 | }{ 21 | {nil, false}, 22 | {fmt.Errorf("Some other random error."), false}, 23 | {management.AzureError{Code: "ResourceNotFound"}, true}, 24 | {management.AzureError{Code: "NotAResourceNotFound"}, false}, 25 | } 26 | 27 | for i, testCase := range isResourceNotFoundTestCases { 28 | if res := management.IsResourceNotFoundError(testCase.err); res != testCase.expected { 29 | t.Fatalf("Test %d: error %s - expected %t - got %t", i+1, testCase.err, testCase.expected, res) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /management/location/entities.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package location 4 | 5 | import ( 6 | "bytes" 7 | "encoding/xml" 8 | "fmt" 9 | "strings" 10 | 11 | "github.com/Azure/azure-sdk-for-go/management" 12 | ) 13 | 14 | //LocationClient is used to perform operations on Azure Locations 15 | type LocationClient struct { 16 | client management.Client 17 | } 18 | 19 | type ListLocationsResponse struct { 20 | XMLName xml.Name `xml:"Locations"` 21 | Locations []Location `xml:"Location"` 22 | } 23 | 24 | type Location struct { 25 | Name string 26 | DisplayName string 27 | AvailableServices []string `xml:"AvailableServices>AvailableService"` 28 | WebWorkerRoleSizes []string `xml:"ComputeCapabilities>WebWorkerRoleSizes>RoleSize"` 29 | VirtualMachineRoleSizes []string `xml:"ComputeCapabilities>VirtualMachinesRoleSizes>RoleSize"` 30 | } 31 | 32 | func (ll ListLocationsResponse) String() string { 33 | var buf bytes.Buffer 34 | for _, l := range ll.Locations { 35 | fmt.Fprintf(&buf, "%s, ", l.Name) 36 | } 37 | 38 | return strings.Trim(buf.String(), ", ") 39 | } 40 | -------------------------------------------------------------------------------- /management/storageservice/entities_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package storageservice 4 | 5 | import ( 6 | "encoding/xml" 7 | "testing" 8 | ) 9 | 10 | func Test_StorageServiceKeysResponse_Unmarshal(t *testing.T) { 11 | // from https://msdn.microsoft.com/en-us/library/azure/ee460785.aspx 12 | response := []byte(` 13 | 14 | storage-service-url 15 | 16 | primary-key 17 | secondary-key 18 | 19 | `) 20 | 21 | keysResponse := GetStorageServiceKeysResponse{} 22 | err := xml.Unmarshal(response, &keysResponse) 23 | if err != nil { 24 | t.Fatal(err) 25 | } 26 | 27 | if expected := "primary-key"; keysResponse.PrimaryKey != expected { 28 | t.Fatalf("Expected %q but got %q", expected, keysResponse.PrimaryKey) 29 | } 30 | if expected := "secondary-key"; keysResponse.SecondaryKey != expected { 31 | t.Fatalf("Expected %q but got %q", expected, keysResponse.SecondaryKey) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /arm/examples/dns/README.md: -------------------------------------------------------------------------------- 1 | # Example Accessing the Azure DNS API 2 | 3 | ## Prerequisites 4 | 5 | 1. Create an Azure Resource Group. The code assumes `delete-dns` as the name: `az group create -l westus -n delete-dns` 6 | 7 | 2. Create a Service Principal to access the resource group for example with the Azure CLI 8 | ``` 9 | az ad sp create-for-rbac --role contributor --scopes /subscriptions//resourceGroups/delete-dns 10 | 11 | { 12 | "appId": "", 13 | "displayName": "", 14 | "name": "", 15 | "password": "", 16 | "tenant": "" 17 | } 18 | ``` 19 | 3. Set the following environment variables from the service principal 20 | - AZURE_CLIENT_ID= 21 | - AZURE_CLIENT_SECRET= 22 | - AZURE_SUBSCRIPTION_ID= 23 | - AZURE_TENANT_ID= 24 | 25 | You can query the subscription id for your subscription with: `az account show --query id` 26 | 27 | 4. Get the dependencies 28 | - go get github.com/Azure/go-autorest/autorest 29 | - go get github.com/Azure/go-autorest/autorest/azure 30 | - github.com/Azure/azure-sdk-for-go/arm 31 | 32 | ## Run the sample 33 | 34 | Execute with `go run create.go` -------------------------------------------------------------------------------- /arm/sql/version.go: -------------------------------------------------------------------------------- 1 | package sql 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-sql/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/web/version.go: -------------------------------------------------------------------------------- 1 | package web 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-web/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /storage/queueserviceclient.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | // QueueServiceClient contains operations for Microsoft Azure Queue Storage 4 | // Service. 5 | type QueueServiceClient struct { 6 | client Client 7 | auth authentication 8 | } 9 | 10 | // GetServiceProperties gets the properties of your storage account's queue service. 11 | // See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/get-queue-service-properties 12 | func (q *QueueServiceClient) GetServiceProperties() (*ServiceProperties, error) { 13 | return q.client.getServiceProperties(queueServiceName, q.auth) 14 | } 15 | 16 | // SetServiceProperties sets the properties of your storage account's queue service. 17 | // See: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/set-queue-service-properties 18 | func (q *QueueServiceClient) SetServiceProperties(props ServiceProperties) error { 19 | return q.client.setServiceProperties(props, queueServiceName, q.auth) 20 | } 21 | 22 | // GetQueueReference returns a Container object for the specified queue name. 23 | func (q *QueueServiceClient) GetQueueReference(name string) *Queue { 24 | return &Queue{ 25 | qsc: q, 26 | Name: name, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /arm/cdn/version.go: -------------------------------------------------------------------------------- 1 | package cdn 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-cdn/2016-10-02" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/dns/version.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-dns/2016-04-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/compute/version.go: -------------------------------------------------------------------------------- 1 | package compute 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-compute/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/insights/version.go: -------------------------------------------------------------------------------- 1 | package insights 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.2.0-beta arm-insights/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.2.0-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/monitor/version.go: -------------------------------------------------------------------------------- 1 | package monitor 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-monitor/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/network/version.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-network/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/batch/version.go: -------------------------------------------------------------------------------- 1 | package batch 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-batch/2017-05-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/disk/version.go: -------------------------------------------------------------------------------- 1 | package disk 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.2.0-beta arm-disk/2016-04-30-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.2.0-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/iothub/version.go: -------------------------------------------------------------------------------- 1 | package iothub 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-iothub/2017-07-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/logic/version.go: -------------------------------------------------------------------------------- 1 | package logic 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-logic/2016-06-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/redis/version.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-redis/2017-02-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/relay/version.go: -------------------------------------------------------------------------------- 1 | package relay 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-relay/2017-04-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/search/version.go: -------------------------------------------------------------------------------- 1 | package search 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-search/2015-08-19" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/advisor/version.go: -------------------------------------------------------------------------------- 1 | package advisor 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-advisor/2017-04-19" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/eventhub/version.go: -------------------------------------------------------------------------------- 1 | package eventhub 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-eventhub/2017-04-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/graphrbac/version.go: -------------------------------------------------------------------------------- 1 | package graphrbac 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-graphrbac/1.6" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/keyvault/version.go: -------------------------------------------------------------------------------- 1 | package keyvault 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/mysql/version.go: -------------------------------------------------------------------------------- 1 | package mysql 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-mysql/2017-04-30-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/storage/version.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-storage/2017-06-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/apimanagement/version.go: -------------------------------------------------------------------------------- 1 | package apimanagement 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.2.0-beta arm-apimanagement/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.2.0-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/billing/version.go: -------------------------------------------------------------------------------- 1 | package billing 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-billing/2017-04-24-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/cosmos-db/version.go: -------------------------------------------------------------------------------- 1 | package cosmosdb 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-cosmosdb/2015-04-08" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/intune/version.go: -------------------------------------------------------------------------------- 1 | package intune 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-intune/2015-01-14-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/links/version.go: -------------------------------------------------------------------------------- 1 | package links 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-links/2016-09-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/locks/version.go: -------------------------------------------------------------------------------- 1 | package locks 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-locks/2016-09-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/policy/version.go: -------------------------------------------------------------------------------- 1 | package policy 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-policy/2016-12-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/scheduler/version.go: -------------------------------------------------------------------------------- 1 | package scheduler 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-scheduler/2016-03-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /management/errors.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package management 4 | 5 | import ( 6 | "encoding/xml" 7 | "fmt" 8 | ) 9 | 10 | // AzureError represents an error returned by the management API. It has an error 11 | // code (for example, ResourceNotFound) and a descriptive message. 12 | type AzureError struct { 13 | Code string 14 | Message string 15 | } 16 | 17 | //Error implements the error interface for the AzureError type. 18 | func (e AzureError) Error() string { 19 | return fmt.Sprintf("Error response from Azure. Code: %s, Message: %s", e.Code, e.Message) 20 | } 21 | 22 | // IsResourceNotFoundError returns true if the provided error is an AzureError 23 | // reporting that a given resource has not been found. 24 | func IsResourceNotFoundError(err error) bool { 25 | azureErr, ok := err.(AzureError) 26 | return ok && azureErr.Code == "ResourceNotFound" 27 | } 28 | 29 | // getAzureError converts an error response body into an AzureError instance. 30 | func getAzureError(responseBody []byte) error { 31 | var azErr AzureError 32 | err := xml.Unmarshal(responseBody, &azErr) 33 | if err != nil { 34 | return fmt.Errorf("Failed parsing contents to AzureError format: %v", err) 35 | } 36 | return azErr 37 | 38 | } 39 | -------------------------------------------------------------------------------- /arm/appinsights/version.go: -------------------------------------------------------------------------------- 1 | package appinsights 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-appinsights/2015-05-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/automation/version.go: -------------------------------------------------------------------------------- 1 | package automation 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-automation/2015-10-31" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/commerce/version.go: -------------------------------------------------------------------------------- 1 | package commerce 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-commerce/2015-06-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/devtestlabs/version.go: -------------------------------------------------------------------------------- 1 | package devtestlabs 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-devtestlabs/2016-05-15" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/features/version.go: -------------------------------------------------------------------------------- 1 | package features 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-features/2015-12-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/servicebus/version.go: -------------------------------------------------------------------------------- 1 | package servicebus 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-servicebus/2017-04-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /dataplane/keyvault/version.go: -------------------------------------------------------------------------------- 1 | package keyvault 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/authorization/version.go: -------------------------------------------------------------------------------- 1 | package authorization 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-authorization/2015-07-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/datalake-store/account/version.go: -------------------------------------------------------------------------------- 1 | package account 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/documentdb/version.go: -------------------------------------------------------------------------------- 1 | package documentdb 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 18 | // Changes may cause incorrect behavior and will be lost if the code is 19 | // regenerated. 20 | 21 | // UserAgent returns the UserAgent string to use when sending http.Requests. 22 | func UserAgent() string { 23 | return "Azure-SDK-For-Go/v10.2.0-beta arm-documentdb/2015-04-08" 24 | } 25 | 26 | // Version returns the semantic version (see http://semver.org) of the client. 27 | func Version() string { 28 | return "v10.2.0-beta" 29 | } 30 | -------------------------------------------------------------------------------- /arm/eventgrid/version.go: -------------------------------------------------------------------------------- 1 | package eventgrid 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-eventgrid/2017-06-15-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/hdinsight/version.go: -------------------------------------------------------------------------------- 1 | package hdinsight 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-hdinsight/2015-03-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/mediaservices/version.go: -------------------------------------------------------------------------------- 1 | package mediaservices 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-mediaservices/2015-10-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/postgresql/version.go: -------------------------------------------------------------------------------- 1 | package postgresql 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-postgresql/2017-04-30-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/recoveryservices/version.go: -------------------------------------------------------------------------------- 1 | package recoveryservices 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservices/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/resources/version.go: -------------------------------------------------------------------------------- 1 | package resources 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-resources/2017-05-10" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/service-map/version.go: -------------------------------------------------------------------------------- 1 | package servicemap 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-servicemap/2015-11-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/servicefabric/version.go: -------------------------------------------------------------------------------- 1 | package servicefabric 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-servicefabric/2016-09-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/consumption/version.go: -------------------------------------------------------------------------------- 1 | package consumption 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-consumption/2017-04-24-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/datalake-analytics/account/version.go: -------------------------------------------------------------------------------- 1 | package account 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resourcehealth/version.go: -------------------------------------------------------------------------------- 1 | package resourcehealth 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-resourcehealth/2017-07-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/trafficmanager/version.go: -------------------------------------------------------------------------------- 1 | package trafficmanager 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-trafficmanager/2017-05-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /datalake-store/filesystem/version.go: -------------------------------------------------------------------------------- 1 | package filesystem 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-filesystem/2016-11-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/containerservice/version.go: -------------------------------------------------------------------------------- 1 | package containerservice 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-containerservice/2017-01-31" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/customer-insights/version.go: -------------------------------------------------------------------------------- 1 | package customerinsights 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-customerinsights/2017-04-26" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/machinelearning/webservices/version.go: -------------------------------------------------------------------------------- 1 | package webservices 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-webservices/2017-01-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/mobileengagement/version.go: -------------------------------------------------------------------------------- 1 | package mobileengagement 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-mobileengagement/2014-12-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/notificationhubs/version.go: -------------------------------------------------------------------------------- 1 | package notificationhubs 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-notificationhubs/2017-04-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/powerbiembedded/version.go: -------------------------------------------------------------------------------- 1 | package powerbiembedded 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-powerbiembedded/2016-01-29" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/subscriptions/version.go: -------------------------------------------------------------------------------- 1 | package subscriptions 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-subscriptions/2016-06-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/streamanalytics/version.go: -------------------------------------------------------------------------------- 1 | package streamanalytics 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-streamanalytics/2016-03-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/analysisservices/version.go: -------------------------------------------------------------------------------- 1 | package analysisservices 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-analysisservices/2017-08-01-beta" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/cognitiveservices/version.go: -------------------------------------------------------------------------------- 1 | package cognitiveservices 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.2.0-beta arm-cognitiveservices/2016-02-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.2.0-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/containerinstance/version.go: -------------------------------------------------------------------------------- 1 | package containerinstance 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-containerinstance/2017-08-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/containerregistry/version.go: -------------------------------------------------------------------------------- 1 | package containerregistry 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-containerregistry/2017-06-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/recoveryservicesbackup/version.go: -------------------------------------------------------------------------------- 1 | package recoveryservicesbackup 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicesbackup/" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/servermanagement/version.go: -------------------------------------------------------------------------------- 1 | package servermanagement 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-servermanagement/2016-07-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/storageimportexport/version.go: -------------------------------------------------------------------------------- 1 | package storageimportexport 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-storageimportexport/2016-11-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/operationalinsights/version.go: -------------------------------------------------------------------------------- 1 | package operationalinsights 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.2.0-beta arm-operationalinsights/2015-11-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.2.0-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/storsimple8000series/version.go: -------------------------------------------------------------------------------- 1 | package storsimple8000series 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-storsimple8000series/2017-06-01" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/machinelearning/commitmentplans/version.go: -------------------------------------------------------------------------------- 1 | package commitmentplans 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-commitmentplans/2016-05-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/resources/managedapplications/version.go: -------------------------------------------------------------------------------- 1 | package managedapplications 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-managedapplications/2016-09-01-preview" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /arm/recoveryservicessiterecovery/version.go: -------------------------------------------------------------------------------- 1 | package recoveryservicessiterecovery 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 18 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 | 20 | // UserAgent returns the UserAgent string to use when sending http.Requests. 21 | func UserAgent() string { 22 | return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicessiterecovery/2016-08-10" 23 | } 24 | 25 | // Version returns the semantic version (see http://semver.org) of the client. 26 | func Version() string { 27 | return "v10.3.1-beta" 28 | } 29 | -------------------------------------------------------------------------------- /management/osimage/client.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | // Package osimage provides a client for Operating System Images. 4 | package osimage 5 | 6 | import ( 7 | "encoding/xml" 8 | 9 | "github.com/Azure/azure-sdk-for-go/management" 10 | ) 11 | 12 | const ( 13 | azureImageListURL = "services/images" 14 | errInvalidImage = "Can not find image %s in specified subscription, please specify another image name." 15 | errParamNotSpecified = "Parameter %s is not specified." 16 | ) 17 | 18 | // NewClient is used to instantiate a new OSImageClient from an Azure client. 19 | func NewClient(client management.Client) OSImageClient { 20 | return OSImageClient{client: client} 21 | } 22 | 23 | func (c OSImageClient) ListOSImages() (ListOSImagesResponse, error) { 24 | var l ListOSImagesResponse 25 | 26 | response, err := c.client.SendAzureGetRequest(azureImageListURL) 27 | if err != nil { 28 | return l, err 29 | } 30 | 31 | err = xml.Unmarshal(response, &l) 32 | return l, err 33 | } 34 | 35 | // AddOSImage adds an operating system image to the image repository that is associated with the specified subscription. 36 | // 37 | // See https://msdn.microsoft.com/en-us/library/azure/jj157192.aspx for details. 38 | func (c OSImageClient) AddOSImage(osi *OSImage) (management.OperationID, error) { 39 | data, err := xml.Marshal(osi) 40 | if err != nil { 41 | return "", err 42 | } 43 | 44 | return c.client.SendAzurePostRequest(azureImageListURL, data) 45 | 46 | } 47 | -------------------------------------------------------------------------------- /management/vmutils/extensions_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package vmutils 4 | 5 | import ( 6 | "encoding/xml" 7 | "testing" 8 | 9 | vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine" 10 | ) 11 | 12 | func Test_AddAzureVMExtensionConfiguration(t *testing.T) { 13 | 14 | role := vm.Role{} 15 | AddAzureVMExtensionConfiguration(&role, 16 | "nameOfExtension", "nameOfPublisher", "versionOfExtension", "nameOfReference", "state", []byte{1, 2, 3}, []byte{}) 17 | 18 | data, err := xml.MarshalIndent(role, "", " ") 19 | if err != nil { 20 | t.Fatal(err) 21 | } 22 | if expected := ` 23 | 24 | 25 | 26 | nameOfReference 27 | nameOfPublisher 28 | nameOfExtension 29 | versionOfExtension 30 | 31 | 32 | ignored 33 | AQID 34 | Public 35 | 36 | 37 | state 38 | 39 | 40 | 41 | `; string(data) != expected { 42 | t.Fatalf("Expected %q, but got %q", expected, string(data)) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /arm/deployment/deployment.go: -------------------------------------------------------------------------------- 1 | package deployment 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | 7 | "github.com/Azure/azure-sdk-for-go/arm/resources/resources" 8 | ) 9 | 10 | // Build is a helper that creates a resources.Deployment, which can 11 | // be used as a parameter for a CreateOrUpdate deployment operation. 12 | // templateFile is a local Azure template. 13 | // See https://github.com/Azure-Samples/resource-manager-go-template-deployment 14 | func Build(mode resources.DeploymentMode, templateFile string, parameters map[string]interface{}) (deployment resources.Deployment, err error) { 15 | template, err := parseJSONFromFile(templateFile) 16 | if err != nil { 17 | return 18 | } 19 | 20 | finalParameters := map[string]interface{}{} 21 | for k, v := range parameters { 22 | addElementToMap(&finalParameters, k, v) 23 | } 24 | 25 | deployment.Properties = &resources.DeploymentProperties{ 26 | Mode: mode, 27 | Template: template, 28 | Parameters: &finalParameters, 29 | } 30 | return 31 | } 32 | 33 | func parseJSONFromFile(filePath string) (*map[string]interface{}, error) { 34 | text, err := ioutil.ReadFile(filePath) 35 | if err != nil { 36 | return nil, err 37 | } 38 | fileMap := map[string]interface{}{} 39 | if err = json.Unmarshal(text, &fileMap); err != nil { 40 | return nil, err 41 | } 42 | return &fileMap, err 43 | } 44 | 45 | func addElementToMap(parameter *map[string]interface{}, key string, value interface{}) { 46 | (*parameter)[key] = map[string]interface{}{ 47 | "value": value, 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /arm/examples/helpers/helpers.go: -------------------------------------------------------------------------------- 1 | package helpers 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "github.com/Azure/go-autorest/autorest/adal" 7 | "github.com/Azure/go-autorest/autorest/azure" 8 | ) 9 | 10 | const ( 11 | credentialsPath = "/.azure/credentials.json" 12 | ) 13 | 14 | // ToJSON returns the passed item as a pretty-printed JSON string. If any JSON error occurs, 15 | // it returns the empty string. 16 | func ToJSON(v interface{}) (string, error) { 17 | j, err := json.MarshalIndent(v, "", " ") 18 | return string(j), err 19 | } 20 | 21 | // NewServicePrincipalTokenFromCredentials creates a new ServicePrincipalToken using values of the 22 | // passed credentials map. 23 | func NewServicePrincipalTokenFromCredentials(c map[string]string, scope string) (*adal.ServicePrincipalToken, error) { 24 | oauthConfig, err := adal.NewOAuthConfig(azure.PublicCloud.ActiveDirectoryEndpoint, c["AZURE_TENANT_ID"]) 25 | if err != nil { 26 | panic(err) 27 | } 28 | return adal.NewServicePrincipalToken(*oauthConfig, c["AZURE_CLIENT_ID"], c["AZURE_CLIENT_SECRET"], scope) 29 | } 30 | 31 | func ensureValueStrings(mapOfInterface map[string]interface{}) map[string]string { 32 | mapOfStrings := make(map[string]string) 33 | for key, value := range mapOfInterface { 34 | mapOfStrings[key] = ensureValueString(value) 35 | } 36 | return mapOfStrings 37 | } 38 | 39 | func ensureValueString(value interface{}) string { 40 | if value == nil { 41 | return "" 42 | } 43 | switch v := value.(type) { 44 | case string: 45 | return v 46 | default: 47 | return fmt.Sprintf("%v", v) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /storage/storagepolicy.go: -------------------------------------------------------------------------------- 1 | package storage 2 | 3 | import ( 4 | "strings" 5 | "time" 6 | ) 7 | 8 | // AccessPolicyDetailsXML has specifics about an access policy 9 | // annotated with XML details. 10 | type AccessPolicyDetailsXML struct { 11 | StartTime time.Time `xml:"Start"` 12 | ExpiryTime time.Time `xml:"Expiry"` 13 | Permission string `xml:"Permission"` 14 | } 15 | 16 | // SignedIdentifier is a wrapper for a specific policy 17 | type SignedIdentifier struct { 18 | ID string `xml:"Id"` 19 | AccessPolicy AccessPolicyDetailsXML `xml:"AccessPolicy"` 20 | } 21 | 22 | // SignedIdentifiers part of the response from GetPermissions call. 23 | type SignedIdentifiers struct { 24 | SignedIdentifiers []SignedIdentifier `xml:"SignedIdentifier"` 25 | } 26 | 27 | // AccessPolicy is the response type from the GetPermissions call. 28 | type AccessPolicy struct { 29 | SignedIdentifiersList SignedIdentifiers `xml:"SignedIdentifiers"` 30 | } 31 | 32 | // convertAccessPolicyToXMLStructs converts between AccessPolicyDetails which is a struct better for API usage to the 33 | // AccessPolicy struct which will get converted to XML. 34 | func convertAccessPolicyToXMLStructs(id string, startTime time.Time, expiryTime time.Time, permissions string) SignedIdentifier { 35 | return SignedIdentifier{ 36 | ID: id, 37 | AccessPolicy: AccessPolicyDetailsXML{ 38 | StartTime: startTime.UTC().Round(time.Second), 39 | ExpiryTime: expiryTime.UTC().Round(time.Second), 40 | Permission: permissions, 41 | }, 42 | } 43 | } 44 | 45 | func updatePermissions(permissions, permission string) bool { 46 | return strings.Contains(permissions, permission) 47 | } 48 | -------------------------------------------------------------------------------- /storage/recordings/StorageTableSuite/TestSetPermissionsUnsuccessfully.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | rwmutex: {} 4 | interactions: 5 | - request: 6 | body: GolangRocksOnAzure2050-12-20T21:55:06Z2050-12-21T07:55:06Zraud 7 | form: {} 8 | headers: 9 | Authorization: 10 | - SharedKey golangrocksonazure:TTOhdgM61gCd1KIVpfW3mTs72+fV2LWLUvYGz1VBbVk= 11 | Content-Length: 12 | - "233" 13 | User-Agent: 14 | - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 15 | table 16 | x-ms-date: 17 | - Thu, 20 Jul 2017 23:34:12 GMT 18 | x-ms-version: 19 | - 2016-05-31 20 | url: https://golangrocksonazure.table.core.windows.net/nonexistingtable?comp=acl&timeout=30 21 | method: PUT 22 | response: 23 | body: |- 24 | TableNotFoundThe table specified does not exist. 25 | RequestId:875b83c5-0002-0036-30b0-0102e5000000 26 | Time:2017-07-20T23:34:12.3131481Z 27 | headers: 28 | Content-Length: 29 | - "316" 30 | Content-Type: 31 | - application/xml 32 | Date: 33 | - Thu, 20 Jul 2017 23:34:11 GMT 34 | Server: 35 | - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 36 | X-Ms-Request-Id: 37 | - 875b83c5-0002-0036-30b0-0102e5000000 38 | X-Ms-Version: 39 | - 2016-05-31 40 | status: 404 The table specified does not exist. 41 | code: 404 42 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.8 7 | - 1.9 8 | 9 | install: 10 | - go get -u github.com/golang/lint/golint 11 | - go get -u github.com/Masterminds/glide 12 | - go get -u golang.org/x/net/context 13 | - go get -u gopkg.in/godo.v2/cmd/godo 14 | - export GO15VENDOREXPERIMENT=1 15 | - glide install 16 | 17 | script: 18 | - bash rungas.sh 19 | - test -z "$(gofmt -s -l $(find ./arm/* -type d -print) | tee /dev/stderr)" 20 | - test -z "$(gofmt -s -l -w management | tee /dev/stderr)" 21 | - test -z "$(gofmt -s -l -w storage | tee /dev/stderr)" 22 | - test -z "$(gofmt -s -l -w Gododir | tee /dev/stderr)" 23 | - test -z "$(gofmt -s -l -w $(find ./datalake-store/* -type d -print) | tee /dev/stderr)" 24 | # - test -z "$(gofmt -s -l -w $(find ./dataplane/* -type d -print) | tee /dev/stderr)" 25 | - test -z "$(go build $(find ./* -type d -print | grep -v '^./vendor$' | grep -v '^./storage$') | tee /dev/stderr)" 26 | - test -z "$(go vet $(find ./arm/* -type d -print) | tee /dev/stderr)" 27 | - test -z "$(golint ./arm/... | tee /dev/stderr)" 28 | - go build ./arm/examples/... 29 | - go test -v ./management/... 30 | - go test -v ./arm/... 31 | - go test -v ./storage/... 32 | - go test -v ./datalake-store/... 33 | - go test -v ./dataplane/... 34 | - test -z "$(golint ./management/... | grep -v 'should have comment' | grep -v 'stutters' | tee /dev/stderr)" 35 | - test -z "$(golint ./storage/... | tee /dev/stderr)" 36 | # - test -z "$(golint ./datalake-store/... | tee /dev/stderr)" 37 | # - test -z "$(golint ./dataplane/... | tee /dev/stderr)" 38 | - go vet ./management/... 39 | - go vet ./storage/... 40 | - go vet ./datalake-store/... 41 | - go vet ./dataplane/... 42 | - test -z "$(golint ./Gododir/... | tee /dev/stderr)" 43 | - go vet ./Gododir/... 44 | 45 | -------------------------------------------------------------------------------- /arm/batch/client.go: -------------------------------------------------------------------------------- 1 | // Package batch implements the Azure ARM Batch service API version 2017-01-01. 2 | // 3 | // 4 | package batch 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Batch 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Batch. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/mysql/mysql_test.go: -------------------------------------------------------------------------------- 1 | package mysql 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/Azure/go-autorest/autorest/to" 8 | chk "gopkg.in/check.v1" 9 | ) 10 | 11 | // Hook up gocheck to testing 12 | func Test(t *testing.T) { chk.TestingT(t) } 13 | 14 | type Suite struct{} 15 | 16 | var _ = chk.Suite(&Suite{}) 17 | 18 | var ( 19 | body = `{ 20 | "sku": { 21 | "name": "SkuName", 22 | "tier": "Basic", 23 | "capacity": 100 24 | }, 25 | "properties": { 26 | "createMode": "Default", 27 | "storageMB": 1024, 28 | "sslEnforcement": "Enabled", 29 | "administratorLogin": "cloudsa", 30 | "administratorLoginPassword": "password" 31 | }, 32 | "location": "OneBox", 33 | "tags": { 34 | "ElasticServer": "1" 35 | } 36 | }` 37 | sfc = ServerForCreate{ 38 | Location: to.StringPtr("OneBox"), 39 | Properties: ServerPropertiesForDefaultCreate{ 40 | AdministratorLogin: to.StringPtr("cloudsa"), 41 | AdministratorLoginPassword: to.StringPtr("password"), 42 | StorageMB: to.Int64Ptr(1024), 43 | SslEnforcement: SslEnforcementEnumEnabled, 44 | CreateMode: CreateModeDefault, 45 | }, 46 | Sku: &Sku{ 47 | Name: to.StringPtr("SkuName"), 48 | Tier: Basic, 49 | Capacity: to.Int32Ptr(100), 50 | }, 51 | Tags: &map[string]*string{ 52 | "ElasticServer": to.StringPtr("1"), 53 | }, 54 | } 55 | ) 56 | 57 | func (s *Suite) TestUnmarshalServerForCreate(c *chk.C) { 58 | var obtained ServerForCreate 59 | err := json.Unmarshal([]byte(body), &obtained) 60 | c.Assert(err, chk.IsNil) 61 | c.Assert(obtained, chk.DeepEquals, sfc) 62 | } 63 | 64 | func (s *Suite) TestMarshalServerForCreate(c *chk.C) { 65 | b, err := json.MarshalIndent(sfc, "", " ") 66 | c.Assert(err, chk.IsNil) 67 | c.Assert(string(b), chk.Equals, body) 68 | } 69 | -------------------------------------------------------------------------------- /arm/dns/client.go: -------------------------------------------------------------------------------- 1 | // Package dns implements the Azure ARM Dns service API version 2016-04-01. 2 | // 3 | // The DNS Management Client. 4 | package dns 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Dns 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Dns. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/postgresql/postgresql_test.go: -------------------------------------------------------------------------------- 1 | package postgresql 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/Azure/go-autorest/autorest/to" 8 | chk "gopkg.in/check.v1" 9 | ) 10 | 11 | // Hook up gocheck to testing 12 | func Test(t *testing.T) { chk.TestingT(t) } 13 | 14 | type Suite struct{} 15 | 16 | var _ = chk.Suite(&Suite{}) 17 | 18 | var ( 19 | body = `{ 20 | "sku": { 21 | "name": "SkuName", 22 | "tier": "Basic", 23 | "capacity": 100 24 | }, 25 | "properties": { 26 | "createMode": "Default", 27 | "storageMB": 1024, 28 | "sslEnforcement": "Enabled", 29 | "administratorLogin": "cloudsa", 30 | "administratorLoginPassword": "password" 31 | }, 32 | "location": "OneBox", 33 | "tags": { 34 | "ElasticServer": "1" 35 | } 36 | }` 37 | sfc = ServerForCreate{ 38 | Location: to.StringPtr("OneBox"), 39 | Properties: ServerPropertiesForDefaultCreate{ 40 | AdministratorLogin: to.StringPtr("cloudsa"), 41 | AdministratorLoginPassword: to.StringPtr("password"), 42 | StorageMB: to.Int64Ptr(1024), 43 | SslEnforcement: SslEnforcementEnumEnabled, 44 | CreateMode: CreateModeDefault, 45 | }, 46 | Sku: &Sku{ 47 | Name: to.StringPtr("SkuName"), 48 | Tier: Basic, 49 | Capacity: to.Int32Ptr(100), 50 | }, 51 | Tags: &map[string]*string{ 52 | "ElasticServer": to.StringPtr("1"), 53 | }, 54 | } 55 | ) 56 | 57 | func (s *Suite) TestUnmarshalServerForCreate(c *chk.C) { 58 | var obtained ServerForCreate 59 | err := json.Unmarshal([]byte(body), &obtained) 60 | c.Assert(err, chk.IsNil) 61 | c.Assert(obtained, chk.DeepEquals, sfc) 62 | } 63 | 64 | func (s *Suite) TestMarshalServerForCreate(c *chk.C) { 65 | b, err := json.MarshalIndent(sfc, "", " ") 66 | c.Assert(err, chk.IsNil) 67 | c.Assert(string(b), chk.Equals, body) 68 | } 69 | -------------------------------------------------------------------------------- /arm/commerce/client.go: -------------------------------------------------------------------------------- 1 | // Package commerce implements the Azure ARM Commerce service API version 2 | // 2015-06-01-preview. 3 | // 4 | // 5 | package commerce 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Commerce 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Commerce. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/scheduler/client.go: -------------------------------------------------------------------------------- 1 | // Package scheduler implements the Azure ARM Scheduler service API version 2 | // 2016-03-01. 3 | // 4 | // 5 | package scheduler 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Scheduler 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Scheduler. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/redis/client.go: -------------------------------------------------------------------------------- 1 | // Package redis implements the Azure ARM Redis service API version 2016-04-01. 2 | // 3 | // REST API for Azure Redis Cache Service. 4 | package redis 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Redis 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Redis. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /management/virtualnetwork/client.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | // Package virtualnetwork provides a client for Virtual Networks. 4 | package virtualnetwork 5 | 6 | import ( 7 | "encoding/xml" 8 | 9 | "github.com/Azure/azure-sdk-for-go/management" 10 | ) 11 | 12 | const ( 13 | azureNetworkConfigurationURL = "services/networking/media" 14 | ) 15 | 16 | // NewClient is used to return new VirtualNetworkClient instance 17 | func NewClient(client management.Client) VirtualNetworkClient { 18 | return VirtualNetworkClient{client: client} 19 | } 20 | 21 | // GetVirtualNetworkConfiguration retreives the current virtual network 22 | // configuration for the currently active subscription. Note that the 23 | // underlying Azure API means that network related operations are not safe 24 | // for running concurrently. 25 | func (c VirtualNetworkClient) GetVirtualNetworkConfiguration() (NetworkConfiguration, error) { 26 | networkConfiguration := c.NewNetworkConfiguration() 27 | response, err := c.client.SendAzureGetRequest(azureNetworkConfigurationURL) 28 | if err != nil { 29 | return networkConfiguration, err 30 | } 31 | 32 | err = xml.Unmarshal(response, &networkConfiguration) 33 | return networkConfiguration, err 34 | 35 | } 36 | 37 | // SetVirtualNetworkConfiguration configures the virtual networks for the 38 | // currently active subscription according to the NetworkConfiguration given. 39 | // Note that the underlying Azure API means that network related operations 40 | // are not safe for running concurrently. 41 | func (c VirtualNetworkClient) SetVirtualNetworkConfiguration(networkConfiguration NetworkConfiguration) (management.OperationID, error) { 42 | networkConfiguration.setXMLNamespaces() 43 | networkConfigurationBytes, err := xml.Marshal(networkConfiguration) 44 | if err != nil { 45 | return "", err 46 | } 47 | 48 | return c.client.SendAzurePutRequest(azureNetworkConfigurationURL, "text/plain", networkConfigurationBytes) 49 | } 50 | -------------------------------------------------------------------------------- /arm/disk/client.go: -------------------------------------------------------------------------------- 1 | // Package disk implements the Azure ARM Disk service API version 2 | // 2016-04-30-preview. 3 | // 4 | // The Disk Resource Provider Client. 5 | package disk 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Disk 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Disk. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /management/vmutils/rolestate.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package vmutils 4 | 5 | import ( 6 | "time" 7 | 8 | "github.com/Azure/azure-sdk-for-go/management" 9 | vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine" 10 | ) 11 | 12 | // WaitForDeploymentPowerState blocks until all role instances in deployment 13 | // reach desired power state. 14 | func WaitForDeploymentPowerState(client management.Client, cloudServiceName, deploymentName string, desiredPowerstate vm.PowerState) error { 15 | for { 16 | deployment, err := vm.NewClient(client).GetDeployment(cloudServiceName, deploymentName) 17 | if err != nil { 18 | return err 19 | } 20 | if allInstancesInPowerState(deployment.RoleInstanceList, desiredPowerstate) { 21 | return nil 22 | } 23 | time.Sleep(2 * time.Second) 24 | } 25 | } 26 | 27 | func allInstancesInPowerState(instances []vm.RoleInstance, desiredPowerstate vm.PowerState) bool { 28 | for _, r := range instances { 29 | if r.PowerState != desiredPowerstate { 30 | return false 31 | } 32 | } 33 | 34 | return true 35 | } 36 | 37 | // WaitForDeploymentInstanceStatus blocks until all role instances in deployment 38 | // reach desired InstanceStatus. 39 | func WaitForDeploymentInstanceStatus(client management.Client, cloudServiceName, deploymentName string, desiredInstanceStatus vm.InstanceStatus) error { 40 | for { 41 | deployment, err := vm.NewClient(client).GetDeployment(cloudServiceName, deploymentName) 42 | if err != nil { 43 | return err 44 | } 45 | if allInstancesInInstanceStatus(deployment.RoleInstanceList, desiredInstanceStatus) { 46 | return nil 47 | } 48 | time.Sleep(2 * time.Second) 49 | } 50 | } 51 | 52 | func allInstancesInInstanceStatus(instances []vm.RoleInstance, desiredInstancestatus vm.InstanceStatus) bool { 53 | for _, r := range instances { 54 | if r.InstanceStatus != desiredInstancestatus { 55 | return false 56 | } 57 | } 58 | 59 | return true 60 | } 61 | -------------------------------------------------------------------------------- /arm/advisor/client.go: -------------------------------------------------------------------------------- 1 | // Package advisor implements the Azure ARM Advisor service API version 2 | // 2017-04-19. 3 | // 4 | // REST APIs for Azure Advisor 5 | package advisor 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Advisor 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Advisor. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/eventhub/client.go: -------------------------------------------------------------------------------- 1 | // Package eventhub implements the Azure ARM Eventhub service API version 2 | // 2015-08-01. 3 | // 4 | // Azure Event Hubs client 5 | package eventhub 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Eventhub 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Eventhub. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/hdinsight/client.go: -------------------------------------------------------------------------------- 1 | // Package hdinsight implements the Azure ARM Hdinsight service API version . 2 | // 3 | // The HDInsight Management Client. 4 | package hdinsight 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Hdinsight 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Hdinsight. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/monitor/client.go: -------------------------------------------------------------------------------- 1 | // Package monitor implements the Azure ARM Monitor service API version . 2 | // 3 | // Composite Swagger for Monitor Management Client 4 | package monitor 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Monitor 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Monitor. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/graphrbac/client.go: -------------------------------------------------------------------------------- 1 | // Package graphrbac implements the Azure ARM Graphrbac service API version . 2 | // 3 | // Composite Swagger specification for Azure Active Directory Graph RBAC 4 | // management client. 5 | package graphrbac 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Graphrbac 31 | DefaultBaseURI = "https://graph.windows.net" 32 | ) 33 | 34 | // ManagementClient is the base client for Graphrbac. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | TenantID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(tenantID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, tenantID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, tenantID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | TenantID: tenantID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/storage/client.go: -------------------------------------------------------------------------------- 1 | // Package storage implements the Azure ARM Storage service API version 2 | // 2016-12-01. 3 | // 4 | // The Azure Storage Management API. 5 | package storage 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Storage 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Storage. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/compute/client.go: -------------------------------------------------------------------------------- 1 | // Package compute implements the Azure ARM Compute service API version 2 | // 2016-04-30-preview. 3 | // 4 | // The Compute Management Client. 5 | package compute 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Compute 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Compute. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/eventgrid/client.go: -------------------------------------------------------------------------------- 1 | // Package eventgrid implements the Azure ARM Eventgrid service API version 2017-06-15-preview. 2 | // 3 | // Azure EventGrid Management Client 4 | package eventgrid 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 21 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 22 | 23 | import ( 24 | "github.com/Azure/go-autorest/autorest" 25 | ) 26 | 27 | const ( 28 | // DefaultBaseURI is the default URI used for the service Eventgrid 29 | DefaultBaseURI = "https://management.azure.com" 30 | ) 31 | 32 | // ManagementClient is the base client for Eventgrid. 33 | type ManagementClient struct { 34 | autorest.Client 35 | BaseURI string 36 | SubscriptionID string 37 | } 38 | 39 | // New creates an instance of the ManagementClient client. 40 | func New(subscriptionID string) ManagementClient { 41 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 42 | } 43 | 44 | // NewWithBaseURI creates an instance of the ManagementClient client. 45 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 46 | return ManagementClient{ 47 | Client: autorest.NewClientWithUserAgent(UserAgent()), 48 | BaseURI: baseURI, 49 | SubscriptionID: subscriptionID, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /arm/insights/client.go: -------------------------------------------------------------------------------- 1 | // Package insights implements the Azure ARM Insights service API version . 2 | // 3 | // Composite Swagger for Insights Management Client 4 | package insights 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Insights 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Insights. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/servicefabric/client.go: -------------------------------------------------------------------------------- 1 | // Package servicefabric implements the Azure ARM Servicefabric service API 2 | // version 2016-09-01. 3 | // 4 | // 5 | package servicefabric 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Servicefabric 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Servicefabric. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/servicebus/client.go: -------------------------------------------------------------------------------- 1 | // Package servicebus implements the Azure ARM Servicebus service API version 2 | // 2015-08-01. 3 | // 4 | // Azure Service Bus client 5 | package servicebus 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Servicebus 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Servicebus. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/trafficmanager/client.go: -------------------------------------------------------------------------------- 1 | // Package trafficmanager implements the Azure ARM Trafficmanager service API 2 | // version 2015-11-01. 3 | // 4 | // 5 | package trafficmanager 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Trafficmanager 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Trafficmanager. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /management/vmutils/datadisks.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package vmutils 4 | 5 | import ( 6 | "fmt" 7 | 8 | vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine" 9 | vmdisk "github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk" 10 | ) 11 | 12 | // ConfigureWithNewDataDisk adds configuration for a new (empty) data disk 13 | func ConfigureWithNewDataDisk(role *vm.Role, label, destinationVhdStorageURL string, sizeInGB int, cachingType vmdisk.HostCachingType) error { 14 | if role == nil { 15 | return fmt.Errorf(errParamNotSpecified, "role") 16 | } 17 | 18 | appendDataDisk(role, vm.DataVirtualHardDisk{ 19 | DiskLabel: label, 20 | HostCaching: cachingType, 21 | LogicalDiskSizeInGB: sizeInGB, 22 | MediaLink: destinationVhdStorageURL, 23 | }) 24 | 25 | return nil 26 | } 27 | 28 | // ConfigureWithExistingDataDisk adds configuration for an existing data disk 29 | func ConfigureWithExistingDataDisk(role *vm.Role, diskName string, cachingType vmdisk.HostCachingType) error { 30 | if role == nil { 31 | return fmt.Errorf(errParamNotSpecified, "role") 32 | } 33 | 34 | appendDataDisk(role, vm.DataVirtualHardDisk{ 35 | DiskName: diskName, 36 | HostCaching: cachingType, 37 | }) 38 | 39 | return nil 40 | } 41 | 42 | // ConfigureWithVhdDataDisk adds configuration for adding a vhd in a storage 43 | // account as a data disk 44 | func ConfigureWithVhdDataDisk(role *vm.Role, sourceVhdStorageURL string, cachingType vmdisk.HostCachingType) error { 45 | if role == nil { 46 | return fmt.Errorf(errParamNotSpecified, "role") 47 | } 48 | 49 | appendDataDisk(role, vm.DataVirtualHardDisk{ 50 | SourceMediaLink: sourceVhdStorageURL, 51 | HostCaching: cachingType, 52 | }) 53 | 54 | return nil 55 | } 56 | 57 | func appendDataDisk(role *vm.Role, disk vm.DataVirtualHardDisk) { 58 | disk.Lun = len(role.DataVirtualHardDisks) 59 | role.DataVirtualHardDisks = append(role.DataVirtualHardDisks, disk) 60 | } 61 | -------------------------------------------------------------------------------- /arm/devtestlabs/client.go: -------------------------------------------------------------------------------- 1 | // Package devtestlabs implements the Azure ARM Devtestlabs service API version 2 | // 2016-05-15. 3 | // 4 | // The DevTest Labs Client. 5 | package devtestlabs 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Devtestlabs 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Devtestlabs. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/automation/client.go: -------------------------------------------------------------------------------- 1 | // Package automation implements the Azure ARM Automation service API version . 2 | // 3 | // Composite Swagger json for Azure Automation Client 4 | package automation 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 21 | // Changes may cause incorrect behavior and will be lost if the code is 22 | // regenerated. 23 | 24 | import ( 25 | "github.com/Azure/go-autorest/autorest" 26 | ) 27 | 28 | const ( 29 | // DefaultBaseURI is the default URI used for the service Automation 30 | DefaultBaseURI = "https://management.azure.com" 31 | ) 32 | 33 | // ManagementClient is the base client for Automation. 34 | type ManagementClient struct { 35 | autorest.Client 36 | BaseURI string 37 | SubscriptionID string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New(subscriptionID string) ManagementClient { 42 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 43 | } 44 | 45 | // NewWithBaseURI creates an instance of the ManagementClient client. 46 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | BaseURI: baseURI, 50 | SubscriptionID: subscriptionID, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /arm/containerinstance/client.go: -------------------------------------------------------------------------------- 1 | // Package containerinstance implements the Azure ARM Containerinstance service API version 2017-08-01-preview. 2 | // 3 | // 4 | package containerinstance 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 21 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 22 | 23 | import ( 24 | "github.com/Azure/go-autorest/autorest" 25 | ) 26 | 27 | const ( 28 | // DefaultBaseURI is the default URI used for the service Containerinstance 29 | DefaultBaseURI = "https://management.azure.com" 30 | ) 31 | 32 | // ManagementClient is the base client for Containerinstance. 33 | type ManagementClient struct { 34 | autorest.Client 35 | BaseURI string 36 | SubscriptionID string 37 | } 38 | 39 | // New creates an instance of the ManagementClient client. 40 | func New(subscriptionID string) ManagementClient { 41 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 42 | } 43 | 44 | // NewWithBaseURI creates an instance of the ManagementClient client. 45 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 46 | return ManagementClient{ 47 | Client: autorest.NewClientWithUserAgent(UserAgent()), 48 | BaseURI: baseURI, 49 | SubscriptionID: subscriptionID, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /arm/cosmos-db/client.go: -------------------------------------------------------------------------------- 1 | // Package cosmosdb implements the Azure ARM Cosmosdb service API version 2015-04-08. 2 | // 3 | // Azure Cosmos DB Database Service Resource Provider REST API 4 | package cosmosdb 5 | 6 | // Copyright (c) Microsoft and contributors. All rights reserved. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); 9 | // you may not use this file except in compliance with the License. 10 | // You may obtain a copy of the License at 11 | // http://www.apache.org/licenses/LICENSE-2.0 12 | // 13 | // Unless required by applicable law or agreed to in writing, software 14 | // distributed under the License is distributed on an "AS IS" BASIS, 15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | // 17 | // See the License for the specific language governing permissions and 18 | // limitations under the License. 19 | // 20 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 21 | // Changes may cause incorrect behavior and will be lost if the code is regenerated. 22 | 23 | import ( 24 | "github.com/Azure/go-autorest/autorest" 25 | ) 26 | 27 | const ( 28 | // DefaultBaseURI is the default URI used for the service Cosmosdb 29 | DefaultBaseURI = "https://management.azure.com" 30 | ) 31 | 32 | // ManagementClient is the base client for Cosmosdb. 33 | type ManagementClient struct { 34 | autorest.Client 35 | BaseURI string 36 | SubscriptionID string 37 | } 38 | 39 | // New creates an instance of the ManagementClient client. 40 | func New(subscriptionID string) ManagementClient { 41 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 42 | } 43 | 44 | // NewWithBaseURI creates an instance of the ManagementClient client. 45 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 46 | return ManagementClient{ 47 | Client: autorest.NewClientWithUserAgent(UserAgent()), 48 | BaseURI: baseURI, 49 | SubscriptionID: subscriptionID, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /arm/iothub/client.go: -------------------------------------------------------------------------------- 1 | // Package iothub implements the Azure ARM Iothub service API version 2 | // 2016-02-03. 3 | // 4 | // Use this API to manage the IoT hubs in your subscription. 5 | package iothub 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Iothub 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Iothub. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/recoveryservices/client.go: -------------------------------------------------------------------------------- 1 | // Package recoveryservices implements the Azure ARM Recoveryservices service 2 | // API version 2016-06-01. 3 | // 4 | // 5 | package recoveryservices 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Recoveryservices 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Recoveryservices. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/service-map/client.go: -------------------------------------------------------------------------------- 1 | // Package servicemap implements the Azure ARM Servicemap service API version 2 | // 2015-11-01-preview. 3 | // 4 | // Service Map API Reference 5 | package servicemap 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Servicemap 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Servicemap. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/containerregistry/client.go: -------------------------------------------------------------------------------- 1 | // Package containerregistry implements the Azure ARM Containerregistry service 2 | // API version 2017-03-01. 3 | // 4 | // 5 | package containerregistry 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Containerregistry 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Containerregistry. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/search/client.go: -------------------------------------------------------------------------------- 1 | // Package search implements the Azure ARM Search service API version 2 | // 2015-08-19. 3 | // 4 | // Client that can be used to manage Azure Search services and API keys. 5 | package search 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Search 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Search. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/apimanagement/client.go: -------------------------------------------------------------------------------- 1 | // Package apimanagement implements the Azure ARM Apimanagement service API 2 | // version . 3 | // 4 | // Composite Swagger for ApiManagement Client 5 | package apimanagement 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Apimanagement 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Apimanagement. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/relay/client.go: -------------------------------------------------------------------------------- 1 | // Package relay implements the Azure ARM Relay service API version 2016-07-01. 2 | // 3 | // Use these API to manage Azure Relay resources through Azure Resources 4 | // Manager. 5 | package relay 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Relay 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Relay. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /datalake-store/filesystem/client.go: -------------------------------------------------------------------------------- 1 | // Package filesystem implements the Azure ARM Filesystem service API version 2 | // 2016-11-01. 3 | // 4 | // Creates an Azure Data Lake Store filesystem client. 5 | package filesystem 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultAdlsFileSystemDNSSuffix is the default value for adls file system dns suffix 31 | DefaultAdlsFileSystemDNSSuffix = "azuredatalakestore.net" 32 | ) 33 | 34 | // ManagementClient is the base client for Filesystem. 35 | type ManagementClient struct { 36 | autorest.Client 37 | AdlsFileSystemDNSSuffix string 38 | } 39 | 40 | // New creates an instance of the ManagementClient client. 41 | func New() ManagementClient { 42 | return NewWithoutDefaults(DefaultAdlsFileSystemDNSSuffix) 43 | } 44 | 45 | // NewWithoutDefaults creates an instance of the ManagementClient client. 46 | func NewWithoutDefaults(adlsFileSystemDNSSuffix string) ManagementClient { 47 | return ManagementClient{ 48 | Client: autorest.NewClientWithUserAgent(UserAgent()), 49 | AdlsFileSystemDNSSuffix: adlsFileSystemDNSSuffix, 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /storage/recordings/StorageQueueSuite/TestCreateQueue_DeleteQueue.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | rwmutex: {} 4 | interactions: 5 | - request: 6 | body: "" 7 | form: {} 8 | headers: 9 | Authorization: 10 | - SharedKey golangrocksonazure:LmqdjlmtmJxNNkfm+K/Zsx8eeraNq1wBRMKc5NSOfXE= 11 | User-Agent: 12 | - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 13 | queue 14 | x-ms-date: 15 | - Thu, 20 Jul 2017 23:34:08 GMT 16 | x-ms-version: 17 | - 2016-05-31 18 | url: https://golangrocksonazure.queue.core.windows.net/queue-45storagequeuesuitetestcreatequeuedeletequeue 19 | method: PUT 20 | response: 21 | body: "" 22 | headers: 23 | Date: 24 | - Thu, 20 Jul 2017 23:34:08 GMT 25 | Server: 26 | - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 27 | X-Ms-Request-Id: 28 | - 3fb9b21b-0003-00da-44b0-011674000000 29 | X-Ms-Version: 30 | - 2016-05-31 31 | status: 201 Created 32 | code: 201 33 | - request: 34 | body: "" 35 | form: {} 36 | headers: 37 | Authorization: 38 | - SharedKey golangrocksonazure:anhJBkMKfpfX0nhPVo08mbBWI7rKvzeWB+JUMW5ocoE= 39 | User-Agent: 40 | - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 41 | queue 42 | x-ms-date: 43 | - Thu, 20 Jul 2017 23:34:09 GMT 44 | x-ms-version: 45 | - 2016-05-31 46 | url: https://golangrocksonazure.queue.core.windows.net/queue-45storagequeuesuitetestcreatequeuedeletequeue 47 | method: DELETE 48 | response: 49 | body: "" 50 | headers: 51 | Content-Length: 52 | - "0" 53 | Date: 54 | - Thu, 20 Jul 2017 23:34:08 GMT 55 | Server: 56 | - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 57 | X-Ms-Request-Id: 58 | - 3fb9b21d-0003-00da-45b0-011674000000 59 | X-Ms-Version: 60 | - 2016-05-31 61 | status: 204 No Content 62 | code: 204 63 | -------------------------------------------------------------------------------- /arm/appinsights/client.go: -------------------------------------------------------------------------------- 1 | // Package appinsights implements the Azure ARM Appinsights service API version 2 | // . 3 | // 4 | // Composite Swagger for Application Insights Management Client 5 | package appinsights 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Appinsights 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Appinsights. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/datalake-store/account/client.go: -------------------------------------------------------------------------------- 1 | // Package account implements the Azure ARM Account service API version 2 | // 2016-11-01. 3 | // 4 | // Creates an Azure Data Lake Store account management client. 5 | package account 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Account 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Account. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/documentdb/client.go: -------------------------------------------------------------------------------- 1 | // Package documentdb implements the Azure ARM Documentdb service API version 2 | // 2015-04-08. 3 | // 4 | // Azure DocumentDB Database Service Resource Provider REST API 5 | package documentdb 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Documentdb 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Documentdb. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/mediaservices/client.go: -------------------------------------------------------------------------------- 1 | // Package mediaservices implements the Azure ARM Mediaservices service API 2 | // version 2015-10-01. 3 | // 4 | // Media Services resource management APIs. 5 | package mediaservices 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Mediaservices 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Mediaservices. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/storsimple8000series/client.go: -------------------------------------------------------------------------------- 1 | // Package storsimple8000series implements the Azure ARM Storsimple8000series 2 | // service API version 2017-06-01. 3 | // 4 | // 5 | package storsimple8000series 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Storsimple8000series 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Storsimple8000series. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/containerservice/client.go: -------------------------------------------------------------------------------- 1 | // Package containerservice implements the Azure ARM Containerservice service 2 | // API version 2017-01-31. 3 | // 4 | // The Container Service Client. 5 | package containerservice 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Containerservice 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Containerservice. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/datalake-analytics/account/client.go: -------------------------------------------------------------------------------- 1 | // Package account implements the Azure ARM Account service API version 2 | // 2016-11-01. 3 | // 4 | // Creates an Azure Data Lake Analytics account management client. 5 | package account 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Account 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Account. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/notificationhubs/client.go: -------------------------------------------------------------------------------- 1 | // Package notificationhubs implements the Azure ARM Notificationhubs service 2 | // API version 2017-04-01. 3 | // 4 | // Azure NotificationHub client 5 | package notificationhubs 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Notificationhubs 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Notificationhubs. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/streamanalytics/client.go: -------------------------------------------------------------------------------- 1 | // Package streamanalytics implements the Azure ARM Streamanalytics service API 2 | // version . 3 | // 4 | // Composite Swagger for Stream Analytics Client 5 | package streamanalytics 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Streamanalytics 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Streamanalytics. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/recoveryservicesbackup/client.go: -------------------------------------------------------------------------------- 1 | // Package recoveryservicesbackup implements the Azure ARM 2 | // Recoveryservicesbackup service API version 2016-12-01. 3 | // 4 | // 5 | package recoveryservicesbackup 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Recoveryservicesbackup 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Recoveryservicesbackup. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/resources/resources/client.go: -------------------------------------------------------------------------------- 1 | // Package resources implements the Azure ARM Resources service API version 2 | // 2016-09-01. 3 | // 4 | // Provides operations for working with resources and resource groups. 5 | package resources 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Resources 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Resources. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/apimdeployment/version.go: -------------------------------------------------------------------------------- 1 | package apimdeployment 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 18 | // Changes may cause incorrect behavior and will be lost if the code is 19 | // regenerated. 20 | 21 | import ( 22 | "bytes" 23 | "fmt" 24 | "strings" 25 | ) 26 | 27 | const ( 28 | major = "8" 29 | minor = "1" 30 | patch = "0" 31 | tag = "beta" 32 | userAgentFormat = "Azure-SDK-For-Go/%s arm-%s/%s" 33 | ) 34 | 35 | // cached results of UserAgent and Version to prevent repeated operations. 36 | var ( 37 | userAgent string 38 | version string 39 | ) 40 | 41 | // UserAgent returns the UserAgent string to use when sending http.Requests. 42 | func UserAgent() string { 43 | if userAgent == "" { 44 | userAgent = fmt.Sprintf(userAgentFormat, Version(), "apimdeployment", "2016-07-07") 45 | } 46 | return userAgent 47 | } 48 | 49 | // Version returns the semantic version (see http://semver.org) of the client. 50 | func Version() string { 51 | if version == "" { 52 | versionBuilder := bytes.NewBufferString(fmt.Sprintf("%s.%s.%s", major, minor, patch)) 53 | if tag != "" { 54 | versionBuilder.WriteRune('-') 55 | versionBuilder.WriteString(strings.TrimPrefix(tag, "-")) 56 | } 57 | version = string(versionBuilder.Bytes()) 58 | } 59 | return version 60 | } 61 | -------------------------------------------------------------------------------- /arm/mobileengagement/client.go: -------------------------------------------------------------------------------- 1 | // Package mobileengagement implements the Azure ARM Mobileengagement service 2 | // API version 2014-12-01. 3 | // 4 | // Microsoft Azure Mobile Engagement REST APIs. 5 | package mobileengagement 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Mobileengagement 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Mobileengagement. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /arm/networkwatcher/version.go: -------------------------------------------------------------------------------- 1 | package networkwatcher 2 | 3 | // Copyright (c) Microsoft and contributors. All rights reserved. 4 | // 5 | // Licensed under the Apache License, Version 2.0 (the "License"); 6 | // you may not use this file except in compliance with the License. 7 | // You may obtain a copy of the License at 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | // 17 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 18 | // Changes may cause incorrect behavior and will be lost if the code is 19 | // regenerated. 20 | 21 | import ( 22 | "bytes" 23 | "fmt" 24 | "strings" 25 | ) 26 | 27 | const ( 28 | major = "8" 29 | minor = "1" 30 | patch = "0" 31 | tag = "beta" 32 | userAgentFormat = "Azure-SDK-For-Go/%s arm-%s/%s" 33 | ) 34 | 35 | // cached results of UserAgent and Version to prevent repeated operations. 36 | var ( 37 | userAgent string 38 | version string 39 | ) 40 | 41 | // UserAgent returns the UserAgent string to use when sending http.Requests. 42 | func UserAgent() string { 43 | if userAgent == "" { 44 | userAgent = fmt.Sprintf(userAgentFormat, Version(), "networkwatcher", "2016-12-01") 45 | } 46 | return userAgent 47 | } 48 | 49 | // Version returns the semantic version (see http://semver.org) of the client. 50 | func Version() string { 51 | if version == "" { 52 | versionBuilder := bytes.NewBufferString(fmt.Sprintf("%s.%s.%s", major, minor, patch)) 53 | if tag != "" { 54 | versionBuilder.WriteRune('-') 55 | versionBuilder.WriteString(strings.TrimPrefix(tag, "-")) 56 | } 57 | version = string(versionBuilder.Bytes()) 58 | } 59 | return version 60 | } 61 | -------------------------------------------------------------------------------- /arm/cognitiveservices/client.go: -------------------------------------------------------------------------------- 1 | // Package cognitiveservices implements the Azure ARM Cognitiveservices service 2 | // API version 2016-02-01-preview. 3 | // 4 | // Cognitive Services Management Client 5 | package cognitiveservices 6 | 7 | // Copyright (c) Microsoft and contributors. All rights reserved. 8 | // 9 | // Licensed under the Apache License, Version 2.0 (the "License"); 10 | // you may not use this file except in compliance with the License. 11 | // You may obtain a copy of the License at 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, 16 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | // 18 | // See the License for the specific language governing permissions and 19 | // limitations under the License. 20 | // 21 | // Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 22 | // Changes may cause incorrect behavior and will be lost if the code is 23 | // regenerated. 24 | 25 | import ( 26 | "github.com/Azure/go-autorest/autorest" 27 | ) 28 | 29 | const ( 30 | // DefaultBaseURI is the default URI used for the service Cognitiveservices 31 | DefaultBaseURI = "https://management.azure.com" 32 | ) 33 | 34 | // ManagementClient is the base client for Cognitiveservices. 35 | type ManagementClient struct { 36 | autorest.Client 37 | BaseURI string 38 | SubscriptionID string 39 | } 40 | 41 | // New creates an instance of the ManagementClient client. 42 | func New(subscriptionID string) ManagementClient { 43 | return NewWithBaseURI(DefaultBaseURI, subscriptionID) 44 | } 45 | 46 | // NewWithBaseURI creates an instance of the ManagementClient client. 47 | func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { 48 | return ManagementClient{ 49 | Client: autorest.NewClientWithUserAgent(UserAgent()), 50 | BaseURI: baseURI, 51 | SubscriptionID: subscriptionID, 52 | } 53 | } 54 | --------------------------------------------------------------------------------