Update dependencies

This commit is contained in:
Alexander Neumann 2017-09-13 14:09:48 +02:00
parent f3b49987f8
commit fda563d606
926 changed files with 189726 additions and 98666 deletions

View file

@ -4,6 +4,7 @@ language: go
go:
- 1.8
- 1.9
install:
- go get -u github.com/golang/lint/golint
@ -19,6 +20,8 @@ script:
- test -z "$(gofmt -s -l -w management | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w storage | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w Gododir | tee /dev/stderr)"
- test -z "$(gofmt -s -l -w $(find ./datalake-store/* -type d -print) | tee /dev/stderr)"
# - test -z "$(gofmt -s -l -w $(find ./dataplane/* -type d -print) | tee /dev/stderr)"
- test -z "$(go build $(find ./* -type d -print | grep -v '^./vendor$' | grep -v '^./storage$') | tee /dev/stderr)"
- test -z "$(go vet $(find ./arm/* -type d -print) | tee /dev/stderr)"
- test -z "$(golint ./arm/... | tee /dev/stderr)"
@ -26,11 +29,16 @@ script:
- go test -v ./management/...
- go test -v ./arm/...
- go test -v ./storage/...
- go test -v ./datalake-store/...
- go test -v ./dataplane/...
- test -z "$(golint ./management/... | grep -v 'should have comment' | grep -v 'stutters' | tee /dev/stderr)"
- test -z "$(golint ./storage/... | tee /dev/stderr)"
# - test -z "$(golint ./datalake-store/... | tee /dev/stderr)"
# - test -z "$(golint ./dataplane/... | tee /dev/stderr)"
- go vet ./management/...
- go vet ./storage/...
- go vet ./datalake-store/...
- go vet ./dataplane/...
- test -z "$(golint ./Gododir/... | tee /dev/stderr)"
- go vet ./Gododir/...
- bash buildTerraform.sh

View file

@ -1,5 +1,37 @@
# CHANGELOG
## `v10.3.1-beta`
- Added Apache notice file.
### ARM
- Fixed package name on some `version.go` files.
### Storage
- Fixed bug related to SAS URI generation and storage emulator support.
### Generated code notes
- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: ad55af74f3f0e2b390a4306532528168ba742fef
- [AutoRest Go extension](https://github.com/Azure/autorest.go) commit: 28a531c59c82cf67bc90c87095c1d34a936461b4
## `v10.3.0-beta`
### ARM
| api | version | note |
|:------------------------------------|:-------------------|:------------------------------------|
| arm/containerinstance | 2017-08-01-preview | new |
| arm/eventgrid | 2017-06-15-preview | new |
### ASM
- Marked as in mainteinance mode.
- Added Go 1.7 build tags.
### Storage
- Support for Go 1.7 and Go 1.6 (except table batch operation tests).
### Generated code notes
- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: ad55af74f3f0e2b390a4306532528168ba742fef
- [AutoRest](https://github.com/Azure/autorest) commit: cfb296f153f948f85afab637f7212fcfdc4a8bbb
## `v10.2.1-beta`
- Fixes polymorphic structs in `mysql` and `postgresql` packages.

View file

@ -16,41 +16,22 @@ import (
)
type service struct {
Name string
Fullname string
Namespace string
Packages []string
TaskName string
Version string
Input string
Output string
Swagger string
SubServices []service
Modeler modeler
Extension extension
Name string
Fullname string
Namespace string
TaskName string
Tag string
Input string
Output string
}
type modeler string
const (
swagger modeler = "Swagger"
compSwagger modeler = "CompositeSwagger"
)
type extension string
const (
md extension = "md"
json extension = "json"
)
const (
testsSubDir = "tests"
)
type mapping struct {
Plane string
InputPrefix string
PlaneInput string
PlaneOutput string
Services []service
}
@ -64,418 +45,174 @@ var (
services = []*service{}
servicesMapping = []mapping{
{
Plane: "arm",
InputPrefix: "arm-",
PlaneOutput: "arm",
PlaneInput: "resource-manager",
Services: []service{
{
Name: "advisor",
Version: "2017-04-19",
},
{
Name: "analysisservices",
Version: "2016-05-16",
},
{
Name: "apimanagement",
Swagger: "compositeApiManagementClient",
Modeler: compSwagger,
},
{
Name: "appinsights",
Swagger: "compositeAppInsightsManagementClient",
Modeler: compSwagger,
},
{
Name: "authorization",
Version: "2015-07-01",
},
{
Name: "automation",
Swagger: "compositeAutomation",
Modeler: compSwagger,
},
{
Name: "batch",
Version: "2017-01-01",
Swagger: "BatchManagement",
},
{
Name: "billing",
Version: "2017-04-24-preview",
},
{
Name: "cdn",
Version: "2016-10-02",
},
{
// bug in AutoRest (duplicated files)
Name: "cognitiveservices",
// Version: "2017-04-18",
Version: "2016-02-01-preview",
},
{
Name: "commerce",
Version: "2015-06-01-preview",
},
{
Name: "compute",
Version: "2016-04-30-preview",
},
{
Name: "containerservice",
Version: "2017-01-31",
Swagger: "containerService",
Input: "compute",
},
{
Name: "consumption",
Version: "2017-04-24-preview",
},
{
Name: "containerregistry",
Version: "2017-03-01",
},
{
Name: "cosmos-db",
Version: "2015-04-08",
},
{
Name: "customer-insights",
Version: "2017-01-01",
},
{
Name: "datalake-analytics",
SubServices: []service{
{
Name: "account",
Version: "2016-11-01",
},
},
},
{
Name: "datalake-store",
SubServices: []service{
{
Name: "account",
Version: "2016-11-01",
},
},
},
{
Name: "devtestlabs",
Version: "2016-05-15",
Swagger: "DTL",
},
{
Name: "disk",
Version: "2016-04-30-preview",
Swagger: "disk",
Input: "compute",
},
{
Name: "dns",
Version: "2016-04-01",
},
{Name: "advisor"},
{Name: "analysisservices"},
// {
// Name: "documentdb",
// Version: "2015-04-08",
// Autorest Bug
// Name: "apimanagement",
// },
{
Name: "eventhub",
Version: "2015-08-01",
Swagger: "EventHub",
},
{
Name: "graphrbac",
Swagger: "compositeGraphRbacManagementClient",
Modeler: compSwagger,
},
{
Name: "hdinsight",
Swagger: "compositeHDInsight",
Modeler: compSwagger,
},
{
Name: "insights",
Swagger: "compositeInsightsManagementClient",
Modeler: compSwagger,
},
{
Name: "intune",
Version: "2015-01-14-preview",
},
{
Name: "iothub",
Version: "2016-02-03",
},
{
Name: "keyvault",
Version: "2015-06-01",
},
{
Name: "logic",
Version: "2016-06-01",
},
{
Name: "machinelearning",
SubServices: []service{
{
Name: "commitmentplans",
Version: "2016-05-01-preview",
Swagger: "commitmentPlans",
Input: "machinelearning",
},
{
Name: "webservices",
Version: "2017-01-01",
Input: "machinelearning",
},
},
},
{
Name: "mediaservices",
Version: "2015-10-01",
Swagger: "media",
},
{
Name: "mobileengagement",
Version: "2014-12-01",
Swagger: "mobile-engagement",
},
{
Name: "monitor",
Swagger: "compositeMonitorManagementClient",
Modeler: compSwagger,
},
{
Name: "mysql",
Version: "2017-04-30-preview",
},
{
Name: "network",
Swagger: "compositeNetworkClient",
Modeler: compSwagger,
},
{
Name: "notificationhubs",
Version: "2017-04-01",
},
{
// bug in the Go generator https://github.com/Azure/autorest/issues/2219
Name: "operationalinsights",
// Swagger: "compositeOperationalInsights",
// Modeler: compSwagger,
Version: "2015-11-01-preview",
},
{
Name: "postgresql",
Version: "2017-04-30-preview",
},
{
Name: "powerbiembedded",
Version: "2016-01-29",
},
{
// bug in the go generator
Name: "recoveryservices",
// Swagger: "compositeRecoveryServicesClient",
// Modeler: compSwagger,
Version: "2016-06-01",
Swagger: "vaults",
},
{
// When using the readme.md, there is an exception in the modeler
Name: "recoveryservicesbackup",
Version: "2016-12-01",
// Swagger: "readme",
// Extension: md,
Swagger: "backupManagement",
},
{
Name: "recoveryservicessiterecovery",
Version: "2016-08-10",
Swagger: "service",
},
{
Name: "redis",
Version: "2016-04-01",
},
{
Name: "relay",
Version: "2016-07-01",
},
{
Name: "resourcehealth",
Version: "2015-01-01",
},
{
Name: "resources",
SubServices: []service{
{
Name: "features",
Version: "2015-12-01",
},
{
Name: "links",
Version: "2016-09-01",
},
{
Name: "locks",
Version: "2016-09-01",
},
{
Name: "managedapplications",
Version: "2016-09-01-preview",
},
{
Name: "policy",
Version: "2016-12-01",
},
{
Name: "resources",
Version: "2016-09-01",
// Version: "2017-05-10",
},
{
Name: "subscriptions",
Version: "2016-06-01",
},
},
},
{
Name: "scheduler",
Version: "2016-03-01",
},
{
Name: "search",
Version: "2015-08-19",
},
{
Name: "servermanagement",
Version: "2016-07-01-preview",
},
{
Name: "service-map",
Version: "2015-11-01-preview",
Swagger: "arm-service-map",
},
{
Name: "servicebus",
Version: "2015-08-01",
},
{
Name: "servicefabric",
Version: "2016-09-01",
},
{Name: "appinsights"},
{Name: "authorization"},
{Name: "automation"},
{Name: "batch"},
{Name: "billing"},
{Name: "cdn"},
// {
// Name: "sql",
// Swagger: "compositeSql",
// Modeler: compSwagger,
// bug in AutoRest (duplicated files)
// Name: "cognitiveservices",
// },
{Name: "commerce"},
{Name: "compute"},
{
Name: "storage",
Version: "2016-12-01",
Name: "containerservice",
Input: "compute",
Tag: "package-container-service-2017-01",
},
{Name: "consumption"},
{Name: "containerinstance"},
{Name: "containerregistry"},
{Name: "cosmos-db"},
{Name: "customer-insights"},
{
Name: "account",
Input: "datalake-analytics",
Output: "datalake-analytics/account",
},
{
Name: "storageimportexport",
Version: "2016-11-01",
Name: "account",
Input: "datalake-store",
Output: "datalake-store/account",
},
{Name: "devtestlabs"},
{Name: "dns"},
{Name: "eventgrid"},
{Name: "eventhub"},
{Name: "hdinsight"},
{Name: "intune"},
{Name: "iothub"},
{Name: "keyvault"},
{Name: "logic"},
{
Name: "commitmentplans",
Input: "machinelearning",
Output: "machinelearning/commitmentPlans",
Tag: "package-commitmentPlans-2016-05-preview",
},
{
Name: "storsimple8000series",
Version: "2017-06-01",
Swagger: "storsimple",
Name: "webservices",
Input: "machinelearning",
Output: "machinelearning/webservices",
Tag: "package-webservices-2017-01",
},
{Name: "mediaservices"},
{Name: "mobileengagement"},
{Name: "monitor"},
{Name: "mysql"},
{Name: "network"},
{Name: "notificationhubs"},
// {
// bug in the Go generator https://github.com/Azure/autorest/issues/2219
// Name: "operationalinsights",
// },
{Name: "postgresql"},
{Name: "powerbiembedded"},
{Name: "recoveryservices"},
{Name: "recoveryservicesbackup"},
{Name: "recoveryservicessiterecovery"},
{Name: "redis"},
{Name: "relay"},
{Name: "resourcehealth"},
{
Name: "features",
Input: "resources",
Output: "resources/features",
Tag: "package-features-2015-12",
},
{
Name: "streamanalytics",
Swagger: "compositeStreamAnalytics",
Modeler: compSwagger,
Name: "links",
Input: "resources",
Output: "resources/links",
Tag: "package-links-2016-09",
},
{
Name: "locks",
Input: "resources",
Output: "resources/locks",
Tag: "package-locks-2016-09",
},
{
Name: "managedapplications",
Input: "resources",
Output: "resources/managedapplications",
Tag: "package-managedapplications-2016-09",
},
{
Name: "policy",
Input: "resources",
Output: "resources/policy",
Tag: "package-policy-2016-12",
},
{
Name: "resources",
Input: "resources",
Output: "resources/resources",
Tag: "package-resources-2017-05",
},
{
Name: "subscriptions",
Input: "resources",
Output: "resources/subscriptions",
Tag: "package-subscriptions-2016-06",
},
{Name: "scheduler"},
{Name: "search"},
{Name: "servermanagement"},
{Name: "service-map"},
{Name: "servicebus"},
{Name: "servicefabric"},
{Name: "sql"},
{Name: "storage"},
{Name: "storageimportexport"},
{Name: "storsimple8000series"},
{Name: "streamanalytics"},
// {
// error in the modeler
// Name: "timeseriesinsights",
// Version: "2017-02-28-preview",
// },
{Name: "trafficmanager"},
{Name: "visualstudio"},
{Name: "web"},
},
},
{
PlaneOutput: "dataplane",
PlaneInput: "data-plane",
Services: []service{
{
Name: "trafficmanager",
Version: "2015-11-01",
},
{
Name: "web",
Swagger: "compositeWebAppClient",
Modeler: compSwagger,
Name: "keyvault",
},
},
},
{
Plane: "dataplane",
InputPrefix: "",
PlaneInput: "data-plane",
Services: []service{
// {
// Name: "batch",
// Version: "2017-01-01.4.0",
// Swagger: "BatchService",
// },
// {
// Name: "insights",
// Swagger: "compositeInsightsClient",
// Modeler: compSwagger,
// },
{
Name: "keyvault",
Version: "2016-10-01",
Name: "filesystem",
Input: "datalake-store",
Output: "datalake-store/filesystem",
},
// {
// Name: "monitor",
// Swagger: "compositeMonitorClient",
// Modeler: compSwagger,
// },
// {
// Name: "search",
// SubServices: []service{
// {
// Name: "searchindex",
// Version: "2016-09-01",
// Input: "search",
// },
// {
// Name: "searchservice",
// Version: "2016-09-01",
// Input: "search",
// },
// },
// },
// {
// Name: "servicefabric",
// Version: "2016-01-28",
// },
},
},
{
Plane: "",
InputPrefix: "arm-",
PlaneOutput: "arm",
PlaneInput: "data-plane",
Services: []service{
{
Name: "datalake-store",
SubServices: []service{
{
Name: "filesystem",
Version: "2016-11-01",
},
},
Name: "graphrbac",
},
// {
// Name: "datalake-analytics",
// SubServices: []service{
// {
// Name: "catalog",
// Version: "2016-11-01",
// },
// {
// Name: "job",
// Version: "2016-11-01",
// },
// },
// },
},
},
}
@ -486,52 +223,27 @@ func main() {
swg := swaggerGroup
for _, service := range swg.Services {
s := service
initAndAddService(&s, swg.InputPrefix, swg.Plane)
initAndAddService(&s, swg.PlaneInput, swg.PlaneOutput)
}
}
do.Godo(tasks)
}
func initAndAddService(service *service, inputPrefix, plane string) {
if service.Swagger == "" {
service.Swagger = service.Name
func initAndAddService(service *service, planeInput, planeOutput string) {
if service.Input == "" {
service.Input = service.Name
}
if service.Extension == "" {
service.Extension = json
}
packages := append(service.Packages, service.Name)
service.TaskName = fmt.Sprintf("%s>%s", plane, strings.Join(packages, ">"))
service.Fullname = filepath.Join(plane, strings.Join(packages, string(os.PathSeparator)))
if service.Modeler == compSwagger {
service.Input = filepath.Join(inputPrefix+strings.Join(packages, string(os.PathSeparator)), service.Swagger)
} else {
input := []string{}
if service.Input == "" {
input = append(input, inputPrefix+strings.Join(packages, string(os.PathSeparator)))
} else {
input = append(input, inputPrefix+service.Input)
}
input = append(input, service.Version)
if service.Extension == json {
input = append(input, "swagger")
}
input = append(input, service.Swagger)
service.Input = filepath.Join(input...)
service.Modeler = swagger
service.Input = filepath.Join(service.Input, planeInput, "readme.md")
if service.Output == "" {
service.Output = service.Name
}
service.TaskName = fmt.Sprintf("%s>%s", planeOutput, strings.Join(strings.Split(service.Output, "/"), ">"))
service.Fullname = filepath.Join(planeOutput, service.Output)
service.Namespace = filepath.Join("github.com", "Azure", "azure-sdk-for-go", service.Fullname)
service.Output = filepath.Join(gopath, "src", service.Namespace)
if service.SubServices != nil {
for _, subs := range service.SubServices {
ss := subs
ss.Packages = append(ss.Packages, service.Name)
initAndAddService(&ss, inputPrefix, plane)
}
} else {
services = append(services, service)
deps = append(deps, service.TaskName)
}
services = append(services, service)
deps = append(deps, service.TaskName)
}
func tasks(p *do.Project) {
@ -542,7 +254,6 @@ func tasks(p *do.Project) {
p.Use("gobuild", buildTasks)
p.Use("golint", lintTasks)
p.Use("govet", vetTasks)
p.Use("delete", deleteTasks)
p.Task("management", do.S{"setvars"}, managementVersion)
p.Task("addVersion", nil, addVersion)
}
@ -554,7 +265,7 @@ func setVars(c *do.Context) {
sdkVersion = c.Args.MustString("s", "sdk", "version")
autorestDir = c.Args.MayString("", "a", "ar", "autorest")
swaggersDir = c.Args.MayString("C:/", "w", "sw", "swagger")
swaggersDir = c.Args.MayString("", "w", "sw", "swagger")
testGen = c.Args.MayBool(false, "t", "testgen")
}
@ -563,44 +274,49 @@ func generateTasks(p *do.Project) {
}
func generate(service *service) {
codegen := "Go"
codegen := "--go"
if testGen {
codegen = "Go.TestGen"
codegen = "--go.testgen"
service.Fullname = strings.Join([]string{service.Fullname, testsSubDir}, string(os.PathSeparator))
service.Output = filepath.Join(service.Output, testsSubDir)
}
fmt.Printf("Generating %s...\n\n", service.Fullname)
delete(service)
fullInput := ""
if swaggersDir == "" {
fullInput = fmt.Sprintf("https://raw.githubusercontent.com/Azure/azure-rest-api-specs/current/specification/%s", service.Input)
} else {
fullInput = filepath.Join(swaggersDir, "azure-rest-api-specs", "specification", service.Input)
}
execCommand := "autorest"
commandArgs := []string{
"-Input", filepath.Join(swaggersDir, "azure-rest-api-specs", service.Input+"."+string(service.Extension)),
"-CodeGenerator", codegen,
"-Header", "MICROSOFT_APACHE",
"-Namespace", service.Name,
"-OutputDirectory", service.Output,
"-Modeler", string(service.Modeler),
"-PackageVersion", sdkVersion,
fullInput,
codegen,
"--license-header=MICROSOFT_APACHE",
fmt.Sprintf("--namespace=%s", service.Name),
fmt.Sprintf("--output-folder=%s", service.Output),
fmt.Sprintf("--package-version=%s", sdkVersion),
"--clear-output-folder",
"--can-clear-output-folder",
}
if service.Tag != "" {
commandArgs = append(commandArgs, fmt.Sprintf("--tag=%s", service.Tag))
}
if testGen {
commandArgs = append([]string{"-LEGACY"}, commandArgs...)
}
// default to the current directory
workingDir := ""
if autorestDir != "" {
// if an AutoRest directory was specified then assume
// the caller wants to use a locally-built version.
execCommand = "gulp"
commandArgs = append([]string{"autorest"}, commandArgs...)
workingDir = filepath.Join(autorestDir, "autorest")
commandArgs = append(commandArgs, fmt.Sprintf("--use=%s", autorestDir))
}
autorest := exec.Command(execCommand, commandArgs...)
autorest.Dir = workingDir
fmt.Println(commandArgs)
if _, err := runner(autorest); err != nil {
panic(fmt.Errorf("Autorest error: %s", err))
@ -612,18 +328,6 @@ func generate(service *service) {
vet(service)
}
func deleteTasks(p *do.Project) {
addTasks(format, p)
}
func delete(service *service) {
fmt.Printf("Deleting %s...\n\n", service.Fullname)
err := os.RemoveAll(service.Output)
if err != nil {
panic(fmt.Sprintf("Error deleting %s : %s\n", service.Output, err))
}
}
func formatTasks(p *do.Project) {
addTasks(format, p)
}
@ -702,7 +406,9 @@ func managementVersion(c *do.Context) {
func version(packageName string) {
versionFile := filepath.Join(packageName, "version.go")
os.Remove(versionFile)
template := `package %s
template := `// +build go1.7
package %s
var (
sdkVersion = "%s"

5
vendor/github.com/Azure/azure-sdk-for-go/NOTICE generated vendored Normal file
View file

@ -0,0 +1,5 @@
Microsoft Azure-SDK-for-Go
Copyright 2014-2017 Microsoft
This product includes software developed at
the Microsoft Corporation (https://www.microsoft.com).

View file

@ -14,15 +14,15 @@ package advisor
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-advisor/2017-04-19"
return "Azure-SDK-For-Go/v10.3.1-beta arm-advisor/2017-04-19"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package analysisservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-analysisservices/2016-05-16"
return "Azure-SDK-For-Go/v10.3.1-beta arm-analysisservices/2017-08-01-beta"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package appinsights
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-appinsights/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-appinsights/2015-05-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package authorization
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-authorization/2015-07-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-authorization/2015-07-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package automation
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-automation/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-automation/2015-10-31"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package batch
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-batch/2017-01-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-batch/2017-05-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package billing
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-billing/2017-04-24-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-billing/2017-04-24-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package cdn
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-cdn/2016-10-02"
return "Azure-SDK-For-Go/v10.3.1-beta arm-cdn/2016-10-02"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package commerce
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-commerce/2015-06-01-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-commerce/2015-06-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package compute
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-compute/2016-04-30-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-compute/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package consumption
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-consumption/2017-04-24-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-consumption/2017-04-24-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -0,0 +1,51 @@
// Package containerinstance implements the Azure ARM Containerinstance service API version 2017-08-01-preview.
//
//
package containerinstance
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
)
const (
// DefaultBaseURI is the default URI used for the service Containerinstance
DefaultBaseURI = "https://management.azure.com"
)
// ManagementClient is the base client for Containerinstance.
type ManagementClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the ManagementClient client.
func New(subscriptionID string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}

View file

@ -0,0 +1,512 @@
package containerinstance
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// ContainerGroupsClient is the client for the ContainerGroups methods of the Containerinstance service.
type ContainerGroupsClient struct {
ManagementClient
}
// NewContainerGroupsClient creates an instance of the ContainerGroupsClient client.
func NewContainerGroupsClient(subscriptionID string) ContainerGroupsClient {
return NewContainerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewContainerGroupsClientWithBaseURI creates an instance of the ContainerGroupsClient client.
func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ContainerGroupsClient {
return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate create or update container groups.
//
// resourceGroupName is azure resource group name containerGroupName is container group name containerGroup is
// definition of the container to be created.
func (client ContainerGroupsClient) CreateOrUpdate(resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (result ContainerGroup, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: containerGroup,
Constraints: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.IPAddress.Ports", Name: validation.Null, Rule: true, Chain: nil},
{Target: "containerGroup.ContainerGroupProperties.IPAddress.Type", Name: validation.Null, Rule: true, Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate")
}
req, err := client.CreateOrUpdatePreparer(resourceGroupName, containerGroupName, containerGroup)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client ContainerGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerGroupName": autorest.Encode("path", containerGroupName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
autorest.WithJSON(containerGroup),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client ContainerGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete delete container groups.
//
// resourceGroupName is azure resource group name containerGroupName is name of the container group to be deleted
func (client ContainerGroupsClient) Delete(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
req, err := client.DeletePreparer(resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", resp, "Failure responding to request")
}
return
}
// DeletePreparer prepares the Delete request.
func (client ContainerGroupsClient) DeletePreparer(resourceGroupName string, containerGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerGroupName": autorest.Encode("path", containerGroupName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client ContainerGroupsClient) DeleteResponder(resp *http.Response) (result ContainerGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Get get details for this container group.
//
// resourceGroupName is azure resource group name containerGroupName is container group name
func (client ContainerGroupsClient) Get(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
req, err := client.GetPreparer(resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
func (client ContainerGroupsClient) GetPreparer(resourceGroupName string, containerGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerGroupName": autorest.Encode("path", containerGroupName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client ContainerGroupsClient) GetResponder(resp *http.Response) (result ContainerGroup, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// List get the list of container groups in a given subscription.
func (client ContainerGroupsClient) List() (result ContainerGroupListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client ContainerGroupsClient) ListPreparer() (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client ContainerGroupsClient) ListResponder(resp *http.Response) (result ContainerGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListNextResults retrieves the next set of results, if any.
func (client ContainerGroupsClient) ListNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
req, err := lastResults.ContainerGroupListResultPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure sending next results request")
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "List", resp, "Failure responding to next results request")
}
return
}
// ListComplete gets all elements from the list without paging.
func (client ContainerGroupsClient) ListComplete(cancel <-chan struct{}) (<-chan ContainerGroup, <-chan error) {
resultChan := make(chan ContainerGroup)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List()
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}
// ListByResourceGroup get the list of container groups in a given resource group.
//
// resourceGroupName is azure resource group name
func (client ContainerGroupsClient) ListByResourceGroup(resourceGroupName string) (result ContainerGroupListResult, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
return
}
resp, err := client.ListByResourceGroupSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
return
}
result, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
}
return
}
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client ContainerGroupsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
// closes the http.Response Body.
func (client ContainerGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerGroupListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByResourceGroupNextResults retrieves the next set of results, if any.
func (client ContainerGroupsClient) ListByResourceGroupNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
req, err := lastResults.ContainerGroupListResultPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByResourceGroupSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure sending next results request")
}
result, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "ListByResourceGroup", resp, "Failure responding to next results request")
}
return
}
// ListByResourceGroupComplete gets all elements from the list without paging.
func (client ContainerGroupsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ContainerGroup, <-chan error) {
resultChan := make(chan ContainerGroup)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByResourceGroup(resourceGroupName)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
for list.NextLink != nil {
list, err = client.ListByResourceGroupNextResults(list)
if err != nil {
errChan <- err
return
}
if list.Value != nil {
for _, item := range *list.Value {
select {
case <-cancel:
return
case resultChan <- item:
// Intentionally left blank
}
}
}
}
}()
return resultChan, errChan
}

View file

@ -0,0 +1,109 @@
package containerinstance
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// ContainerLogsClient is the client for the ContainerLogs methods of the Containerinstance service.
type ContainerLogsClient struct {
ManagementClient
}
// NewContainerLogsClient creates an instance of the ContainerLogsClient client.
func NewContainerLogsClient(subscriptionID string) ContainerLogsClient {
return NewContainerLogsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewContainerLogsClientWithBaseURI creates an instance of the ContainerLogsClient client.
func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) ContainerLogsClient {
return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List get the logs for this container.
//
// resourceGroupName is azure resource group name containerName is container name containerGroupName is container group
// name tail is only show this number of log lines. If not provided, all available logs are shown.
func (client ContainerLogsClient) List(resourceGroupName string, containerName string, containerGroupName string, tail *int32) (result Logs, err error) {
req, err := client.ListPreparer(resourceGroupName, containerName, containerGroupName, tail)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerLogsClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client ContainerLogsClient) ListPreparer(resourceGroupName string, containerName string, containerGroupName string, tail *int32) (*http.Request, error) {
pathParameters := map[string]interface{}{
"containerGroupName": autorest.Encode("path", containerGroupName),
"containerName": autorest.Encode("path", containerName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-08-01-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
if tail != nil {
queryParameters["tail"] = autorest.Encode("query", *tail)
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client ContainerLogsClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client ContainerLogsClient) ListResponder(resp *http.Response) (result Logs, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

View file

@ -0,0 +1,223 @@
package containerinstance
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// ContainerGroupNetworkProtocol enumerates the values for container group network protocol.
type ContainerGroupNetworkProtocol string
const (
// TCP specifies the tcp state for container group network protocol.
TCP ContainerGroupNetworkProtocol = "TCP"
// UDP specifies the udp state for container group network protocol.
UDP ContainerGroupNetworkProtocol = "UDP"
)
// ContainerRestartPolicy enumerates the values for container restart policy.
type ContainerRestartPolicy string
const (
// Always specifies the always state for container restart policy.
Always ContainerRestartPolicy = "always"
)
// OperatingSystemTypes enumerates the values for operating system types.
type OperatingSystemTypes string
const (
// Linux specifies the linux state for operating system types.
Linux OperatingSystemTypes = "Linux"
// Windows specifies the windows state for operating system types.
Windows OperatingSystemTypes = "Windows"
)
// AzureFileVolume is the Azure file volume.
type AzureFileVolume struct {
ShareName *string `json:"shareName,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty"`
StorageAccountName *string `json:"storageAccountName,omitempty"`
StorageAccountKey *string `json:"storageAccountKey,omitempty"`
}
// Container is a container instance.
type Container struct {
Name *string `json:"name,omitempty"`
*ContainerProperties `json:"properties,omitempty"`
}
// ContainerEvent is a container event.
type ContainerEvent struct {
Count *int32 `json:"count,omitempty"`
FirstTimestamp *date.Time `json:"firstTimestamp,omitempty"`
LastTimestamp *date.Time `json:"lastTimestamp,omitempty"`
Message *string `json:"message,omitempty"`
Type *string `json:"type,omitempty"`
}
// ContainerGroup is a container group.
type ContainerGroup struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*ContainerGroupProperties `json:"properties,omitempty"`
}
// ContainerGroupProperties is
type ContainerGroupProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
Containers *[]Container `json:"containers,omitempty"`
ImageRegistryCredentials *[]ImageRegistryCredential `json:"imageRegistryCredentials,omitempty"`
RestartPolicy ContainerRestartPolicy `json:"restartPolicy,omitempty"`
IPAddress *IPAddress `json:"ipAddress,omitempty"`
OsType OperatingSystemTypes `json:"osType,omitempty"`
State *string `json:"state,omitempty"`
Volumes *[]Volume `json:"volumes,omitempty"`
}
// ContainerGroupListResult is the container group list response that contains the container group properties.
type ContainerGroupListResult struct {
autorest.Response `json:"-"`
Value *[]ContainerGroup `json:"value,omitempty"`
NextLink *string `json:"nextLink,omitempty"`
}
// ContainerGroupListResultPreparer prepares a request to retrieve the next set of results. It returns
// nil if no more results exist.
func (client ContainerGroupListResult) ContainerGroupListResultPreparer() (*http.Request, error) {
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(client.NextLink)))
}
// ContainerPort is the container port.
type ContainerPort struct {
Port *int32 `json:"port,omitempty"`
}
// ContainerProperties is the container properties.
type ContainerProperties struct {
Image *string `json:"image,omitempty"`
Command *[]string `json:"command,omitempty"`
Ports *[]ContainerPort `json:"ports,omitempty"`
EnvironmentVariables *[]EnvironmentVariable `json:"environmentVariables,omitempty"`
InstanceView *ContainerPropertiesInstanceView `json:"instanceView,omitempty"`
Resources *ResourceRequirements `json:"resources,omitempty"`
VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"`
}
// ContainerPropertiesInstanceView is the instance view of the container. Only valid in response.
type ContainerPropertiesInstanceView struct {
RestartCount *int32 `json:"restartCount,omitempty"`
CurrentState *ContainerState `json:"currentState,omitempty"`
PreviousState *ContainerState `json:"previousState,omitempty"`
Events *[]ContainerEvent `json:"events,omitempty"`
}
// ContainerState is the container state.
type ContainerState struct {
State *string `json:"state,omitempty"`
StartTime *date.Time `json:"startTime,omitempty"`
ExitCode *int32 `json:"exitCode,omitempty"`
FinishTime *date.Time `json:"finishTime,omitempty"`
DetailStatus *string `json:"detailStatus,omitempty"`
}
// EnvironmentVariable is environment variable to set within the container.
type EnvironmentVariable struct {
Name *string `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
}
// ImageRegistryCredential is image registry credential.
type ImageRegistryCredential struct {
Server *string `json:"server,omitempty"`
Username *string `json:"username,omitempty"`
Password *string `json:"password,omitempty"`
}
// IPAddress is IP address for the group.
type IPAddress struct {
Ports *[]Port `json:"ports,omitempty"`
Type *string `json:"type,omitempty"`
IP *string `json:"ip,omitempty"`
}
// Logs is the logs.
type Logs struct {
autorest.Response `json:"-"`
Content *string `json:"content,omitempty"`
}
// Port is the port.
type Port struct {
Protocol ContainerGroupNetworkProtocol `json:"protocol,omitempty"`
Port *int32 `json:"port,omitempty"`
}
// Resource is the Resource model definition.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// ResourceLimits is the resource limits.
type ResourceLimits struct {
MemoryInGB *float64 `json:"memoryInGB,omitempty"`
CPU *float64 `json:"cpu,omitempty"`
}
// ResourceRequests is the resource requests.
type ResourceRequests struct {
MemoryInGB *float64 `json:"memoryInGB,omitempty"`
CPU *float64 `json:"cpu,omitempty"`
}
// ResourceRequirements is the resource requirements.
type ResourceRequirements struct {
Requests *ResourceRequests `json:"requests,omitempty"`
Limits *ResourceLimits `json:"limits,omitempty"`
}
// Volume is the volume.
type Volume struct {
Name *string `json:"name,omitempty"`
AzureFile *AzureFileVolume `json:"azureFile,omitempty"`
}
// VolumeMount is the volume mount.
type VolumeMount struct {
Name *string `json:"name,omitempty"`
MountPath *string `json:"mountPath,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty"`
}

View file

@ -0,0 +1,28 @@
package containerinstance
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.3.1-beta arm-containerinstance/2017-08-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package containerregistry
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-containerregistry/2017-03-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-containerregistry/2017-06-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package containerservice
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-containerservice/2017-01-31"
return "Azure-SDK-For-Go/v10.3.1-beta arm-containerservice/2017-01-31"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package cosmosdb
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-cosmosdb/2015-04-08"
return "Azure-SDK-For-Go/v10.3.1-beta arm-cosmosdb/2015-04-08"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package customerinsights
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-customerinsights/2017-01-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-customerinsights/2017-04-26"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package account
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-account/2016-11-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package account
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-account/2016-11-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package devtestlabs
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-devtestlabs/2016-05-15"
return "Azure-SDK-For-Go/v10.3.1-beta arm-devtestlabs/2016-05-15"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package dns
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-dns/2016-04-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-dns/2016-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -0,0 +1,51 @@
// Package eventgrid implements the Azure ARM Eventgrid service API version 2017-06-15-preview.
//
// Azure EventGrid Management Client
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
)
const (
// DefaultBaseURI is the default URI used for the service Eventgrid
DefaultBaseURI = "https://management.azure.com"
)
// ManagementClient is the base client for Eventgrid.
type ManagementClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the ManagementClient client.
func New(subscriptionID string) ManagementClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,292 @@
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
)
// EndpointType enumerates the values for endpoint type.
type EndpointType string
const (
// WebHook specifies the web hook state for endpoint type.
WebHook EndpointType = "WebHook"
)
// EventSubscriptionProvisioningState enumerates the values for event subscription provisioning state.
type EventSubscriptionProvisioningState string
const (
// Canceled specifies the canceled state for event subscription provisioning state.
Canceled EventSubscriptionProvisioningState = "Canceled"
// Creating specifies the creating state for event subscription provisioning state.
Creating EventSubscriptionProvisioningState = "Creating"
// Deleting specifies the deleting state for event subscription provisioning state.
Deleting EventSubscriptionProvisioningState = "Deleting"
// Failed specifies the failed state for event subscription provisioning state.
Failed EventSubscriptionProvisioningState = "Failed"
// Succeeded specifies the succeeded state for event subscription provisioning state.
Succeeded EventSubscriptionProvisioningState = "Succeeded"
// Updating specifies the updating state for event subscription provisioning state.
Updating EventSubscriptionProvisioningState = "Updating"
)
// OperationOrigin enumerates the values for operation origin.
type OperationOrigin string
const (
// System specifies the system state for operation origin.
System OperationOrigin = "System"
// User specifies the user state for operation origin.
User OperationOrigin = "User"
// UserAndSystem specifies the user and system state for operation origin.
UserAndSystem OperationOrigin = "UserAndSystem"
)
// ResourceRegionType enumerates the values for resource region type.
type ResourceRegionType string
const (
// GlobalResource specifies the global resource state for resource region type.
GlobalResource ResourceRegionType = "GlobalResource"
// RegionalResource specifies the regional resource state for resource region type.
RegionalResource ResourceRegionType = "RegionalResource"
)
// TopicProvisioningState enumerates the values for topic provisioning state.
type TopicProvisioningState string
const (
// TopicProvisioningStateCanceled specifies the topic provisioning state canceled state for topic provisioning
// state.
TopicProvisioningStateCanceled TopicProvisioningState = "Canceled"
// TopicProvisioningStateCreating specifies the topic provisioning state creating state for topic provisioning
// state.
TopicProvisioningStateCreating TopicProvisioningState = "Creating"
// TopicProvisioningStateDeleting specifies the topic provisioning state deleting state for topic provisioning
// state.
TopicProvisioningStateDeleting TopicProvisioningState = "Deleting"
// TopicProvisioningStateFailed specifies the topic provisioning state failed state for topic provisioning state.
TopicProvisioningStateFailed TopicProvisioningState = "Failed"
// TopicProvisioningStateSucceeded specifies the topic provisioning state succeeded state for topic provisioning
// state.
TopicProvisioningStateSucceeded TopicProvisioningState = "Succeeded"
// TopicProvisioningStateUpdating specifies the topic provisioning state updating state for topic provisioning
// state.
TopicProvisioningStateUpdating TopicProvisioningState = "Updating"
)
// TopicTypeProvisioningState enumerates the values for topic type provisioning state.
type TopicTypeProvisioningState string
const (
// TopicTypeProvisioningStateCanceled specifies the topic type provisioning state canceled state for topic type
// provisioning state.
TopicTypeProvisioningStateCanceled TopicTypeProvisioningState = "Canceled"
// TopicTypeProvisioningStateCreating specifies the topic type provisioning state creating state for topic type
// provisioning state.
TopicTypeProvisioningStateCreating TopicTypeProvisioningState = "Creating"
// TopicTypeProvisioningStateDeleting specifies the topic type provisioning state deleting state for topic type
// provisioning state.
TopicTypeProvisioningStateDeleting TopicTypeProvisioningState = "Deleting"
// TopicTypeProvisioningStateFailed specifies the topic type provisioning state failed state for topic type
// provisioning state.
TopicTypeProvisioningStateFailed TopicTypeProvisioningState = "Failed"
// TopicTypeProvisioningStateSucceeded specifies the topic type provisioning state succeeded state for topic type
// provisioning state.
TopicTypeProvisioningStateSucceeded TopicTypeProvisioningState = "Succeeded"
// TopicTypeProvisioningStateUpdating specifies the topic type provisioning state updating state for topic type
// provisioning state.
TopicTypeProvisioningStateUpdating TopicTypeProvisioningState = "Updating"
)
// EventSubscription is event Subscription
type EventSubscription struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*EventSubscriptionProperties `json:"properties,omitempty"`
}
// EventSubscriptionDestination is information about the destination for an event subscription
type EventSubscriptionDestination struct {
EndpointType EndpointType `json:"endpointType,omitempty"`
*EventSubscriptionDestinationProperties `json:"properties,omitempty"`
}
// EventSubscriptionDestinationProperties is properties of the event subscription destination
type EventSubscriptionDestinationProperties struct {
EndpointURL *string `json:"endpointUrl,omitempty"`
EndpointBaseURL *string `json:"endpointBaseUrl,omitempty"`
}
// EventSubscriptionFilter is filter for the Event Subscription
type EventSubscriptionFilter struct {
SubjectBeginsWith *string `json:"subjectBeginsWith,omitempty"`
SubjectEndsWith *string `json:"subjectEndsWith,omitempty"`
IncludedEventTypes *[]string `json:"includedEventTypes,omitempty"`
IsSubjectCaseSensitive *bool `json:"isSubjectCaseSensitive,omitempty"`
}
// EventSubscriptionFullURL is full endpoint url of an event subscription
type EventSubscriptionFullURL struct {
autorest.Response `json:"-"`
EndpointURL *string `json:"endpointUrl,omitempty"`
}
// EventSubscriptionProperties is properties of the Event Subscription
type EventSubscriptionProperties struct {
Topic *string `json:"topic,omitempty"`
ProvisioningState EventSubscriptionProvisioningState `json:"provisioningState,omitempty"`
Destination *EventSubscriptionDestination `json:"destination,omitempty"`
Filter *EventSubscriptionFilter `json:"filter,omitempty"`
Labels *[]string `json:"labels,omitempty"`
}
// EventSubscriptionsListResult is result of the List EventSubscriptions operation
type EventSubscriptionsListResult struct {
autorest.Response `json:"-"`
Value *[]EventSubscription `json:"value,omitempty"`
}
// EventSubscriptionUpdateParameters is properties of the Event Subscription update
type EventSubscriptionUpdateParameters struct {
Destination *EventSubscriptionDestination `json:"destination,omitempty"`
Filter *EventSubscriptionFilter `json:"filter,omitempty"`
Labels *[]string `json:"labels,omitempty"`
}
// EventType is event Type for a subject under a topic
type EventType struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*EventTypeProperties `json:"properties,omitempty"`
}
// EventTypeProperties is properties of the event type
type EventTypeProperties struct {
DisplayName *string `json:"displayName,omitempty"`
Description *string `json:"description,omitempty"`
SchemaURL *string `json:"schemaUrl,omitempty"`
}
// EventTypesListResult is result of the List Event Types operation
type EventTypesListResult struct {
autorest.Response `json:"-"`
Value *[]EventType `json:"value,omitempty"`
}
// Operation is represents an operation returned by the GetOperations request
type Operation struct {
Name *string `json:"name,omitempty"`
Display *OperationInfo `json:"display,omitempty"`
Origin OperationOrigin `json:"origin,omitempty"`
Properties *map[string]interface{} `json:"properties,omitempty"`
}
// OperationInfo is information about an operation
type OperationInfo struct {
Provider *string `json:"provider,omitempty"`
Resource *string `json:"resource,omitempty"`
Operation *string `json:"operation,omitempty"`
Description *string `json:"description,omitempty"`
}
// OperationsListResult is result of the List Operations operation
type OperationsListResult struct {
autorest.Response `json:"-"`
Value *[]Operation `json:"value,omitempty"`
}
// Resource is definition of a Resource
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
}
// Topic is eventGrid Topic
type Topic struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
*TopicProperties `json:"properties,omitempty"`
}
// TopicProperties is properties of the Topic
type TopicProperties struct {
ProvisioningState TopicProvisioningState `json:"provisioningState,omitempty"`
Endpoint *string `json:"endpoint,omitempty"`
}
// TopicRegenerateKeyRequest is topic regenerate share access key key request
type TopicRegenerateKeyRequest struct {
KeyName *string `json:"keyName,omitempty"`
}
// TopicSharedAccessKeys is shared access keys of the Topic
type TopicSharedAccessKeys struct {
autorest.Response `json:"-"`
Key1 *string `json:"key1,omitempty"`
Key2 *string `json:"key2,omitempty"`
}
// TopicsListResult is result of the List Topics operation
type TopicsListResult struct {
autorest.Response `json:"-"`
Value *[]Topic `json:"value,omitempty"`
}
// TopicTypeInfo is properties of a topic type info.
type TopicTypeInfo struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*TopicTypeProperties `json:"properties,omitempty"`
}
// TopicTypeProperties is properties of a topic type.
type TopicTypeProperties struct {
Provider *string `json:"provider,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Description *string `json:"description,omitempty"`
ResourceRegionType ResourceRegionType `json:"resourceRegionType,omitempty"`
ProvisioningState TopicTypeProvisioningState `json:"provisioningState,omitempty"`
}
// TopicTypesListResult is result of the List Topic Types operation
type TopicTypesListResult struct {
autorest.Response `json:"-"`
Value *[]TopicTypeInfo `json:"value,omitempty"`
}
// TrackedResource is definition of a Tracked Resource
type TrackedResource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Location *string `json:"location,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}

View file

@ -0,0 +1,96 @@
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// OperationsClient is the azure EventGrid Management Client
type OperationsClient struct {
ManagementClient
}
// NewOperationsClient creates an instance of the OperationsClient client.
func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List list the available operations supported by the Microsoft.EventGrid resource provider
func (client OperationsClient) List() (result OperationsListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer() (*http.Request, error) {
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/providers/Microsoft.EventGrid/operations"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

View file

@ -0,0 +1,602 @@
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"net/http"
)
// TopicsClient is the azure EventGrid Management Client
type TopicsClient struct {
ManagementClient
}
// NewTopicsClient creates an instance of the TopicsClient client.
func NewTopicsClient(subscriptionID string) TopicsClient {
return NewTopicsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewTopicsClientWithBaseURI creates an instance of the TopicsClient client.
func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsClient {
return TopicsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate asynchronously creates a new topic with the specified parameters. This method may poll for
// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel
// polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic
// topicInfo is topic information
func (client TopicsClient) CreateOrUpdate(resourceGroupName string, topicName string, topicInfo Topic, cancel <-chan struct{}) (<-chan Topic, <-chan error) {
resultChan := make(chan Topic, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result Topic
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
close(resultChan)
close(errChan)
}()
req, err := client.CreateOrUpdatePreparer(resourceGroupName, topicName, topicInfo, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
resp, err := client.CreateOrUpdateSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", resp, "Failure sending request")
return
}
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, topicName string, topicInfo Topic, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"topicName": autorest.Encode("path", topicName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters),
autorest.WithJSON(topicInfo),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result Topic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete delete existing topic This method may poll for completion. Polling can be canceled by passing the cancel
// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests.
//
// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic
func (client TopicsClient) Delete(resourceGroupName string, topicName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
go func() {
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
close(resultChan)
close(errChan)
}()
req, err := client.DeletePreparer(resourceGroupName, topicName, cancel)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", nil, "Failure preparing request")
return
}
resp, err := client.DeleteSender(req)
if err != nil {
result.Response = resp
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", resp, "Failure sending request")
return
}
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", resp, "Failure responding to request")
}
}()
return resultChan, errChan
}
// DeletePreparer prepares the Delete request.
func (client TopicsClient) DeletePreparer(resourceGroupName string, topicName string, cancel <-chan struct{}) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"topicName": autorest.Encode("path", topicName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{Cancel: cancel})
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) DeleteSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client,
req,
azure.DoPollForAsynchronous(client.PollingDelay))
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get get properties of a topic
//
// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic
func (client TopicsClient) Get(resourceGroupName string, topicName string) (result Topic, err error) {
req, err := client.GetPreparer(resourceGroupName, topicName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
func (client TopicsClient) GetPreparer(resourceGroupName string, topicName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"topicName": autorest.Encode("path", topicName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) GetSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client TopicsClient) GetResponder(resp *http.Response) (result Topic, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByResourceGroup list all the topics under a resource group
//
// resourceGroupName is the name of the resource group within the user's subscription.
func (client TopicsClient) ListByResourceGroup(resourceGroupName string) (result TopicsListResult, err error) {
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", nil, "Failure preparing request")
return
}
resp, err := client.ListByResourceGroupSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", resp, "Failure sending request")
return
}
result, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", resp, "Failure responding to request")
}
return
}
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
func (client TopicsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
// closes the http.Response Body.
func (client TopicsClient) ListByResourceGroupResponder(resp *http.Response) (result TopicsListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListBySubscription list all the topics under an Azure subscription
func (client TopicsClient) ListBySubscription() (result TopicsListResult, err error) {
req, err := client.ListBySubscriptionPreparer()
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", nil, "Failure preparing request")
return
}
resp, err := client.ListBySubscriptionSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", resp, "Failure sending request")
return
}
result, err = client.ListBySubscriptionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", resp, "Failure responding to request")
}
return
}
// ListBySubscriptionPreparer prepares the ListBySubscription request.
func (client TopicsClient) ListBySubscriptionPreparer() (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
// closes the http.Response Body.
func (client TopicsClient) ListBySubscriptionResponder(resp *http.Response) (result TopicsListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListEventTypes list event types for a topic
//
// resourceGroupName is the name of the resource group within the user's subscription. providerNamespace is namespace
// of the provider of the topic resourceTypeName is name of the topic type resourceName is name of the topic
func (client TopicsClient) ListEventTypes(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result EventTypesListResult, err error) {
req, err := client.ListEventTypesPreparer(resourceGroupName, providerNamespace, resourceTypeName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", nil, "Failure preparing request")
return
}
resp, err := client.ListEventTypesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", resp, "Failure sending request")
return
}
result, err = client.ListEventTypesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", resp, "Failure responding to request")
}
return
}
// ListEventTypesPreparer prepares the ListEventTypes request.
func (client TopicsClient) ListEventTypesPreparer(resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"providerNamespace": autorest.Encode("path", providerNamespace),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"resourceName": autorest.Encode("path", resourceName),
"resourceTypeName": autorest.Encode("path", resourceTypeName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventTypes", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListEventTypesSender sends the ListEventTypes request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) ListEventTypesSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListEventTypesResponder handles the response to the ListEventTypes request. The method always
// closes the http.Response Body.
func (client TopicsClient) ListEventTypesResponder(resp *http.Response) (result EventTypesListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListSharedAccessKeys list the two keys used to publish to a topic
//
// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic
func (client TopicsClient) ListSharedAccessKeys(resourceGroupName string, topicName string) (result TopicSharedAccessKeys, err error) {
req, err := client.ListSharedAccessKeysPreparer(resourceGroupName, topicName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", nil, "Failure preparing request")
return
}
resp, err := client.ListSharedAccessKeysSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", resp, "Failure sending request")
return
}
result, err = client.ListSharedAccessKeysResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", resp, "Failure responding to request")
}
return
}
// ListSharedAccessKeysPreparer prepares the ListSharedAccessKeys request.
func (client TopicsClient) ListSharedAccessKeysPreparer(resourceGroupName string, topicName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"topicName": autorest.Encode("path", topicName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/listKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSharedAccessKeysSender sends the ListSharedAccessKeys request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) ListSharedAccessKeysSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListSharedAccessKeysResponder handles the response to the ListSharedAccessKeys request. The method always
// closes the http.Response Body.
func (client TopicsClient) ListSharedAccessKeysResponder(resp *http.Response) (result TopicSharedAccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// RegenerateKey regenerate a shared access key for a topic
//
// resourceGroupName is the name of the resource group within the user's subscription. topicName is name of the topic
// regenerateKeyRequest is request body to regenerate key
func (client TopicsClient) RegenerateKey(resourceGroupName string, topicName string, regenerateKeyRequest TopicRegenerateKeyRequest) (result TopicSharedAccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: regenerateKeyRequest,
Constraints: []validation.Constraint{{Target: "regenerateKeyRequest.KeyName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "eventgrid.TopicsClient", "RegenerateKey")
}
req, err := client.RegenerateKeyPreparer(resourceGroupName, topicName, regenerateKeyRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", nil, "Failure preparing request")
return
}
resp, err := client.RegenerateKeySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", resp, "Failure sending request")
return
}
result, err = client.RegenerateKeyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "RegenerateKey", resp, "Failure responding to request")
}
return
}
// RegenerateKeyPreparer prepares the RegenerateKey request.
func (client TopicsClient) RegenerateKeyPreparer(resourceGroupName string, topicName string, regenerateKeyRequest TopicRegenerateKeyRequest) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"topicName": autorest.Encode("path", topicName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/regenerateKey", pathParameters),
autorest.WithJSON(regenerateKeyRequest),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// RegenerateKeySender sends the RegenerateKey request. The method will close the
// http.Response Body if it receives an error.
func (client TopicsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// RegenerateKeyResponder handles the response to the RegenerateKey request. The method always
// closes the http.Response Body.
func (client TopicsClient) RegenerateKeyResponder(resp *http.Response) (result TopicSharedAccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

View file

@ -0,0 +1,222 @@
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// TopicTypesClient is the azure EventGrid Management Client
type TopicTypesClient struct {
ManagementClient
}
// NewTopicTypesClient creates an instance of the TopicTypesClient client.
func NewTopicTypesClient(subscriptionID string) TopicTypesClient {
return NewTopicTypesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewTopicTypesClientWithBaseURI creates an instance of the TopicTypesClient client.
func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) TopicTypesClient {
return TopicTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Get get information about a topic type
//
// topicTypeName is name of the topic type
func (client TopicTypesClient) Get(topicTypeName string) (result TopicTypeInfo, err error) {
req, err := client.GetPreparer(topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", resp, "Failure responding to request")
}
return
}
// GetPreparer prepares the Get request.
func (client TopicTypesClient) GetPreparer(topicTypeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"topicTypeName": autorest.Encode("path", topicTypeName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client TopicTypesClient) GetSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client TopicTypesClient) GetResponder(resp *http.Response) (result TopicTypeInfo, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// List list all registered topic types
func (client TopicTypesClient) List() (result TopicTypesListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client TopicTypesClient) ListPreparer() (*http.Request, error) {
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/providers/Microsoft.EventGrid/topicTypes"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListSender sends the List request. The method will close the
// http.Response Body if it receives an error.
func (client TopicTypesClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client TopicTypesClient) ListResponder(resp *http.Response) (result TopicTypesListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListEventTypes list event types for a topic type
//
// topicTypeName is name of the topic type
func (client TopicTypesClient) ListEventTypes(topicTypeName string) (result EventTypesListResult, err error) {
req, err := client.ListEventTypesPreparer(topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", nil, "Failure preparing request")
return
}
resp, err := client.ListEventTypesSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", resp, "Failure sending request")
return
}
result, err = client.ListEventTypesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", resp, "Failure responding to request")
}
return
}
// ListEventTypesPreparer prepares the ListEventTypes request.
func (client TopicTypesClient) ListEventTypesPreparer(topicTypeName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"topicTypeName": autorest.Encode("path", topicTypeName),
}
const APIVersion = "2017-06-15-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventTypes", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
// ListEventTypesSender sends the ListEventTypes request. The method will close the
// http.Response Body if it receives an error.
func (client TopicTypesClient) ListEventTypesSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req)
}
// ListEventTypesResponder handles the response to the ListEventTypes request. The method always
// closes the http.Response Body.
func (client TopicTypesClient) ListEventTypesResponder(resp *http.Response) (result EventTypesListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}

View file

@ -0,0 +1,28 @@
package eventgrid
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.3.1-beta arm-eventgrid/2017-06-15-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package eventhub
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-eventhub/2015-08-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-eventhub/2017-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package graphrbac
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-graphrbac/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-graphrbac/1.6"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package hdinsight
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-hdinsight/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-hdinsight/2015-03-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package intune
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-intune/2015-01-14-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-intune/2015-01-14-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package iothub
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-iothub/2016-02-03"
return "Azure-SDK-For-Go/v10.3.1-beta arm-iothub/2017-07-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package keyvault
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-keyvault/2015-06-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package logic
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-logic/2016-06-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-logic/2016-06-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package commitmentplans
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-commitmentplans/2016-05-01-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-commitmentplans/2016-05-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package webservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-webservices/2017-01-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-webservices/2017-01-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package mediaservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-mediaservices/2015-10-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-mediaservices/2015-10-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package mobileengagement
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-mobileengagement/2014-12-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-mobileengagement/2014-12-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package monitor
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-monitor/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-monitor/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package mysql
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-mysql/2017-04-30-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-mysql/2017-04-30-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package network
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-network/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-network/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package notificationhubs
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-notificationhubs/2017-04-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-notificationhubs/2017-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package postgresql
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-postgresql/2017-04-30-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-postgresql/2017-04-30-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package powerbiembedded
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-powerbiembedded/2016-01-29"
return "Azure-SDK-For-Go/v10.3.1-beta arm-powerbiembedded/2016-01-29"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package recoveryservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservices/2016-06-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservices/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package recoveryservicesbackup
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservicesbackup/2016-12-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicesbackup/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package recoveryservicessiterecovery
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-recoveryservicessiterecovery/2016-08-10"
return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicessiterecovery/2016-08-10"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package redis
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-redis/2016-04-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-redis/2017-02-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package relay
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-relay/2016-07-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-relay/2017-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package resourcehealth
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-resourcehealth/2015-01-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-resourcehealth/2017-07-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package features
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-features/2015-12-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-features/2015-12-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package links
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-links/2016-09-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-links/2016-09-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package locks
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-locks/2016-09-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-locks/2016-09-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package managedapplications
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-managedapplications/2016-09-01-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-managedapplications/2016-09-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package policy
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-policy/2016-12-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-policy/2016-12-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package resources
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-resources/2016-09-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-resources/2017-05-10"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package subscriptions
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-subscriptions/2016-06-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-subscriptions/2016-06-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package scheduler
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-scheduler/2016-03-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-scheduler/2016-03-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package search
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-search/2015-08-19"
return "Azure-SDK-For-Go/v10.3.1-beta arm-search/2015-08-19"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package servermanagement
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-servermanagement/2016-07-01-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-servermanagement/2016-07-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package servicemap
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-servicemap/2015-11-01-preview"
return "Azure-SDK-For-Go/v10.3.1-beta arm-servicemap/2015-11-01-preview"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package servicebus
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-servicebus/2015-08-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-servicebus/2017-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package servicefabric
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-servicefabric/2016-09-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-servicefabric/2016-09-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,16 +14,15 @@ package sql
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-sql/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-sql/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package storage
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-storage/2016-12-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-storage/2017-06-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package storageimportexport
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-storageimportexport/2016-11-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-storageimportexport/2016-11-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package storsimple8000series
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-storsimple8000series/2017-06-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-storsimple8000series/2017-06-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package streamanalytics
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-streamanalytics/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-streamanalytics/2016-03-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package trafficmanager
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-trafficmanager/2015-11-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-trafficmanager/2017-05-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package web
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-web/"
return "Azure-SDK-For-Go/v10.3.1-beta arm-web/"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -1,36 +0,0 @@
# This script tries to build Terraform related packages,
# and find possible breaking changes regarding the Azure
# SDK for Go
set -x
# This should only run on cronjobs
if [ "cron" != $TRAVIS_EVENT_TYPE ]; then
exit 0
fi
# Only meant to run on latest go version
if [ "go version go1.8 linux/amd64" != "$(go version)" ]; then
exit 0
fi
go get github.com/kardianos/govendor
REALEXITSTATUS=0
packages=(github.com/hashicorp/terraform
github.com/terraform-providers/terraform-provider-azurerm
github.com/terraform-providers/terraform-provider-azure)
for package in ${packages[*]}; do
go get $package
cd $GOPATH/src/$package
# update to latest SDK
govendor update github.com/Azure/azure-sdk-for-go/...
# try to build
make
REALEXITSTATUS=$(($REALEXITSTATUS+$?))
done
exit $REALEXITSTATUS

View file

@ -14,15 +14,15 @@ package filesystem
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-filesystem/2016-11-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-filesystem/2016-11-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -14,15 +14,15 @@ package keyvault
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.2.0-beta arm-keyvault/2016-10-01"
return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.2.0-beta"
return "v10.3.1-beta"
}

View file

@ -1,8 +1,8 @@
hash: bdeb606eca05304f80e5577159227ae4f00a002213f353e304066c593419a31b
updated: 2017-07-31T15:32:36.5529621-07:00
hash: f52476dff67b66fe9fffe35b63ac0c06962fcaacd326b66820a33edf53b01a16
updated: 2017-09-01T13:52:16.3705168-07:00
imports:
- name: github.com/Azure/go-autorest
version: f6e08fe5e4d45c9a66e40196d3fed5f37331d224
version: 48a8154950f853ae1f2a9c409e0eb1fb71119bc8
subpackages:
- autorest
- autorest/adal
@ -30,6 +30,8 @@ imports:
version: 4748e29d5718c2df4028a6543edf86fd8cc0f881
- name: github.com/nozzle/throttler
version: d9b45f19996c645d38c9266d1f5cf1990e930119
- name: github.com/satori/go.uuid
version: 879c5887cd475cd7864858769793b2ceb0d44feb
- name: github.com/satori/uuid
version: 5bf94b69c6b68ee1b541973bb8e1144db23a194b
- name: github.com/shopspring/decimal

View file

@ -1,7 +1,7 @@
package: github.com/Azure/azure-sdk-for-go
import:
- package: github.com/Azure/go-autorest
version: ~8.1.1
version: ~8.2.0
subpackages:
- /autorest
- autorest/azure

View file

@ -1,6 +1,8 @@
# Azure Service Management packages for Go
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.
Note that this package requires Go 1.7+ to build.
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.
## First a Sidenote: Authentication and the Azure Service Manager

View file

@ -1,3 +1,5 @@
// +build go1.7
package affinitygroup
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
package affinitygroup
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package management provides the main API client to construct other clients
// and make requests to the Microsoft Azure Service Management REST API.
package management

View file

@ -1,3 +1,5 @@
// +build go1.7
package management
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
package management_test
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package hostedservice provides a client for Hosted Services.
package hostedservice

View file

@ -1,3 +1,5 @@
// +build go1.7
package hostedservice
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
package management
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package location provides a client for Locations.
package location

View file

@ -1,3 +1,5 @@
// +build go1.7
package location
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package networksecuritygroup provides a client for Network Security Groups.
package networksecuritygroup

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package networksecuritygroup implements operations for managing network security groups
// using the Service Management REST API
//

View file

@ -1,3 +1,5 @@
// +build go1.7
package management
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
// Package osimage provides a client for Operating System Images.
package osimage

View file

@ -1,3 +1,5 @@
// +build go1.7
package osimage
import (

View file

@ -1,3 +1,5 @@
// +build go1.7
package management
import (

Some files were not shown because too many files have changed in this diff Show more