forked from TrueCloudLab/restic
Update vendored dependencies
This includes github.com/kurin/blazer 0.2.0, which resolves #1291
This commit is contained in:
parent
ba23d24dd1
commit
61cb1cc6f8
1044 changed files with 203022 additions and 97709 deletions
2
vendor/github.com/Azure/azure-sdk-for-go/.travis.yml
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/.travis.yml
generated
vendored
|
@ -1,7 +1,6 @@
|
|||
sudo: false
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.8
|
||||
- 1.9
|
||||
|
@ -16,6 +15,7 @@ install:
|
|||
|
||||
script:
|
||||
- bash rungas.sh
|
||||
- grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee /dev/stderr | test -z "$(< /dev/stdin)"
|
||||
- test -z "$(gofmt -s -l $(find ./arm/* -type d -print) | tee /dev/stderr)"
|
||||
- test -z "$(gofmt -s -l -w management | tee /dev/stderr)"
|
||||
- test -z "$(gofmt -s -l -w storage | tee /dev/stderr)"
|
||||
|
|
49
vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md
generated
vendored
49
vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md
generated
vendored
|
@ -1,5 +1,52 @@
|
|||
# CHANGELOG
|
||||
|
||||
## `v11.0.0-beta`
|
||||
|
||||
### ARM
|
||||
|
||||
| api | version | note |
|
||||
|:------------------------------------|:-------------------|:------------------------------------|
|
||||
| arm/analysisservices | 2017-08-01-beta | update |
|
||||
| arm/batch | 2017-05-01 | update |
|
||||
| arm/cdn | 2017-04-02 | update |
|
||||
| arm/cognitiveservices | 2017-04-18 | update |
|
||||
| arm/compute | multiple | update |
|
||||
| arm/containerregistry | 2017-10-01 | update |
|
||||
| arm/customerinsights | 2017-04-26 | update |
|
||||
| arm/eventgrid | 2017-09-15-preview | update |
|
||||
| arm/eventhub | 2017-04-01 | update |
|
||||
| arm/graphrbac | 1.6 | update |
|
||||
| arm/iothub | 2017-07-01 | update |
|
||||
| arm/keyvault | 2016-10-01 | update |
|
||||
| arm/marketplaceordering | 2015-06-01 | new |
|
||||
| arm/opertionalinsights | multiple | update |
|
||||
| arm/operationsmanagement | 2015-11-01-preview | new |
|
||||
| arm/recoveryservices | multiple | update |
|
||||
| arm/recoveryservicesbackup | multiple | update |
|
||||
| arm/redis | 2017-02-01 | update |
|
||||
| arm/relay | 2017-04-01 | update |
|
||||
| arm/resourcehealth | 017-07-01 | update |
|
||||
| arm/resources/resources | 2017-05-10 | update |
|
||||
| arm/servicebus | 2017-04-01 | update |
|
||||
| arm/storage | 2017-06-01 | update |
|
||||
| arm/streamanalytics | 2016-03-01 | update |
|
||||
| arm/trafficmanager | 2017-09-01-preview | update |
|
||||
| arm/visualstudio | 2014-04-01-preview | update |
|
||||
|
||||
### Data plane
|
||||
|
||||
| dataplane/cognitiveservices/face | 1.0 | new |
|
||||
| dataplane/cognitiveservices/textanalytics | v2.0 | new |
|
||||
|
||||
### Storage
|
||||
|
||||
- Support for queue SAS.
|
||||
- Refactored GetSASURI blob operation to be more complete.
|
||||
- Added a SAS client for some operations (`container.Exists()`, and `container.ListBlobs()`)
|
||||
|
||||
- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: 0c2a12b50d8598f68d6715b507f7dd53e163407e
|
||||
- [AutoRest Go Generator](https://github.com/Azure/autorest.go) commit: 678110f012c7cde6528a1e61d125bdc7ea636b7f
|
||||
|
||||
## `v10.3.1-beta`
|
||||
- Added Apache notice file.
|
||||
|
||||
|
@ -54,8 +101,6 @@
|
|||
## `v10.1.0-beta`
|
||||
### ARM
|
||||
|
||||
| api | version | note |
|
||||
|:------------------------------------|:-------------------|:------------------------------------|
|
||||
| arm/recoveryservicessiterecovery | 2016-08-10 | new |
|
||||
| arm/managedapplications | 2016-09-01-preview | new |
|
||||
| arm/storsimple8000series | 2017-06-01 | new |
|
||||
|
|
187
vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go
generated
vendored
187
vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go
generated
vendored
|
@ -1,5 +1,19 @@
|
|||
package main
|
||||
|
||||
// Copyright 2017 Microsoft Corporation
|
||||
//
|
||||
// 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.
|
||||
|
||||
// To run this package...
|
||||
// go run gen.go -- --sdk 3.14.16
|
||||
|
||||
|
@ -11,6 +25,8 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
do "gopkg.in/godo.v2"
|
||||
)
|
||||
|
@ -35,13 +51,21 @@ type mapping struct {
|
|||
Services []service
|
||||
}
|
||||
|
||||
type failList []string
|
||||
|
||||
type failLocker struct {
|
||||
sync.Mutex
|
||||
failList
|
||||
}
|
||||
|
||||
var (
|
||||
start time.Time
|
||||
gopath = os.Getenv("GOPATH")
|
||||
sdkVersion string
|
||||
autorestDir string
|
||||
swaggersDir string
|
||||
testGen bool
|
||||
deps do.S
|
||||
deps do.P
|
||||
services = []*service{}
|
||||
servicesMapping = []mapping{
|
||||
{
|
||||
|
@ -51,24 +75,36 @@ var (
|
|||
{Name: "advisor"},
|
||||
{Name: "analysisservices"},
|
||||
// {
|
||||
// Autorest Bug
|
||||
// Name: "apimanagement",
|
||||
// Autorest Bug, duplicate files
|
||||
// Name: "apimanagement",
|
||||
// },
|
||||
{Name: "appinsights"},
|
||||
{Name: "authorization"},
|
||||
{Name: "automation"},
|
||||
// {
|
||||
// Name: "commerce",
|
||||
// Input: "azsadmin/resource-manager/commerce",
|
||||
// Output: "azsadmin/commerce",
|
||||
// },
|
||||
// {
|
||||
// Name: "fabric",
|
||||
// Input: "azsadmin/resource-manager/fabric",
|
||||
// Output: "azsadmin/fabric",
|
||||
// },
|
||||
// {
|
||||
// Name: "infrastructureinsights",
|
||||
// Input: "azsadmin/resource-manager/InfrastructureInsights",
|
||||
// Output: "azsadmin/infrastructureinsights",
|
||||
// },
|
||||
{Name: "batch"},
|
||||
{Name: "billing"},
|
||||
{Name: "cdn"},
|
||||
// {
|
||||
// bug in AutoRest (duplicated files)
|
||||
// Name: "cognitiveservices",
|
||||
// },
|
||||
{Name: "cognitiveservices"},
|
||||
{Name: "commerce"},
|
||||
{Name: "compute"},
|
||||
{
|
||||
Name: "containerservice",
|
||||
Input: "compute",
|
||||
Input: "compute/resource-manager",
|
||||
Tag: "package-container-service-2017-01",
|
||||
},
|
||||
{Name: "consumption"},
|
||||
|
@ -78,12 +114,12 @@ var (
|
|||
{Name: "customer-insights"},
|
||||
{
|
||||
Name: "account",
|
||||
Input: "datalake-analytics",
|
||||
Input: "datalake-analytics/resource-manager",
|
||||
Output: "datalake-analytics/account",
|
||||
},
|
||||
{
|
||||
Name: "account",
|
||||
Input: "datalake-store",
|
||||
Input: "datalake-store/resource-manager",
|
||||
Output: "datalake-store/account",
|
||||
},
|
||||
{Name: "devtestlabs"},
|
||||
|
@ -97,73 +133,75 @@ var (
|
|||
{Name: "logic"},
|
||||
{
|
||||
Name: "commitmentplans",
|
||||
Input: "machinelearning",
|
||||
Output: "machinelearning/commitmentPlans",
|
||||
Input: "machinelearning/resource-manager",
|
||||
Output: "machinelearning/commitmentplans",
|
||||
Tag: "package-commitmentPlans-2016-05-preview",
|
||||
},
|
||||
{
|
||||
Name: "webservices",
|
||||
Input: "machinelearning",
|
||||
Input: "machinelearning/resource-manager",
|
||||
Output: "machinelearning/webservices",
|
||||
Tag: "package-webservices-2017-01",
|
||||
},
|
||||
{Name: "marketplaceordering"},
|
||||
{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: "operationalinsights"},
|
||||
{Name: "operationsmanagement"},
|
||||
{Name: "postgresql"},
|
||||
{Name: "powerbiembedded"},
|
||||
{Name: "recoveryservices"},
|
||||
{Name: "recoveryservicesbackup"},
|
||||
{Name: "recoveryservicessiterecovery"},
|
||||
{Name: "redis"},
|
||||
{
|
||||
Name: "redis",
|
||||
Tag: "package-2016-04",
|
||||
},
|
||||
{Name: "relay"},
|
||||
{Name: "resourcehealth"},
|
||||
{
|
||||
Name: "features",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/features",
|
||||
Tag: "package-features-2015-12",
|
||||
},
|
||||
{
|
||||
Name: "links",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/links",
|
||||
Tag: "package-links-2016-09",
|
||||
},
|
||||
{
|
||||
Name: "locks",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/locks",
|
||||
Tag: "package-locks-2016-09",
|
||||
},
|
||||
{
|
||||
Name: "managedapplications",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/managedapplications",
|
||||
Tag: "package-managedapplications-2016-09",
|
||||
},
|
||||
{
|
||||
Name: "policy",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/policy",
|
||||
Tag: "package-policy-2016-12",
|
||||
},
|
||||
{
|
||||
Name: "resources",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/resources",
|
||||
Tag: "package-resources-2017-05",
|
||||
},
|
||||
{
|
||||
Name: "subscriptions",
|
||||
Input: "resources",
|
||||
Input: "resources/resource-manager",
|
||||
Output: "resources/subscriptions",
|
||||
Tag: "package-subscriptions-2016-06",
|
||||
},
|
||||
|
@ -180,7 +218,8 @@ var (
|
|||
{Name: "streamanalytics"},
|
||||
// {
|
||||
// error in the modeler
|
||||
// Name: "timeseriesinsights",
|
||||
// https://github.com/Azure/autorest/issues/2579
|
||||
// Name: "timeseriesinsights",
|
||||
// },
|
||||
{Name: "trafficmanager"},
|
||||
{Name: "visualstudio"},
|
||||
|
@ -191,8 +230,16 @@ var (
|
|||
PlaneOutput: "dataplane",
|
||||
PlaneInput: "data-plane",
|
||||
Services: []service{
|
||||
{Name: "keyvault"},
|
||||
{
|
||||
Name: "keyvault",
|
||||
Name: "face",
|
||||
Input: "cognitiveservices/data-plane/Face",
|
||||
Output: "cognitiveservices/face",
|
||||
},
|
||||
{
|
||||
Name: "textanalytics",
|
||||
Input: "cognitiveservices/data-plane/TextAnalytics",
|
||||
Output: "cognitiveservices/textanalytics",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -201,7 +248,7 @@ var (
|
|||
Services: []service{
|
||||
{
|
||||
Name: "filesystem",
|
||||
Input: "datalake-store",
|
||||
Input: "datalake-store/data-plane",
|
||||
Output: "datalake-store/filesystem",
|
||||
},
|
||||
},
|
||||
|
@ -210,15 +257,15 @@ var (
|
|||
PlaneOutput: "arm",
|
||||
PlaneInput: "data-plane",
|
||||
Services: []service{
|
||||
{
|
||||
Name: "graphrbac",
|
||||
},
|
||||
{Name: "graphrbac"},
|
||||
},
|
||||
},
|
||||
}
|
||||
fails = failLocker{}
|
||||
)
|
||||
|
||||
func main() {
|
||||
func init() {
|
||||
start = time.Now()
|
||||
for _, swaggerGroup := range servicesMapping {
|
||||
swg := swaggerGroup
|
||||
for _, service := range swg.Services {
|
||||
|
@ -226,6 +273,9 @@ func main() {
|
|||
initAndAddService(&s, swg.PlaneInput, swg.PlaneOutput)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
do.Godo(tasks)
|
||||
}
|
||||
|
||||
|
@ -233,7 +283,13 @@ func initAndAddService(service *service, planeInput, planeOutput string) {
|
|||
if service.Input == "" {
|
||||
service.Input = service.Name
|
||||
}
|
||||
service.Input = filepath.Join(service.Input, planeInput, "readme.md")
|
||||
path := []string{service.Input}
|
||||
if service.Input == service.Name {
|
||||
path = append(path, planeInput)
|
||||
}
|
||||
path = append(path, "readme.md")
|
||||
service.Input = filepath.Join(path...)
|
||||
|
||||
if service.Output == "" {
|
||||
service.Output = service.Name
|
||||
}
|
||||
|
@ -247,7 +303,7 @@ func initAndAddService(service *service, planeInput, planeOutput string) {
|
|||
}
|
||||
|
||||
func tasks(p *do.Project) {
|
||||
p.Task("default", do.S{"setvars", "generate:all", "management"}, nil)
|
||||
p.Task("default", do.S{"setvars", "generate:all", "management", "report"}, nil)
|
||||
p.Task("setvars", nil, setVars)
|
||||
p.Use("generate", generateTasks)
|
||||
p.Use("gofmt", formatTasks)
|
||||
|
@ -256,6 +312,7 @@ func tasks(p *do.Project) {
|
|||
p.Use("govet", vetTasks)
|
||||
p.Task("management", do.S{"setvars"}, managementVersion)
|
||||
p.Task("addVersion", nil, addVersion)
|
||||
p.Task("report", nil, report)
|
||||
}
|
||||
|
||||
func setVars(c *do.Context) {
|
||||
|
@ -294,7 +351,7 @@ func generate(service *service) {
|
|||
commandArgs := []string{
|
||||
fullInput,
|
||||
codegen,
|
||||
"--license-header=MICROSOFT_APACHE",
|
||||
"--license-header=MICROSOFT_APACHE_NO_VERSION",
|
||||
fmt.Sprintf("--namespace=%s", service.Name),
|
||||
fmt.Sprintf("--output-folder=%s", service.Output),
|
||||
fmt.Sprintf("--package-version=%s", sdkVersion),
|
||||
|
@ -318,8 +375,8 @@ func generate(service *service) {
|
|||
|
||||
fmt.Println(commandArgs)
|
||||
|
||||
if _, err := runner(autorest); err != nil {
|
||||
panic(fmt.Errorf("Autorest error: %s", err))
|
||||
if _, stderr, err := runner(autorest); err != nil {
|
||||
fails.Add(fmt.Sprintf("%s: autorest error: %s: %s", service.Fullname, err, stderr))
|
||||
}
|
||||
|
||||
format(service)
|
||||
|
@ -335,9 +392,9 @@ func formatTasks(p *do.Project) {
|
|||
func format(service *service) {
|
||||
fmt.Printf("Formatting %s...\n\n", service.Fullname)
|
||||
gofmt := exec.Command("gofmt", "-w", service.Output)
|
||||
_, err := runner(gofmt)
|
||||
_, stderr, err := runner(gofmt)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("gofmt error: %s", err))
|
||||
fails.Add(fmt.Sprintf("%s: gofmt error:%s: %s", service.Fullname, err, stderr))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,9 +405,9 @@ func buildTasks(p *do.Project) {
|
|||
func build(service *service) {
|
||||
fmt.Printf("Building %s...\n\n", service.Fullname)
|
||||
gobuild := exec.Command("go", "build", service.Namespace)
|
||||
_, err := runner(gobuild)
|
||||
_, stderr, err := runner(gobuild)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("go build error: %s", err))
|
||||
fails.Add(fmt.Sprintf("%s: build error: %s: %s", service.Fullname, err, stderr))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,9 +418,9 @@ func lintTasks(p *do.Project) {
|
|||
func lint(service *service) {
|
||||
fmt.Printf("Linting %s...\n\n", service.Fullname)
|
||||
golint := exec.Command(filepath.Join(gopath, "bin", "golint"), service.Namespace)
|
||||
_, err := runner(golint)
|
||||
_, stderr, err := runner(golint)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("golint error: %s", err))
|
||||
fails.Add(fmt.Sprintf("%s: golint error: %s: %s", service.Fullname, err, stderr))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,15 +431,15 @@ func vetTasks(p *do.Project) {
|
|||
func vet(service *service) {
|
||||
fmt.Printf("Vetting %s...\n\n", service.Fullname)
|
||||
govet := exec.Command("go", "vet", service.Namespace)
|
||||
_, err := runner(govet)
|
||||
_, stderr, err := runner(govet)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("go vet error: %s", err))
|
||||
fails.Add(fmt.Sprintf("%s: go vet error: %s: %s", service.Fullname, err, stderr))
|
||||
}
|
||||
}
|
||||
|
||||
func addVersion(c *do.Context) {
|
||||
gitStatus := exec.Command("git", "status", "-s")
|
||||
out, err := runner(gitStatus)
|
||||
out, _, err := runner(gitStatus)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("Git error: %s", err))
|
||||
}
|
||||
|
@ -391,7 +448,7 @@ func addVersion(c *do.Context) {
|
|||
for _, f := range files {
|
||||
if strings.HasPrefix(f, " M ") && strings.HasSuffix(f, "version.go") {
|
||||
gitAdd := exec.Command("git", "add", f[3:])
|
||||
_, err := runner(gitAdd)
|
||||
_, _, err := runner(gitAdd)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("Git error: %s", err))
|
||||
}
|
||||
|
@ -406,10 +463,24 @@ func managementVersion(c *do.Context) {
|
|||
func version(packageName string) {
|
||||
versionFile := filepath.Join(packageName, "version.go")
|
||||
os.Remove(versionFile)
|
||||
template := `// +build go1.7
|
||||
|
||||
template := `// +build go1.7
|
||||
|
||||
package %s
|
||||
|
||||
// Copyright 2017 Microsoft Corporation
|
||||
//
|
||||
// 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.
|
||||
|
||||
var (
|
||||
sdkVersion = "%s"
|
||||
)
|
||||
|
@ -428,7 +499,7 @@ func addTasks(fn func(*service), p *do.Project) {
|
|||
p.Task("all", deps, nil)
|
||||
}
|
||||
|
||||
func runner(cmd *exec.Cmd) (string, error) {
|
||||
func runner(cmd *exec.Cmd) (string, string, error) {
|
||||
var stdout, stderr bytes.Buffer
|
||||
cmd.Stdout, cmd.Stderr = &stdout, &stderr
|
||||
err := cmd.Run()
|
||||
|
@ -438,5 +509,19 @@ func runner(cmd *exec.Cmd) (string, error) {
|
|||
if stderr.Len() > 0 {
|
||||
fmt.Println(stderr.String())
|
||||
}
|
||||
return stdout.String(), err
|
||||
return stdout.String(), stderr.String(), err
|
||||
}
|
||||
|
||||
func (fl *failLocker) Add(fail string) {
|
||||
fl.Lock()
|
||||
defer fl.Unlock()
|
||||
fl.failList = append(fl.failList, fail)
|
||||
}
|
||||
|
||||
func report(c *do.Context) {
|
||||
fmt.Printf("Script ran for %s\n", time.Since(start))
|
||||
for _, f := range fails.failList {
|
||||
fmt.Println(f)
|
||||
fmt.Println("==========")
|
||||
}
|
||||
}
|
||||
|
|
8
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go
generated
vendored
|
@ -1,5 +1,4 @@
|
|||
// Package advisor implements the Azure ARM Advisor service API version
|
||||
// 2017-04-19.
|
||||
// Package advisor implements the Azure ARM Advisor service API version 2017-04-19.
|
||||
//
|
||||
// REST APIs for Azure Advisor
|
||||
package advisor
|
||||
|
@ -18,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
11
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go
generated
vendored
11
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go
generated
vendored
|
@ -14,15 +14,14 @@ 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.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.
|
||||
// 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"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -152,8 +151,8 @@ type ShortDescription struct {
|
|||
Solution *string `json:"solution,omitempty"`
|
||||
}
|
||||
|
||||
// SuppressionContract is the details of the snoozed or dismissed rule; for
|
||||
// example, the duration, name, and GUID associated with the rule.
|
||||
// SuppressionContract is the details of the snoozed or dismissed rule; for example, the duration, name, and GUID
|
||||
// associated with the rule.
|
||||
type SuppressionContract struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
|
55
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go
generated
vendored
55
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,7 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the rEST APIs for Azure Advisor
|
||||
// OperationsClient is the REST APIs for Azure Advisor
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
|||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationEntityListRe
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error) {
|
||||
resultChan := make(chan OperationEntity)
|
||||
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
|
||||
}
|
||||
|
|
91
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go
generated
vendored
91
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go
generated
vendored
|
@ -14,37 +14,33 @@ 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.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.
|
||||
// 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/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RecommendationsClient is the rEST APIs for Azure Advisor
|
||||
// RecommendationsClient is the REST APIs for Azure Advisor
|
||||
type RecommendationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewRecommendationsClient creates an instance of the RecommendationsClient
|
||||
// client.
|
||||
// NewRecommendationsClient creates an instance of the RecommendationsClient client.
|
||||
func NewRecommendationsClient(subscriptionID string) RecommendationsClient {
|
||||
return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRecommendationsClientWithBaseURI creates an instance of the
|
||||
// RecommendationsClient client.
|
||||
// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client.
|
||||
func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient {
|
||||
return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Generate initiates the recommendation generation or computation process for
|
||||
// a subscription. This operation is asynchronous. The generated
|
||||
// recommendations are stored in a cache in the Advisor service.
|
||||
// Generate initiates the recommendation generation or computation process for a subscription. This operation is
|
||||
// asynchronous. The generated recommendations are stored in a cache in the Advisor service.
|
||||
func (client RecommendationsClient) Generate() (result autorest.Response, err error) {
|
||||
req, err := client.GeneratePreparer()
|
||||
if err != nil {
|
||||
|
@ -106,9 +102,8 @@ func (client RecommendationsClient) GenerateResponder(resp *http.Response) (resu
|
|||
|
||||
// Get obtains details of a cached recommendation.
|
||||
//
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the
|
||||
// resource to which the recommendation applies. recommendationID is the
|
||||
// recommendation ID.
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation
|
||||
// applies. recommendationID is the recommendation ID.
|
||||
func (client RecommendationsClient) Get(resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error) {
|
||||
req, err := client.GetPreparer(resourceURI, recommendationID)
|
||||
if err != nil {
|
||||
|
@ -170,13 +165,12 @@ func (client RecommendationsClient) GetResponder(resp *http.Response) (result Re
|
|||
return
|
||||
}
|
||||
|
||||
// GetGenerateStatus retrieves the status of the recommendation computation or
|
||||
// generation process. Invoke this API after calling the generation
|
||||
// recommendation. The URI of this API is returned in the Location field of the
|
||||
// response header.
|
||||
// GetGenerateStatus retrieves the status of the recommendation computation or generation process. Invoke this API
|
||||
// after calling the generation recommendation. The URI of this API is returned in the Location field of the response
|
||||
// header.
|
||||
//
|
||||
// operationID is the operation ID, which can be found from the Location field
|
||||
// in the generate recommendation response header.
|
||||
// operationID is the operation ID, which can be found from the Location field in the generate recommendation response
|
||||
// header.
|
||||
func (client RecommendationsClient) GetGenerateStatus(operationID uuid.UUID) (result autorest.Response, err error) {
|
||||
req, err := client.GetGenerateStatusPreparer(operationID)
|
||||
if err != nil {
|
||||
|
@ -237,13 +231,11 @@ func (client RecommendationsClient) GetGenerateStatusResponder(resp *http.Respon
|
|||
return
|
||||
}
|
||||
|
||||
// List obtains cached recommendations for a subscription. The recommendations
|
||||
// are generated or computed by invoking generateRecommendations.
|
||||
// List obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking
|
||||
// generateRecommendations.
|
||||
//
|
||||
// filter is the filter to apply to the recommendations. top is the number of
|
||||
// recommendations per page if a paged version of this API is being used.
|
||||
// skipToken is the page-continuation token to use with a paged version of this
|
||||
// API.
|
||||
// filter is the filter to apply to the recommendations. top is the number of recommendations per page if a paged
|
||||
// version of this API is being used. skipToken is the page-continuation token to use with a paged version of this API.
|
||||
func (client RecommendationsClient) List(filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResult, err error) {
|
||||
req, err := client.ListPreparer(filter, top, skipToken)
|
||||
if err != nil {
|
||||
|
@ -336,3 +328,48 @@ func (client RecommendationsClient) ListNextResults(lastResults ResourceRecommen
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client RecommendationsClient) ListComplete(filter string, top *int32, skipToken string, cancel <-chan struct{}) (<-chan ResourceRecommendationBase, <-chan error) {
|
||||
resultChan := make(chan ResourceRecommendationBase)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter, top, skipToken)
|
||||
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
|
||||
}
|
||||
|
|
92
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go
generated
vendored
92
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,7 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// SuppressionsClient is the rEST APIs for Azure Advisor
|
||||
// SuppressionsClient is the REST APIs for Azure Advisor
|
||||
type SuppressionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -34,20 +33,17 @@ func NewSuppressionsClient(subscriptionID string) SuppressionsClient {
|
|||
return NewSuppressionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewSuppressionsClientWithBaseURI creates an instance of the
|
||||
// SuppressionsClient client.
|
||||
// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client.
|
||||
func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient {
|
||||
return SuppressionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create enables the snoozed or dismissed attribute of a recommendation. The
|
||||
// snoozed or dismissed attribute is referred to as a suppression. Use this API
|
||||
// to create or update the snoozed or dismissed status of a recommendation.
|
||||
// Create enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is
|
||||
// referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.
|
||||
//
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the
|
||||
// resource to which the recommendation applies. recommendationID is the
|
||||
// recommendation ID. name is the name of the suppression. suppressionContract
|
||||
// is the snoozed or dismissed attribute; for example, the snooze duration.
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation
|
||||
// applies. recommendationID is the recommendation ID. name is the name of the suppression. suppressionContract is the
|
||||
// snoozed or dismissed attribute; for example, the snooze duration.
|
||||
func (client SuppressionsClient) Create(resourceURI string, recommendationID string, name string, suppressionContract SuppressionContract) (result SuppressionContract, err error) {
|
||||
req, err := client.CreatePreparer(resourceURI, recommendationID, name, suppressionContract)
|
||||
if err != nil {
|
||||
|
@ -112,13 +108,11 @@ func (client SuppressionsClient) CreateResponder(resp *http.Response) (result Su
|
|||
return
|
||||
}
|
||||
|
||||
// Delete enables the activation of a snoozed or dismissed recommendation. The
|
||||
// snoozed or dismissed attribute of a recommendation is referred to as a
|
||||
// suppression.
|
||||
// Delete enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a
|
||||
// recommendation is referred to as a suppression.
|
||||
//
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the
|
||||
// resource to which the recommendation applies. recommendationID is the
|
||||
// recommendation ID. name is the name of the suppression.
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation
|
||||
// applies. recommendationID is the recommendation ID. name is the name of the suppression.
|
||||
func (client SuppressionsClient) Delete(resourceURI string, recommendationID string, name string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceURI, recommendationID, name)
|
||||
if err != nil {
|
||||
|
@ -182,9 +176,8 @@ func (client SuppressionsClient) DeleteResponder(resp *http.Response) (result au
|
|||
|
||||
// Get obtains the details of a suppression.
|
||||
//
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the
|
||||
// resource to which the recommendation applies. recommendationID is the
|
||||
// recommendation ID. name is the name of the suppression.
|
||||
// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation
|
||||
// applies. recommendationID is the recommendation ID. name is the name of the suppression.
|
||||
func (client SuppressionsClient) Get(resourceURI string, recommendationID string, name string) (result SuppressionContract, err error) {
|
||||
req, err := client.GetPreparer(resourceURI, recommendationID, name)
|
||||
if err != nil {
|
||||
|
@ -247,13 +240,11 @@ func (client SuppressionsClient) GetResponder(resp *http.Response) (result Suppr
|
|||
return
|
||||
}
|
||||
|
||||
// List retrieves the list of snoozed or dismissed suppressions for a
|
||||
// subscription. The snoozed or dismissed attribute of a recommendation is
|
||||
// referred to as a suppression.
|
||||
// List retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute
|
||||
// of a recommendation is referred to as a suppression.
|
||||
//
|
||||
// top is the number of suppressions per page if a paged version of this API is
|
||||
// being used. skipToken is the page-continuation token to use with a paged
|
||||
// version of this API.
|
||||
// top is the number of suppressions per page if a paged version of this API is being used. skipToken is the
|
||||
// page-continuation token to use with a paged version of this API.
|
||||
func (client SuppressionsClient) List(top *int32, skipToken string) (result SuppressionContractListResult, err error) {
|
||||
req, err := client.ListPreparer(top, skipToken)
|
||||
if err != nil {
|
||||
|
@ -343,3 +334,48 @@ func (client SuppressionsClient) ListNextResults(lastResults SuppressionContract
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client SuppressionsClient) ListComplete(top *int32, skipToken string, cancel <-chan struct{}) (<-chan SuppressionContract, <-chan error) {
|
||||
resultChan := make(chan SuppressionContract)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(top, skipToken)
|
||||
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
|
||||
}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-advisor/2017-04-19"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-advisor/2017-04-19"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
13
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go
generated
vendored
13
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go
generated
vendored
|
@ -1,9 +1,7 @@
|
|||
// Package analysisservices implements the Azure ARM Analysisservices service
|
||||
// API version 2016-05-16.
|
||||
// Package analysisservices implements the Azure ARM Analysisservices service API version 2017-08-01-beta.
|
||||
//
|
||||
// The Azure Analysis Services Web API provides a RESTful set of web services
|
||||
// that enables users to create, retrieve, update, and delete Analysis Services
|
||||
// servers
|
||||
// The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve,
|
||||
// update, and delete Analysis Services servers
|
||||
package analysisservices
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -20,9 +18,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
174
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go
generated
vendored
174
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go
generated
vendored
|
@ -14,12 +14,23 @@ 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.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.
|
||||
// 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/to"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionMode enumerates the values for connection mode.
|
||||
type ConnectionMode string
|
||||
|
||||
const (
|
||||
// All specifies the all state for connection mode.
|
||||
All ConnectionMode = "All"
|
||||
// ReadOnly specifies the read only state for connection mode.
|
||||
ReadOnly ConnectionMode = "ReadOnly"
|
||||
)
|
||||
|
||||
// ProvisioningState enumerates the values for provisioning state.
|
||||
|
@ -52,26 +63,6 @@ const (
|
|||
Updating ProvisioningState = "Updating"
|
||||
)
|
||||
|
||||
// SkuName enumerates the values for sku name.
|
||||
type SkuName string
|
||||
|
||||
const (
|
||||
// B1 specifies the b1 state for sku name.
|
||||
B1 SkuName = "B1"
|
||||
// B2 specifies the b2 state for sku name.
|
||||
B2 SkuName = "B2"
|
||||
// D1 specifies the d1 state for sku name.
|
||||
D1 SkuName = "D1"
|
||||
// S0 specifies the s0 state for sku name.
|
||||
S0 SkuName = "S0"
|
||||
// S1 specifies the s1 state for sku name.
|
||||
S1 SkuName = "S1"
|
||||
// S2 specifies the s2 state for sku name.
|
||||
S2 SkuName = "S2"
|
||||
// S4 specifies the s4 state for sku name.
|
||||
S4 SkuName = "S4"
|
||||
)
|
||||
|
||||
// SkuTier enumerates the values for sku tier.
|
||||
type SkuTier string
|
||||
|
||||
|
@ -114,11 +105,88 @@ const (
|
|||
StateUpdating State = "Updating"
|
||||
)
|
||||
|
||||
// BackupConfiguration is an object that represents backup configurations
|
||||
type BackupConfiguration struct {
|
||||
StorageAccount *string `json:"storageAccount,omitempty"`
|
||||
BlobContainer *string `json:"blobContainer,omitempty"`
|
||||
AccessKey *string `json:"accessKey,omitempty"`
|
||||
// Status enumerates the values for status.
|
||||
type Status string
|
||||
|
||||
const (
|
||||
// Live specifies the live state for status.
|
||||
Live Status = "Live"
|
||||
)
|
||||
|
||||
// ErrorResponse is describes the format of Error response.
|
||||
type ErrorResponse struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayDetails is the gateway details.
|
||||
type GatewayDetails struct {
|
||||
GatewayResourceID *string `json:"gatewayResourceId,omitempty"`
|
||||
GatewayObjectID *string `json:"gatewayObjectId,omitempty"`
|
||||
DmtsClusterURI *string `json:"dmtsClusterUri,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayError is detail of gateway errors.
|
||||
type GatewayError struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayListStatusError is status of gateway is error.
|
||||
type GatewayListStatusError struct {
|
||||
Error *GatewayError `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayListStatusLive is status of gateway is live.
|
||||
type GatewayListStatusLive struct {
|
||||
autorest.Response `json:"-"`
|
||||
Status Status `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// IPv4FirewallRule is the detail of firewall rule.
|
||||
type IPv4FirewallRule struct {
|
||||
FirewallRuleName *string `json:"firewallRuleName,omitempty"`
|
||||
RangeStart *string `json:"rangeStart,omitempty"`
|
||||
RangeEnd *string `json:"rangeEnd,omitempty"`
|
||||
}
|
||||
|
||||
// IPv4FirewallSettings is an array of firewall rules.
|
||||
type IPv4FirewallSettings struct {
|
||||
FirewallRules *[]IPv4FirewallRule `json:"firewallRules,omitempty"`
|
||||
EnablePowerBIService *string `json:"enablePowerBIService,omitempty"`
|
||||
}
|
||||
|
||||
// Operation is a Consumption REST API operation.
|
||||
type Operation struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplay `json:"display,omitempty"`
|
||||
}
|
||||
|
||||
// OperationDisplay is the object that represents the operation.
|
||||
type OperationDisplay struct {
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of listing consumption operations. It contains a list of operations and a URL link to
|
||||
// get the next set of results.
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client OperationListResult) OperationListResultPreparer() (*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)))
|
||||
}
|
||||
|
||||
// Resource is represents an instance of an Analysis Services resource.
|
||||
|
@ -131,11 +199,11 @@ type Resource struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceSku is represents the SKU name and Azure pricing tier for Analysis
|
||||
// Services resource.
|
||||
// ResourceSku is represents the SKU name and Azure pricing tier for Analysis Services resource.
|
||||
type ResourceSku struct {
|
||||
Name SkuName `json:"name,omitempty"`
|
||||
Tier SkuTier `json:"tier,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Tier SkuTier `json:"tier,omitempty"`
|
||||
Capacity *int32 `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// Server is represents an instance of an Analysis Services resource.
|
||||
|
@ -150,25 +218,30 @@ type Server struct {
|
|||
*ServerProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ServerAdministrators is an array of administrator user identities
|
||||
// ServerAdministrators is an array of administrator user identities.
|
||||
type ServerAdministrators struct {
|
||||
Members *[]string `json:"members,omitempty"`
|
||||
}
|
||||
|
||||
// ServerMutableProperties is an object that represents a set of mutable
|
||||
// Analysis Services resource properties.
|
||||
// ServerMutableProperties is an object that represents a set of mutable Analysis Services resource properties.
|
||||
type ServerMutableProperties struct {
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"`
|
||||
GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"`
|
||||
IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"`
|
||||
QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"`
|
||||
}
|
||||
|
||||
// ServerProperties is properties of Analysis Services resource.
|
||||
type ServerProperties struct {
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
|
||||
State State `json:"state,omitempty"`
|
||||
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
|
||||
ServerFullName *string `json:"serverFullName,omitempty"`
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"`
|
||||
GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"`
|
||||
IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"`
|
||||
QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"`
|
||||
State State `json:"state,omitempty"`
|
||||
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
|
||||
ServerFullName *string `json:"serverFullName,omitempty"`
|
||||
}
|
||||
|
||||
// Servers is an array of Analysis Services resources.
|
||||
|
@ -183,3 +256,20 @@ type ServerUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*ServerMutableProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// SkuDetailsForExistingResource is an object that represents SKU details for existing resources.
|
||||
type SkuDetailsForExistingResource struct {
|
||||
Sku *ResourceSku `json:"sku,omitempty"`
|
||||
}
|
||||
|
||||
// SkuEnumerationForExistingResourceResult is an object that represents enumerating SKUs for existing resources.
|
||||
type SkuEnumerationForExistingResourceResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]SkuDetailsForExistingResource `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SkuEnumerationForNewResourceResult is an object that represents enumerating SKUs for new resources.
|
||||
type SkuEnumerationForNewResourceResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ResourceSku `json:"value,omitempty"`
|
||||
}
|
||||
|
|
166
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go
generated
vendored
Normal file
166
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go
generated
vendored
Normal file
|
@ -0,0 +1,166 @@
|
|||
package analysisservices
|
||||
|
||||
// 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.
|
||||
// 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 the Azure Analysis Services Web API provides a RESTful set of web services that enables
|
||||
// users to create, retrieve, update, and delete Analysis Services servers
|
||||
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 lists all of the available consumption REST API operations.
|
||||
func (client OperationsClient) List() (result OperationListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.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, "analysisservices.OperationsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.AnalysisServices/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 OperationListResult, 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 OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
|
||||
req, err := lastResults.OperationListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "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, "analysisservices.OperationsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
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
|
||||
}
|
481
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go
generated
vendored
481
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,9 +24,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ServersClient is the the Azure Analysis Services Web API provides a RESTful
|
||||
// set of web services that enables users to create, retrieve, update, and
|
||||
// delete Analysis Services servers
|
||||
// ServersClient is the the Azure Analysis Services Web API provides a RESTful set of web services that enables users
|
||||
// to create, retrieve, update, and delete Analysis Services servers
|
||||
type ServersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,17 +40,14 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC
|
|||
return ServersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create provisions the specified Analysis Services server based on the
|
||||
// configuration specified in the request. 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.
|
||||
// Create provisions the specified Analysis Services server based on the configuration specified in the request. 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 Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63.
|
||||
// serverParameters is contains the information used to provision the Analysis
|
||||
// Services server.
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63. serverParameters is contains the information used
|
||||
// to provision the Analysis Services server.
|
||||
func (client ServersClient) Create(resourceGroupName string, serverName string, serverParameters Server, cancel <-chan struct{}) (<-chan Server, <-chan error) {
|
||||
resultChan := make(chan Server, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -75,8 +70,10 @@ func (client ServersClient) Create(resourceGroupName string, serverName string,
|
|||
var err error
|
||||
var result Server
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -109,7 +106,7 @@ func (client ServersClient) CreatePreparer(resourceGroupName string, serverName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -145,14 +142,12 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server,
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes the specified Analysis Services server. 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.
|
||||
// Delete deletes the specified Analysis Services server. 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 Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Delete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
|
@ -176,8 +171,10 @@ func (client ServersClient) Delete(resourceGroupName string, serverName string,
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -210,7 +207,7 @@ func (client ServersClient) DeletePreparer(resourceGroupName string, serverName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -243,11 +240,88 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores
|
|||
return
|
||||
}
|
||||
|
||||
// DissociateGateway dissociates a Unified Gateway associated with the server.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) DissociateGateway(resourceGroupName string, serverName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "DissociateGateway")
|
||||
}
|
||||
|
||||
req, err := client.DissociateGatewayPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.DissociateGatewaySender(req)
|
||||
if err != nil {
|
||||
result.Response = resp
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.DissociateGatewayResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// DissociateGatewayPreparer prepares the DissociateGateway request.
|
||||
func (client ServersClient) DissociateGatewayPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// DissociateGatewaySender sends the DissociateGateway request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) DissociateGatewaySender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// DissociateGatewayResponder handles the response to the DissociateGateway request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) DissociateGatewayResponder(resp *http.Response) (result autorest.Response, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByClosing())
|
||||
result.Response = resp
|
||||
return
|
||||
}
|
||||
|
||||
// GetDetails gets details about the specified Analysis Services server.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63.
|
||||
func (client ServersClient) GetDetails(resourceGroupName string, serverName string) (result Server, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
|
@ -291,7 +365,7 @@ func (client ServersClient) GetDetailsPreparer(resourceGroupName string, serverN
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -352,7 +426,7 @@ func (client ServersClient) ListPreparer() (*http.Request, error) {
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -384,12 +458,10 @@ func (client ServersClient) ListResponder(resp *http.Response) (result Servers,
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup gets all the Analysis Services servers for the given
|
||||
// resource group.
|
||||
// ListByResourceGroup gets all the Analysis Services servers for the given resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90.
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90.
|
||||
func (client ServersClient) ListByResourceGroup(resourceGroupName string) (result Servers, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -427,7 +499,7 @@ func (client ServersClient) ListByResourceGroupPreparer(resourceGroupName string
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -459,14 +531,231 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r
|
|||
return
|
||||
}
|
||||
|
||||
// Resume resumes operation of the specified Analysis Services server instance.
|
||||
// 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
|
||||
// ListGatewayStatus return the gateway status of the specified Analysis Services server instance.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server.
|
||||
func (client ServersClient) ListGatewayStatus(resourceGroupName string, serverName string) (result GatewayListStatusLive, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListGatewayStatus")
|
||||
}
|
||||
|
||||
req, err := client.ListGatewayStatusPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListGatewayStatusSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListGatewayStatusResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListGatewayStatusPreparer prepares the ListGatewayStatus request.
|
||||
func (client ServersClient) ListGatewayStatusPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListGatewayStatusSender sends the ListGatewayStatus request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListGatewayStatusSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListGatewayStatusResponder handles the response to the ListGatewayStatus request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListGatewayStatusResponder(resp *http.Response) (result GatewayListStatusLive, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForExisting lists eligible SKUs for an Analysis Services resource.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) ListSkusForExisting(resourceGroupName string, serverName string) (result SkuEnumerationForExistingResourceResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListSkusForExisting")
|
||||
}
|
||||
|
||||
req, err := client.ListSkusForExistingPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSkusForExistingSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListSkusForExistingResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForExistingPreparer prepares the ListSkusForExisting request.
|
||||
func (client ServersClient) ListSkusForExistingPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSkusForExistingSender sends the ListSkusForExisting request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListSkusForExistingSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListSkusForExistingResponder handles the response to the ListSkusForExisting request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListSkusForExistingResponder(resp *http.Response) (result SkuEnumerationForExistingResourceResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForNew lists eligible SKUs for Analysis Services resource provider.
|
||||
func (client ServersClient) ListSkusForNew() (result SkuEnumerationForNewResourceResult, err error) {
|
||||
req, err := client.ListSkusForNewPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSkusForNewSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListSkusForNewResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForNewPreparer prepares the ListSkusForNew request.
|
||||
func (client ServersClient) ListSkusForNewPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSkusForNewSender sends the ListSkusForNew request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListSkusForNewSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListSkusForNewResponder handles the response to the ListSkusForNew request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListSkusForNewResponder(resp *http.Response) (result SkuEnumerationForNewResourceResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Resume resumes operation of the specified Analysis Services server instance. 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 Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Resume(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
|
@ -490,8 +779,10 @@ func (client ServersClient) Resume(resourceGroupName string, serverName string,
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -524,7 +815,7 @@ func (client ServersClient) ResumePreparer(resourceGroupName string, serverName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -557,14 +848,12 @@ func (client ServersClient) ResumeResponder(resp *http.Response) (result autores
|
|||
return
|
||||
}
|
||||
|
||||
// Suspend supends operation of the specified Analysis Services server
|
||||
// instance. 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.
|
||||
// Suspend supends operation of the specified Analysis Services server instance. 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 Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Suspend(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
|
@ -588,8 +877,10 @@ func (client ServersClient) Suspend(resourceGroupName string, serverName string,
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -622,7 +913,7 @@ func (client ServersClient) SuspendPreparer(resourceGroupName string, serverName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -655,15 +946,17 @@ func (client ServersClient) SuspendResponder(resp *http.Response) (result autore
|
|||
return
|
||||
}
|
||||
|
||||
// Update updates the current state of the specified Analysis Services server.
|
||||
// Update updates the current state of the specified Analysis Services server. 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 Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
// serverUpdateParameters is request object that contains the updated
|
||||
// information for the server.
|
||||
func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (result Server, err error) {
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63. serverUpdateParameters is request object
|
||||
// that contains the updated information for the server.
|
||||
func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (<-chan Server, <-chan error) {
|
||||
resultChan := make(chan Server, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
|
@ -673,39 +966,53 @@ func (client ServersClient) Update(resourceGroupName string, serverName string,
|
|||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update")
|
||||
errChan <- validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
var err error
|
||||
var result Server
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.UpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
resp, err := client.UpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.UpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
result, err = client.UpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// UpdatePreparer prepares the Update request.
|
||||
func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (*http.Request, error) {
|
||||
func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -717,13 +1024,15 @@ func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName
|
|||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", pathParameters),
|
||||
autorest.WithJSON(serverUpdateParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// UpdateSender sends the Update request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) UpdateSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// UpdateResponder handles the response to the Update request. The method always
|
||||
|
@ -732,7 +1041,7 @@ func (client ServersClient) UpdateResponder(resp *http.Response) (result Server,
|
|||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-analysisservices/2017-08-01-beta"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-analysisservices/2017-08-01-beta"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
8
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go
generated
vendored
|
@ -1,5 +1,4 @@
|
|||
// Package appinsights implements the Azure ARM Appinsights service API version
|
||||
// .
|
||||
// Package appinsights implements the Azure ARM Appinsights service API version 2015-05-01.
|
||||
//
|
||||
// Composite Swagger for Application Insights Management Client
|
||||
package appinsights
|
||||
|
@ -18,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
134
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go
generated
vendored
134
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,8 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ComponentsClient is the composite Swagger for Application Insights
|
||||
// Management Client
|
||||
// ComponentsClient is the composite Swagger for Application Insights Management Client
|
||||
type ComponentsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,20 +34,16 @@ func NewComponentsClient(subscriptionID string) ComponentsClient {
|
|||
return NewComponentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient
|
||||
// client.
|
||||
// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client.
|
||||
func NewComponentsClientWithBaseURI(baseURI string, subscriptionID string) ComponentsClient {
|
||||
return ComponentsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates (or updates) an Application Insights component. Note:
|
||||
// You cannot specify a different value for InstrumentationKey nor AppId in the
|
||||
// Put operation.
|
||||
// CreateOrUpdate creates (or updates) an Application Insights component. Note: You cannot specify a different value
|
||||
// for InstrumentationKey nor AppId in the Put operation.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. resourceName is the
|
||||
// name of the Application Insights component resource. insightProperties is
|
||||
// properties that need to be specified to create an Application Insights
|
||||
// component.
|
||||
// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component
|
||||
// resource. insightProperties is properties that need to be specified to create an Application Insights component.
|
||||
func (client ComponentsClient) CreateOrUpdate(resourceGroupName string, resourceName string, insightProperties ApplicationInsightsComponent) (result ApplicationInsightsComponent, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: insightProperties,
|
||||
|
@ -122,8 +116,8 @@ func (client ComponentsClient) CreateOrUpdateResponder(resp *http.Response) (res
|
|||
|
||||
// Delete deletes an Application Insights component.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. resourceName is the
|
||||
// name of the Application Insights component resource.
|
||||
// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component
|
||||
// resource.
|
||||
func (client ComponentsClient) Delete(resourceGroupName string, resourceName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
|
@ -187,8 +181,8 @@ func (client ComponentsClient) DeleteResponder(resp *http.Response) (result auto
|
|||
|
||||
// Get returns an Application Insights component.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. resourceName is the
|
||||
// name of the Application Insights component resource.
|
||||
// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component
|
||||
// resource.
|
||||
func (client ComponentsClient) Get(resourceGroupName string, resourceName string) (result ApplicationInsightsComponent, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
|
@ -251,8 +245,7 @@ func (client ComponentsClient) GetResponder(resp *http.Response) (result Applica
|
|||
return
|
||||
}
|
||||
|
||||
// List gets a list of all Application Insights components within a
|
||||
// subscription.
|
||||
// List gets a list of all Application Insights components within a subscription.
|
||||
func (client ComponentsClient) List() (result ApplicationInsightsComponentListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -337,8 +330,52 @@ func (client ComponentsClient) ListNextResults(lastResults ApplicationInsightsCo
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup gets a list of Application Insights components within a
|
||||
// resource group.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ComponentsClient) ListComplete(cancel <-chan struct{}) (<-chan ApplicationInsightsComponent, <-chan error) {
|
||||
resultChan := make(chan ApplicationInsightsComponent)
|
||||
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 gets a list of Application Insights components within a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
func (client ComponentsClient) ListByResourceGroup(resourceGroupName string) (result ApplicationInsightsComponentListResult, err error) {
|
||||
|
@ -426,12 +463,55 @@ func (client ComponentsClient) ListByResourceGroupNextResults(lastResults Applic
|
|||
return
|
||||
}
|
||||
|
||||
// UpdateTags updates an existing component's tags. To update other fields use
|
||||
// the CreateOrUpdate method.
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ComponentsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ApplicationInsightsComponent, <-chan error) {
|
||||
resultChan := make(chan ApplicationInsightsComponent)
|
||||
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
|
||||
}
|
||||
|
||||
// UpdateTags updates an existing component's tags. To update other fields use the CreateOrUpdate method.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. resourceName is the
|
||||
// name of the Application Insights component resource. componentTags is
|
||||
// updated tag information to set into the component instance.
|
||||
// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component
|
||||
// resource. componentTags is updated tag information to set into the component instance.
|
||||
func (client ComponentsClient) UpdateTags(resourceGroupName string, resourceName string, componentTags TagsResource) (result ApplicationInsightsComponent, err error) {
|
||||
req, err := client.UpdateTagsPreparer(resourceGroupName, resourceName, componentTags)
|
||||
if err != nil {
|
||||
|
|
38
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go
generated
vendored
38
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -61,8 +60,7 @@ const (
|
|||
Ping WebTestKind = "ping"
|
||||
)
|
||||
|
||||
// ApplicationInsightsComponent is an Application Insights component
|
||||
// definition.
|
||||
// ApplicationInsightsComponent is an Application Insights component definition.
|
||||
type ApplicationInsightsComponent struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -74,8 +72,7 @@ type ApplicationInsightsComponent struct {
|
|||
*ApplicationInsightsComponentProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationInsightsComponentListResult is describes the list of Application
|
||||
// Insights Resources.
|
||||
// ApplicationInsightsComponentListResult is describes the list of Application Insights Resources.
|
||||
type ApplicationInsightsComponentListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
|
||||
|
@ -94,8 +91,7 @@ func (client ApplicationInsightsComponentListResult) ApplicationInsightsComponen
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// ApplicationInsightsComponentProperties is properties that define an
|
||||
// Application Insights component resource.
|
||||
// ApplicationInsightsComponentProperties is properties that define an Application Insights component resource.
|
||||
type ApplicationInsightsComponentProperties struct {
|
||||
ApplicationID *string `json:"ApplicationId,omitempty"`
|
||||
AppID *string `json:"AppId,omitempty"`
|
||||
|
@ -111,14 +107,14 @@ type ApplicationInsightsComponentProperties struct {
|
|||
SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorResponse is error reponse indicates Insights service is not able to
|
||||
// process the incoming request. The reason is provided in the error message.
|
||||
// ErrorResponse is error reponse indicates Insights service is not able to process the incoming request. The reason is
|
||||
// provided in the error message.
|
||||
type ErrorResponse struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// Operation is cDN REST API operation
|
||||
// Operation is CDN REST API operation
|
||||
type Operation struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplay `json:"display,omitempty"`
|
||||
|
@ -131,8 +127,8 @@ type OperationDisplay struct {
|
|||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of the request to list CDN operations. It
|
||||
// contains a list of operations and a URL link to get the next set of results.
|
||||
// OperationListResult is result of the request to list CDN operations. It contains a list of operations and a URL link
|
||||
// to get the next set of results.
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
|
@ -160,8 +156,8 @@ type Resource struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// TagsResource is a container holding only the Tags for a resource, allowing
|
||||
// the user to update the tags on a WebTest instance.
|
||||
// TagsResource is a container holding only the Tags for a resource, allowing the user to update the tags on a WebTest
|
||||
// instance.
|
||||
type TagsResource struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
@ -178,14 +174,13 @@ type WebTest struct {
|
|||
*WebTestProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WebTestGeolocation is geo-physical location to run a web test from. You must
|
||||
// specify one or more locations for the test to run from.
|
||||
// WebTestGeolocation is geo-physical location to run a web test from. You must specify one or more locations for the
|
||||
// test to run from.
|
||||
type WebTestGeolocation struct {
|
||||
Location *string `json:"Id,omitempty"`
|
||||
}
|
||||
|
||||
// WebTestListResult is a list of 0 or more Application Insights web test
|
||||
// definitions.
|
||||
// WebTestListResult is a list of 0 or more Application Insights web test definitions.
|
||||
type WebTestListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]WebTest `json:"value,omitempty"`
|
||||
|
@ -219,8 +214,7 @@ type WebTestProperties struct {
|
|||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
}
|
||||
|
||||
// WebTestPropertiesConfiguration is an XML configuration specification for a
|
||||
// WebTest.
|
||||
// WebTestPropertiesConfiguration is an XML configuration specification for a WebTest.
|
||||
type WebTestPropertiesConfiguration struct {
|
||||
WebTest *string `json:"WebTest,omitempty"`
|
||||
}
|
||||
|
|
56
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go
generated
vendored
56
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,8 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the composite Swagger for Application Insights
|
||||
// Management Client
|
||||
// OperationsClient is the composite Swagger for Application Insights Management Client
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
|||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult)
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
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
|
||||
}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-appinsights/2015-05-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-appinsights/2015-05-01"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
130
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go
generated
vendored
130
vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,8 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// WebTestsClient is the composite Swagger for Application Insights Management
|
||||
// Client
|
||||
// WebTestsClient is the composite Swagger for Application Insights Management Client
|
||||
type WebTestsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,19 +34,16 @@ func NewWebTestsClient(subscriptionID string) WebTestsClient {
|
|||
return NewWebTestsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient
|
||||
// client.
|
||||
// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient client.
|
||||
func NewWebTestsClientWithBaseURI(baseURI string, subscriptionID string) WebTestsClient {
|
||||
return WebTestsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or updates an Application Insights web test
|
||||
// definition.
|
||||
// CreateOrUpdate creates or updates an Application Insights web test definition.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name
|
||||
// of the Application Insights webtest resource. webTestDefinition is
|
||||
// properties that need to be specified to create or update an Application
|
||||
// Insights web test definition.
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest
|
||||
// resource. webTestDefinition is properties that need to be specified to create or update an Application Insights web
|
||||
// test definition.
|
||||
func (client WebTestsClient) CreateOrUpdate(resourceGroupName string, webTestName string, webTestDefinition WebTest) (result WebTest, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: webTestDefinition,
|
||||
|
@ -125,8 +120,8 @@ func (client WebTestsClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
|||
|
||||
// Delete deletes an Application Insights web test.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name
|
||||
// of the Application Insights webtest resource.
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest
|
||||
// resource.
|
||||
func (client WebTestsClient) Delete(resourceGroupName string, webTestName string) (result autorest.Response, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, webTestName)
|
||||
if err != nil {
|
||||
|
@ -190,8 +185,8 @@ func (client WebTestsClient) DeleteResponder(resp *http.Response) (result autore
|
|||
|
||||
// Get get a specific Application Insights web test definition.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name
|
||||
// of the Application Insights webtest resource.
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest
|
||||
// resource.
|
||||
func (client WebTestsClient) Get(resourceGroupName string, webTestName string) (result WebTest, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, webTestName)
|
||||
if err != nil {
|
||||
|
@ -254,8 +249,7 @@ func (client WebTestsClient) GetResponder(resp *http.Response) (result WebTest,
|
|||
return
|
||||
}
|
||||
|
||||
// List get all Application Insights web test alerts definitioned within a
|
||||
// subscription.
|
||||
// List get all Application Insights web test alerts definitioned within a subscription.
|
||||
func (client WebTestsClient) List() (result WebTestListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -340,8 +334,52 @@ func (client WebTestsClient) ListNextResults(lastResults WebTestListResult) (res
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup get all Application Insights web tests defined within a
|
||||
// specified resource group.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client WebTestsClient) ListComplete(cancel <-chan struct{}) (<-chan WebTest, <-chan error) {
|
||||
resultChan := make(chan WebTest)
|
||||
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 all Application Insights web tests defined within a specified resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
func (client WebTestsClient) ListByResourceGroup(resourceGroupName string) (result WebTestListResult, err error) {
|
||||
|
@ -429,11 +467,55 @@ func (client WebTestsClient) ListByResourceGroupNextResults(lastResults WebTestL
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client WebTestsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan WebTest, <-chan error) {
|
||||
resultChan := make(chan WebTest)
|
||||
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
|
||||
}
|
||||
|
||||
// UpdateTags creates or updates an Application Insights web test definition.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name
|
||||
// of the Application Insights webtest resource. webTestTags is updated tag
|
||||
// information to set into the web test instance.
|
||||
// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest
|
||||
// resource. webTestTags is updated tag information to set into the web test instance.
|
||||
func (client WebTestsClient) UpdateTags(resourceGroupName string, webTestName string, webTestTags TagsResource) (result WebTest, err error) {
|
||||
req, err := client.UpdateTagsPreparer(resourceGroupName, webTestName, webTestTags)
|
||||
if err != nil {
|
||||
|
|
69
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go
generated
vendored
69
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,30 +23,25 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ClassicAdministratorsClient is the role based access control provides you a
|
||||
// way to apply granular level policy administration down to individual
|
||||
// resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of
|
||||
// actions that can be performed on resources. A role assignment grants access
|
||||
// to Azure Active Directory users.
|
||||
// ClassicAdministratorsClient is the role based access control provides you a way to apply granular level policy
|
||||
// administration down to individual resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
|
||||
// A role assignment grants access to Azure Active Directory users.
|
||||
type ClassicAdministratorsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewClassicAdministratorsClient creates an instance of the
|
||||
// ClassicAdministratorsClient client.
|
||||
// NewClassicAdministratorsClient creates an instance of the ClassicAdministratorsClient client.
|
||||
func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministratorsClient {
|
||||
return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewClassicAdministratorsClientWithBaseURI creates an instance of the
|
||||
// ClassicAdministratorsClient client.
|
||||
// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client.
|
||||
func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient {
|
||||
return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List gets service administrator, account administrator, and
|
||||
// co-administrators for the subscription.
|
||||
// List gets service administrator, account administrator, and co-administrators for the subscription.
|
||||
func (client ClassicAdministratorsClient) List() (result ClassicAdministratorListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -131,3 +125,48 @@ func (client ClassicAdministratorsClient) ListNextResults(lastResults ClassicAdm
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ClassicAdministratorsClient) ListComplete(cancel <-chan struct{}) (<-chan ClassicAdministrator, <-chan error) {
|
||||
resultChan := make(chan ClassicAdministrator)
|
||||
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
|
||||
}
|
||||
|
|
17
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go
generated
vendored
17
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go
generated
vendored
|
@ -1,11 +1,9 @@
|
|||
// Package authorization implements the Azure ARM Authorization service API
|
||||
// version 2015-07-01.
|
||||
// Package authorization implements the Azure ARM Authorization service API version 2015-07-01.
|
||||
//
|
||||
// Role based access control provides you a way to apply granular level policy
|
||||
// administration down to individual resources or resource groups. These
|
||||
// operations enable you to manage role definitions and role assignments. A
|
||||
// role definition describes the set of actions that can be performed on
|
||||
// resources. A role assignment grants access to Azure Active Directory users.
|
||||
// Role based access control provides you a way to apply granular level policy administration down to individual
|
||||
// resources or resource groups. These operations enable you to manage role definitions and role assignments. A role
|
||||
// definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure
|
||||
// Active Directory users.
|
||||
package authorization
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -22,9 +20,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
8
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -32,8 +31,7 @@ type ClassicAdministrator struct {
|
|||
Properties *ClassicAdministratorProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ClassicAdministratorListResult is classicAdministrator list result
|
||||
// information.
|
||||
// ClassicAdministratorListResult is classicAdministrator list result information.
|
||||
type ClassicAdministratorListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ClassicAdministrator `json:"value,omitempty"`
|
||||
|
|
123
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go
generated
vendored
123
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,12 +23,10 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// PermissionsClient is the role based access control provides you a way to
|
||||
// apply granular level policy administration down to individual resources or
|
||||
// resource groups. These operations enable you to manage role definitions and
|
||||
// role assignments. A role definition describes the set of actions that can be
|
||||
// performed on resources. A role assignment grants access to Azure Active
|
||||
// Directory users.
|
||||
// PermissionsClient is the role based access control provides you a way to apply granular level policy administration
|
||||
// down to individual resources or resource groups. These operations enable you to manage role definitions and role
|
||||
// assignments. A role definition describes the set of actions that can be performed on resources. A role assignment
|
||||
// grants access to Azure Active Directory users.
|
||||
type PermissionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -39,19 +36,17 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient {
|
|||
return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient
|
||||
// client.
|
||||
// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client.
|
||||
func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient {
|
||||
return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListForResource gets all permissions the caller has for a resource.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group containing the resource.
|
||||
// The name is case insensitive. resourceProviderNamespace is the namespace of
|
||||
// the resource provider. parentResourcePath is the parent resource identity.
|
||||
// resourceType is the resource type of the resource. resourceName is the name
|
||||
// of the resource to get the permissions for.
|
||||
// resourceGroupName is the name of the resource group containing the resource. The name is case insensitive.
|
||||
// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource
|
||||
// identity. resourceType is the resource type of the resource. resourceName is the name of the resource to get the
|
||||
// permissions for.
|
||||
func (client PermissionsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResult, err error) {
|
||||
req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
|
||||
if err != nil {
|
||||
|
@ -141,11 +136,54 @@ func (client PermissionsClient) ListForResourceNextResults(lastResults Permissio
|
|||
return
|
||||
}
|
||||
|
||||
// ListForResourceGroup gets all permissions the caller has for a resource
|
||||
// group.
|
||||
// ListForResourceComplete gets all elements from the list without paging.
|
||||
func (client PermissionsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) {
|
||||
resultChan := make(chan Permission)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
|
||||
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.ListForResourceNextResults(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
|
||||
}
|
||||
|
||||
// ListForResourceGroup gets all permissions the caller has for a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group to get the permissions
|
||||
// for. The name is case insensitive.
|
||||
// resourceGroupName is the name of the resource group to get the permissions for. The name is case insensitive.
|
||||
func (client PermissionsClient) ListForResourceGroup(resourceGroupName string) (result PermissionGetResult, err error) {
|
||||
req, err := client.ListForResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
|
@ -230,3 +268,48 @@ func (client PermissionsClient) ListForResourceGroupNextResults(lastResults Perm
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListForResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client PermissionsClient) ListForResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) {
|
||||
resultChan := make(chan Permission)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListForResourceGroup(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.ListForResourceGroupNextResults(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
|
||||
}
|
||||
|
|
70
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go
generated
vendored
70
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,32 +23,28 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ProviderOperationsMetadataClient is the role based access control provides
|
||||
// you a way to apply granular level policy administration down to individual
|
||||
// resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of
|
||||
// actions that can be performed on resources. A role assignment grants access
|
||||
// to Azure Active Directory users.
|
||||
// ProviderOperationsMetadataClient is the role based access control provides you a way to apply granular level policy
|
||||
// administration down to individual resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
|
||||
// A role assignment grants access to Azure Active Directory users.
|
||||
type ProviderOperationsMetadataClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewProviderOperationsMetadataClient creates an instance of the
|
||||
// ProviderOperationsMetadataClient client.
|
||||
// NewProviderOperationsMetadataClient creates an instance of the ProviderOperationsMetadataClient client.
|
||||
func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperationsMetadataClient {
|
||||
return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the
|
||||
// ProviderOperationsMetadataClient client.
|
||||
// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client.
|
||||
func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient {
|
||||
return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets provider operations metadata for the specified resource provider.
|
||||
//
|
||||
// resourceProviderNamespace is the namespace of the resource provider. expand
|
||||
// is specifies whether to expand the values.
|
||||
// resourceProviderNamespace is the namespace of the resource provider. expand is specifies whether to expand the
|
||||
// values.
|
||||
func (client ProviderOperationsMetadataClient) Get(resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) {
|
||||
req, err := client.GetPreparer(resourceProviderNamespace, expand)
|
||||
if err != nil {
|
||||
|
@ -198,3 +193,48 @@ func (client ProviderOperationsMetadataClient) ListNextResults(lastResults Provi
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ProviderOperationsMetadataClient) ListComplete(expand string, cancel <-chan struct{}) (<-chan ProviderOperationsMetadata, <-chan error) {
|
||||
resultChan := make(chan ProviderOperationsMetadata)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(expand)
|
||||
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
|
||||
}
|
||||
|
|
258
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go
generated
vendored
258
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,39 +23,32 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// RoleAssignmentsClient is the role based access control provides you a way to
|
||||
// apply granular level policy administration down to individual resources or
|
||||
// resource groups. These operations enable you to manage role definitions and
|
||||
// role assignments. A role definition describes the set of actions that can be
|
||||
// performed on resources. A role assignment grants access to Azure Active
|
||||
// Directory users.
|
||||
// RoleAssignmentsClient is the role based access control provides you a way to apply granular level policy
|
||||
// administration down to individual resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
|
||||
// A role assignment grants access to Azure Active Directory users.
|
||||
type RoleAssignmentsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient
|
||||
// client.
|
||||
// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client.
|
||||
func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient {
|
||||
return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRoleAssignmentsClientWithBaseURI creates an instance of the
|
||||
// RoleAssignmentsClient client.
|
||||
// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client.
|
||||
func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient {
|
||||
return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a role assignment.
|
||||
//
|
||||
// scope is the scope of the role assignment to create. The scope can be any
|
||||
// REST resource instance. For example, use '/subscriptions/{subscription-id}/'
|
||||
// for a subscription,
|
||||
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
|
||||
// a resource group, and
|
||||
// scope is the scope of the role assignment to create. The scope can be any REST resource instance. For example, use
|
||||
// '/subscriptions/{subscription-id}/' for a subscription,
|
||||
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and
|
||||
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}'
|
||||
// for a resource. roleAssignmentName is the name of the role assignment to
|
||||
// create. It can be any valid GUID. parameters is parameters for the role
|
||||
// assignment.
|
||||
// for a resource. roleAssignmentName is the name of the role assignment to create. It can be any valid GUID.
|
||||
// parameters is parameters for the role assignment.
|
||||
func (client RoleAssignmentsClient) Create(scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
|
||||
req, err := client.CreatePreparer(scope, roleAssignmentName, parameters)
|
||||
if err != nil {
|
||||
|
@ -122,8 +114,7 @@ func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result
|
|||
|
||||
// CreateByID creates a role assignment by ID.
|
||||
//
|
||||
// roleAssignmentID is the ID of the role assignment to create. parameters is
|
||||
// parameters for the role assignment.
|
||||
// roleAssignmentID is the ID of the role assignment to create. parameters is parameters for the role assignment.
|
||||
func (client RoleAssignmentsClient) CreateByID(roleAssignmentID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
|
||||
req, err := client.CreateByIDPreparer(roleAssignmentID, parameters)
|
||||
if err != nil {
|
||||
|
@ -188,8 +179,8 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re
|
|||
|
||||
// Delete deletes a role assignment.
|
||||
//
|
||||
// scope is the scope of the role assignment to delete. roleAssignmentName is
|
||||
// the name of the role assignment to delete.
|
||||
// scope is the scope of the role assignment to delete. roleAssignmentName is the name of the role assignment to
|
||||
// delete.
|
||||
func (client RoleAssignmentsClient) Delete(scope string, roleAssignmentName string) (result RoleAssignment, err error) {
|
||||
req, err := client.DeletePreparer(scope, roleAssignmentName)
|
||||
if err != nil {
|
||||
|
@ -316,8 +307,7 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re
|
|||
|
||||
// Get get the specified role assignment.
|
||||
//
|
||||
// scope is the scope of the role assignment. roleAssignmentName is the name of
|
||||
// the role assignment to get.
|
||||
// scope is the scope of the role assignment. roleAssignmentName is the name of the role assignment to get.
|
||||
func (client RoleAssignmentsClient) Get(scope string, roleAssignmentName string) (result RoleAssignment, err error) {
|
||||
req, err := client.GetPreparer(scope, roleAssignmentName)
|
||||
if err != nil {
|
||||
|
@ -444,10 +434,9 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul
|
|||
|
||||
// List gets all role assignments for the subscription.
|
||||
//
|
||||
// filter is the filter to apply on the operation. Use $filter=atScope() to
|
||||
// return all role assignments at or above the scope. Use $filter=principalId
|
||||
// eq {id} to return all role assignments at, above or below the scope for the
|
||||
// specified principal.
|
||||
// filter is the filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the
|
||||
// scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified
|
||||
// principal.
|
||||
func (client RoleAssignmentsClient) List(filter string) (result RoleAssignmentListResult, err error) {
|
||||
req, err := client.ListPreparer(filter)
|
||||
if err != nil {
|
||||
|
@ -535,16 +524,58 @@ func (client RoleAssignmentsClient) ListNextResults(lastResults RoleAssignmentLi
|
|||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client RoleAssignmentsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
|
||||
resultChan := make(chan RoleAssignment)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter)
|
||||
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
|
||||
}
|
||||
|
||||
// ListForResource gets role assignments for a resource.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
// resourceProviderNamespace is the namespace of the resource provider.
|
||||
// parentResourcePath is the parent resource identity. resourceType is the
|
||||
// resource type of the resource. resourceName is the name of the resource to
|
||||
// get role assignments for. filter is the filter to apply on the operation.
|
||||
// Use $filter=atScope() to return all role assignments at or above the scope.
|
||||
// Use $filter=principalId eq {id} to return all role assignments at, above or
|
||||
// below the scope for the specified principal.
|
||||
// resourceGroupName is the name of the resource group. resourceProviderNamespace is the namespace of the resource
|
||||
// provider. parentResourcePath is the parent resource identity. resourceType is the resource type of the resource.
|
||||
// resourceName is the name of the resource to get role assignments for. filter is the filter to apply on the
|
||||
// operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq
|
||||
// {id} to return all role assignments at, above or below the scope for the specified principal.
|
||||
func (client RoleAssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResult, err error) {
|
||||
req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
|
||||
if err != nil {
|
||||
|
@ -637,12 +668,56 @@ func (client RoleAssignmentsClient) ListForResourceNextResults(lastResults RoleA
|
|||
return
|
||||
}
|
||||
|
||||
// ListForResourceComplete gets all elements from the list without paging.
|
||||
func (client RoleAssignmentsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
|
||||
resultChan := make(chan RoleAssignment)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
|
||||
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.ListForResourceNextResults(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
|
||||
}
|
||||
|
||||
// ListForResourceGroup gets role assignments for a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. filter is the filter to
|
||||
// apply on the operation. Use $filter=atScope() to return all role assignments
|
||||
// at or above the scope. Use $filter=principalId eq {id} to return all role
|
||||
// assignments at, above or below the scope for the specified principal.
|
||||
// resourceGroupName is the name of the resource group. filter is the filter to apply on the operation. Use
|
||||
// $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return
|
||||
// all role assignments at, above or below the scope for the specified principal.
|
||||
func (client RoleAssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result RoleAssignmentListResult, err error) {
|
||||
req, err := client.ListForResourceGroupPreparer(resourceGroupName, filter)
|
||||
if err != nil {
|
||||
|
@ -731,12 +806,56 @@ func (client RoleAssignmentsClient) ListForResourceGroupNextResults(lastResults
|
|||
return
|
||||
}
|
||||
|
||||
// ListForResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client RoleAssignmentsClient) ListForResourceGroupComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
|
||||
resultChan := make(chan RoleAssignment)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListForResourceGroup(resourceGroupName, filter)
|
||||
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.ListForResourceGroupNextResults(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
|
||||
}
|
||||
|
||||
// ListForScope gets role assignments for a scope.
|
||||
//
|
||||
// scope is the scope of the role assignments. filter is the filter to apply on
|
||||
// the operation. Use $filter=atScope() to return all role assignments at or
|
||||
// above the scope. Use $filter=principalId eq {id} to return all role
|
||||
// assignments at, above or below the scope for the specified principal.
|
||||
// scope is the scope of the role assignments. filter is the filter to apply on the operation. Use $filter=atScope() to
|
||||
// return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments
|
||||
// at, above or below the scope for the specified principal.
|
||||
func (client RoleAssignmentsClient) ListForScope(scope string, filter string) (result RoleAssignmentListResult, err error) {
|
||||
req, err := client.ListForScopePreparer(scope, filter)
|
||||
if err != nil {
|
||||
|
@ -823,3 +942,48 @@ func (client RoleAssignmentsClient) ListForScopeNextResults(lastResults RoleAssi
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListForScopeComplete gets all elements from the list without paging.
|
||||
func (client RoleAssignmentsClient) ListForScopeComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) {
|
||||
resultChan := make(chan RoleAssignment)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListForScope(scope, filter)
|
||||
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.ListForScopeNextResults(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
|
||||
}
|
||||
|
|
81
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go
generated
vendored
81
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,32 +23,28 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// RoleDefinitionsClient is the role based access control provides you a way to
|
||||
// apply granular level policy administration down to individual resources or
|
||||
// resource groups. These operations enable you to manage role definitions and
|
||||
// role assignments. A role definition describes the set of actions that can be
|
||||
// performed on resources. A role assignment grants access to Azure Active
|
||||
// Directory users.
|
||||
// RoleDefinitionsClient is the role based access control provides you a way to apply granular level policy
|
||||
// administration down to individual resources or resource groups. These operations enable you to manage role
|
||||
// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
|
||||
// A role assignment grants access to Azure Active Directory users.
|
||||
type RoleDefinitionsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient
|
||||
// client.
|
||||
// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient client.
|
||||
func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient {
|
||||
return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRoleDefinitionsClientWithBaseURI creates an instance of the
|
||||
// RoleDefinitionsClient client.
|
||||
// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client.
|
||||
func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient {
|
||||
return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or updates a role definition.
|
||||
//
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the
|
||||
// role definition. roleDefinition is the values for the role definition.
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. roleDefinition is the
|
||||
// values for the role definition.
|
||||
func (client RoleDefinitionsClient) CreateOrUpdate(scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(scope, roleDefinitionID, roleDefinition)
|
||||
if err != nil {
|
||||
|
@ -115,8 +110,7 @@ func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response)
|
|||
|
||||
// Delete deletes a role definition.
|
||||
//
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the
|
||||
// role definition to delete.
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition to delete.
|
||||
func (client RoleDefinitionsClient) Delete(scope string, roleDefinitionID string) (result RoleDefinition, err error) {
|
||||
req, err := client.DeletePreparer(scope, roleDefinitionID)
|
||||
if err != nil {
|
||||
|
@ -180,8 +174,7 @@ func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result
|
|||
|
||||
// Get get role definition by name (GUID).
|
||||
//
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the
|
||||
// role definition.
|
||||
// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition.
|
||||
func (client RoleDefinitionsClient) Get(scope string, roleDefinitionID string) (result RoleDefinition, err error) {
|
||||
req, err := client.GetPreparer(scope, roleDefinitionID)
|
||||
if err != nil {
|
||||
|
@ -308,9 +301,8 @@ func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (resul
|
|||
|
||||
// List get all role definitions that are applicable at scope and above.
|
||||
//
|
||||
// scope is the scope of the role definition. filter is the filter to apply on
|
||||
// the operation. Use atScopeAndBelow filter to search below the given scope as
|
||||
// well.
|
||||
// scope is the scope of the role definition. filter is the filter to apply on the operation. Use atScopeAndBelow
|
||||
// filter to search below the given scope as well.
|
||||
func (client RoleDefinitionsClient) List(scope string, filter string) (result RoleDefinitionListResult, err error) {
|
||||
req, err := client.ListPreparer(scope, filter)
|
||||
if err != nil {
|
||||
|
@ -397,3 +389,48 @@ func (client RoleDefinitionsClient) ListNextResults(lastResults RoleDefinitionLi
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client RoleDefinitionsClient) ListComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleDefinition, <-chan error) {
|
||||
resultChan := make(chan RoleDefinition)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(scope, filter)
|
||||
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
|
||||
}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-authorization/2015-07-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-authorization/2015-07-01"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
116
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go
generated
vendored
116
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// AccountClient is the composite Swagger json for Azure Automation Client
|
||||
// AccountClient is the automation Client
|
||||
type AccountClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,9 +41,8 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC
|
|||
|
||||
// CreateOrUpdate create or update automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// parameters supplied to the create or update automation account. parameters
|
||||
// is parameters supplied to the create or update automation account.
|
||||
// resourceGroupName is the resource group name. automationAccountName is parameters supplied to the create or update
|
||||
// automation account. parameters is parameters supplied to the create or update automation account.
|
||||
func (client AccountClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -117,8 +115,7 @@ func (client AccountClient) CreateOrUpdateResponder(resp *http.Response) (result
|
|||
|
||||
// Delete delete an automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name.
|
||||
func (client AccountClient) Delete(resourceGroupName string, automationAccountName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -188,8 +185,7 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
|
|||
|
||||
// Get get information about an Automation Account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client AccountClient) Get(resourceGroupName string, automationAccountName string) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -343,8 +339,52 @@ func (client AccountClient) ListNextResults(lastResults AccountListResult) (resu
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup retrieve a list of accounts within a given resource
|
||||
// group.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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 retrieve a list of accounts within a given resource group.
|
||||
//
|
||||
// resourceGroupName is the resource group name.
|
||||
func (client AccountClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) {
|
||||
|
@ -438,11 +478,55 @@ func (client AccountClient) ListByResourceGroupNextResults(lastResults AccountLi
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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
|
||||
}
|
||||
|
||||
// Update update an automation account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. parameters is parameters supplied to the update
|
||||
// automation account.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name. parameters is
|
||||
// parameters supplied to the update automation account.
|
||||
func (client AccountClient) Update(resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
70
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go
generated
vendored
70
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ActivityClient is the composite Swagger json for Azure Automation Client
|
||||
// ActivityClient is the automation Client
|
||||
type ActivityClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,18 +34,15 @@ func NewActivityClient(subscriptionID string) ActivityClient {
|
|||
return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewActivityClientWithBaseURI creates an instance of the ActivityClient
|
||||
// client.
|
||||
// NewActivityClientWithBaseURI creates an instance of the ActivityClient client.
|
||||
func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient {
|
||||
return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the activity in the module identified by module name and
|
||||
// activity name.
|
||||
// Get retrieve the activity in the module identified by module name and activity name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. activityName is
|
||||
// the name of activity.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. activityName is the name of activity.
|
||||
func (client ActivityClient) Get(resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -117,11 +113,10 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity,
|
|||
return
|
||||
}
|
||||
|
||||
// ListByModule retrieve a list of activities in the module identified by
|
||||
// module name.
|
||||
// ListByModule retrieve a list of activities in the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module.
|
||||
func (client ActivityClient) ListByModule(resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -214,3 +209,48 @@ func (client ActivityClient) ListByModuleNextResults(lastResults ActivityListRes
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByModuleComplete gets all elements from the list without paging.
|
||||
func (client ActivityClient) ListByModuleComplete(resourceGroupName string, automationAccountName string, moduleName string, cancel <-chan struct{}) (<-chan Activity, <-chan error) {
|
||||
resultChan := make(chan Activity)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByModule(resourceGroupName, automationAccountName, moduleName)
|
||||
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.ListByModuleNextResults(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
|
||||
}
|
||||
|
|
23
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go
generated
vendored
23
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,28 +24,25 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// AgentRegistrationInformationClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// AgentRegistrationInformationClient is the automation Client
|
||||
type AgentRegistrationInformationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewAgentRegistrationInformationClient creates an instance of the
|
||||
// AgentRegistrationInformationClient client.
|
||||
// NewAgentRegistrationInformationClient creates an instance of the AgentRegistrationInformationClient client.
|
||||
func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrationInformationClient {
|
||||
return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the
|
||||
// AgentRegistrationInformationClient client.
|
||||
// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient
|
||||
// client.
|
||||
func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient {
|
||||
return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the automation agent registration information.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client AgentRegistrationInformationClient) Get(resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -117,9 +113,8 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons
|
|||
|
||||
// RegenerateKey regenerate a primary or secondary agent registration key
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. parameters is the name of the agent registration
|
||||
// key to be regenerated
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters is
|
||||
// the name of the agent registration key to be regenerated
|
||||
func (client AgentRegistrationInformationClient) RegenerateKey(resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go
generated
vendored
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// CertificateClient is the composite Swagger json for Azure Automation Client
|
||||
// CertificateClient is the automation Client
|
||||
type CertificateClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,18 +34,16 @@ func NewCertificateClient(subscriptionID string) CertificateClient {
|
|||
return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCertificateClientWithBaseURI creates an instance of the CertificateClient
|
||||
// client.
|
||||
// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client.
|
||||
func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient {
|
||||
return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the parameters supplied to the
|
||||
// create or update certificate operation. parameters is the parameters
|
||||
// supplied to the create or update certificate operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the parameters supplied to the create or update certificate operation. parameters is the parameters supplied to
|
||||
// the create or update certificate operation.
|
||||
func (client CertificateClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -124,8 +121,8 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re
|
|||
|
||||
// Delete delete the certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the name of certificate.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the name of certificate.
|
||||
func (client CertificateClient) Delete(resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -196,8 +193,8 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut
|
|||
|
||||
// Get retrieve the certificate identified by certificate name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the name of certificate.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the name of certificate.
|
||||
func (client CertificateClient) Get(resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -269,8 +266,7 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif
|
|||
|
||||
// ListByAutomationAccount retrieve a list of certificates.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client CertificateClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CertificateListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -363,12 +359,56 @@ func (client CertificateClient) ListByAutomationAccountNextResults(lastResults C
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client CertificateClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Certificate, <-chan error) {
|
||||
resultChan := make(chan Certificate)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update a certificate.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. certificateName is the parameters supplied to the
|
||||
// update certificate operation. parameters is the parameters supplied to the
|
||||
// update certificate operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName
|
||||
// is the parameters supplied to the update certificate operation. parameters is the parameters supplied to the update
|
||||
// certificate operation.
|
||||
func (client CertificateClient) Update(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
9
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go
generated
vendored
9
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go
generated
vendored
|
@ -1,6 +1,6 @@
|
|||
// Package automation implements the Azure ARM Automation service API version .
|
||||
// Package automation implements the Azure ARM Automation service API version 2015-10-31.
|
||||
//
|
||||
// Composite Swagger json for Azure Automation Client
|
||||
// Automation Client
|
||||
package automation
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -17,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go
generated
vendored
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionClient is the composite Swagger json for Azure Automation Client
|
||||
// ConnectionClient is the automation Client
|
||||
type ConnectionClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,18 +34,16 @@ func NewConnectionClient(subscriptionID string) ConnectionClient {
|
|||
return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient
|
||||
// client.
|
||||
// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client.
|
||||
func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient {
|
||||
return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update a connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the parameters supplied to the
|
||||
// create or update connection operation. parameters is the parameters supplied
|
||||
// to the create or update connection operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the parameters supplied to the create or update connection operation. parameters is the parameters supplied to
|
||||
// the create or update connection operation.
|
||||
func (client ConnectionClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -124,8 +121,8 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res
|
|||
|
||||
// Delete delete the connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the name of connection.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the name of connection.
|
||||
func (client ConnectionClient) Delete(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -197,8 +194,8 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn
|
|||
|
||||
// Get retrieve the connection identified by connection name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the name of connection.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the name of connection.
|
||||
func (client ConnectionClient) Get(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -270,8 +267,7 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect
|
|||
|
||||
// ListByAutomationAccount retrieve a list of connections.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ConnectionClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -364,12 +360,56 @@ func (client ConnectionClient) ListByAutomationAccountNextResults(lastResults Co
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ConnectionClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Connection, <-chan error) {
|
||||
resultChan := make(chan Connection)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update a connection.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionName is the parameters supplied to the
|
||||
// update a connection operation. parameters is the parameters supplied to the
|
||||
// update a connection operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName
|
||||
// is the parameters supplied to the update a connection operation. parameters is the parameters supplied to the update
|
||||
// a connection operation.
|
||||
func (client ConnectionClient) Update(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go
generated
vendored
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,30 +24,26 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionTypeClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// ConnectionTypeClient is the automation Client
|
||||
type ConnectionTypeClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewConnectionTypeClient creates an instance of the ConnectionTypeClient
|
||||
// client.
|
||||
// NewConnectionTypeClient creates an instance of the ConnectionTypeClient client.
|
||||
func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient {
|
||||
return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewConnectionTypeClientWithBaseURI creates an instance of the
|
||||
// ConnectionTypeClient client.
|
||||
// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client.
|
||||
func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient {
|
||||
return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a connectiontype.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the parameters supplied to
|
||||
// the create or update connectiontype operation. parameters is the parameters
|
||||
// supplied to the create or update connectiontype operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is the
|
||||
// parameters supplied to the create or update connectiontype operation.
|
||||
func (client ConnectionTypeClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -126,8 +121,8 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response)
|
|||
|
||||
// Delete delete the connectiontype.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the name of connectiontype.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the name of connectiontype.
|
||||
func (client ConnectionTypeClient) Delete(resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -198,8 +193,8 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result
|
|||
|
||||
// Get retrieve the connectiontype identified by connectiontype name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. connectionTypeName is the name of connectiontype.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// connectionTypeName is the name of connectiontype.
|
||||
func (client ConnectionTypeClient) Get(resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -271,8 +266,7 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con
|
|||
|
||||
// ListByAutomationAccount retrieve a list of connectiontypes.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ConnectionTypeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionTypeListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -364,3 +358,48 @@ func (client ConnectionTypeClient) ListByAutomationAccountNextResults(lastResult
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ConnectionTypeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan ConnectionType, <-chan error) {
|
||||
resultChan := make(chan ConnectionType)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
|
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go
generated
vendored
80
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// CredentialClient is the composite Swagger json for Azure Automation Client
|
||||
// CredentialClient is the automation Client
|
||||
type CredentialClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,18 +34,16 @@ func NewCredentialClient(subscriptionID string) CredentialClient {
|
|||
return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCredentialClientWithBaseURI creates an instance of the CredentialClient
|
||||
// client.
|
||||
// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client.
|
||||
func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient {
|
||||
return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the parameters supplied to the
|
||||
// create or update credential operation. parameters is the parameters supplied
|
||||
// to the create or update credential operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the parameters supplied to the create or update credential operation. parameters is the parameters supplied to
|
||||
// the create or update credential operation.
|
||||
func (client CredentialClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -126,8 +123,8 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res
|
|||
|
||||
// Delete delete the credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the name of credential.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the name of credential.
|
||||
func (client CredentialClient) Delete(resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -198,8 +195,8 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto
|
|||
|
||||
// Get retrieve the credential identified by credential name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the name of credential.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the name of credential.
|
||||
func (client CredentialClient) Get(resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -271,8 +268,7 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent
|
|||
|
||||
// ListByAutomationAccount retrieve a list of credentials.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client CredentialClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CredentialListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -365,12 +361,56 @@ func (client CredentialClient) ListByAutomationAccountNextResults(lastResults Cr
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client CredentialClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Credential, <-chan error) {
|
||||
resultChan := make(chan Credential)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update a credential.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. credentialName is the parameters supplied to the
|
||||
// Update credential operation. parameters is the parameters supplied to the
|
||||
// Update credential operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName
|
||||
// is the parameters supplied to the Update credential operation. parameters is the parameters supplied to the Update
|
||||
// credential operation.
|
||||
func (client CredentialClient) Update(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
81
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go
generated
vendored
81
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go
generated
vendored
|
@ -14,42 +14,36 @@ 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.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.
|
||||
// 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"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// DscCompilationJobClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// DscCompilationJobClient is the automation Client
|
||||
type DscCompilationJobClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscCompilationJobClient creates an instance of the
|
||||
// DscCompilationJobClient client.
|
||||
// NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client.
|
||||
func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient {
|
||||
return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscCompilationJobClientWithBaseURI creates an instance of the
|
||||
// DscCompilationJobClient client.
|
||||
// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client.
|
||||
func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient {
|
||||
return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates the Dsc compilation job of the configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. compilationJobID is the the DSC configuration Id.
|
||||
// parameters is the parameters supplied to the create compilation job
|
||||
// operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID
|
||||
// is the the DSC configuration Id. parameters is the parameters supplied to the create compilation job operation.
|
||||
func (client DscCompilationJobClient) Create(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -126,9 +120,8 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu
|
|||
|
||||
// Get retrieve the Dsc configuration compilation job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. compilationJobID is the Dsc configuration
|
||||
// compilation job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID
|
||||
// is the Dsc configuration compilation job id.
|
||||
func (client DscCompilationJobClient) Get(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -200,9 +193,8 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result
|
|||
|
||||
// GetStream retrieve the job stream identified by job stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. jobStreamID is the job stream
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. jobStreamID is the job stream id.
|
||||
func (client DscCompilationJobClient) GetStream(resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -275,8 +267,8 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r
|
|||
|
||||
// ListByAutomationAccount retrieve a list of dsc compilation jobs.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscCompilationJobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -371,3 +363,48 @@ func (client DscCompilationJobClient) ListByAutomationAccountNextResults(lastRes
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscCompilationJobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscCompilationJob, <-chan error) {
|
||||
resultChan := make(chan DscCompilationJob)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
|
84
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go
generated
vendored
84
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,30 +24,26 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// DscConfigurationClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// DscConfigurationClient is the automation Client
|
||||
type DscConfigurationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscConfigurationClient creates an instance of the DscConfigurationClient
|
||||
// client.
|
||||
// NewDscConfigurationClient creates an instance of the DscConfigurationClient client.
|
||||
func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient {
|
||||
return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscConfigurationClientWithBaseURI creates an instance of the
|
||||
// DscConfigurationClient client.
|
||||
// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client.
|
||||
func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient {
|
||||
return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create the configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the create or update
|
||||
// parameters for configuration. parameters is the create or update parameters
|
||||
// for configuration.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the create or update parameters for configuration. parameters is the create or update
|
||||
// parameters for configuration.
|
||||
func (client DscConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -131,8 +126,8 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response
|
|||
|
||||
// Delete delete the dsc configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) Delete(resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -203,8 +198,8 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul
|
|||
|
||||
// Get retrieve the configuration identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) Get(resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -274,11 +269,10 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D
|
|||
return
|
||||
}
|
||||
|
||||
// GetContent retrieve the configuration script identified by configuration
|
||||
// name.
|
||||
// GetContent retrieve the configuration script identified by configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. configurationName is the configuration name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// configurationName is the configuration name.
|
||||
func (client DscConfigurationClient) GetContent(resourceGroupName string, automationAccountName string, configurationName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -349,8 +343,7 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r
|
|||
|
||||
// ListByAutomationAccount retrieve a list of configurations.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client DscConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result DscConfigurationListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -442,3 +435,48 @@ func (client DscConfigurationClient) ListByAutomationAccountNextResults(lastResu
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan DscConfiguration, <-chan error) {
|
||||
resultChan := make(chan DscConfiguration)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
|
69
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go
generated
vendored
69
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// DscNodeClient is the composite Swagger json for Azure Automation Client
|
||||
// DscNodeClient is the automation Client
|
||||
type DscNodeClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,8 +41,8 @@ func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeC
|
|||
|
||||
// Delete delete the dsc node identified by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. nodeID is the node id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the node
|
||||
// id.
|
||||
func (client DscNodeClient) Delete(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -115,8 +114,8 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode
|
|||
|
||||
// Get retrieve the dsc node identified by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the node id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// node id.
|
||||
func (client DscNodeClient) Get(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -188,8 +187,8 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e
|
|||
|
||||
// ListByAutomationAccount retrieve a list of dsc nodes.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscNodeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -285,11 +284,55 @@ func (client DscNodeClient) ListByAutomationAccountNextResults(lastResults DscNo
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscNodeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNode, <-chan error) {
|
||||
resultChan := make(chan DscNode)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update the dsc node.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is parameters supplied to the update dsc
|
||||
// node. parameters is parameters supplied to the update dsc node.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is
|
||||
// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node.
|
||||
func (client DscNodeClient) Update(resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
83
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go
generated
vendored
83
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,31 +24,26 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// DscNodeConfigurationClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// DscNodeConfigurationClient is the automation Client
|
||||
type DscNodeConfigurationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDscNodeConfigurationClient creates an instance of the
|
||||
// DscNodeConfigurationClient client.
|
||||
// NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client.
|
||||
func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient {
|
||||
return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDscNodeConfigurationClientWithBaseURI creates an instance of the
|
||||
// DscNodeConfigurationClient client.
|
||||
// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client.
|
||||
func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient {
|
||||
return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create the node configuration identified by node
|
||||
// configuration name.
|
||||
// CreateOrUpdate create the node configuration identified by node configuration name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the create or update
|
||||
// parameters for configuration. parameters is the create or update parameters
|
||||
// for configuration.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update
|
||||
// parameters for configuration.
|
||||
func (client DscNodeConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -132,9 +126,8 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp
|
|||
|
||||
// Delete delete the Dsc node configurations by node configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the Dsc node configuration
|
||||
// name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the Dsc node configuration name.
|
||||
func (client DscNodeConfigurationClient) Delete(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -205,9 +198,8 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r
|
|||
|
||||
// Get retrieve the Dsc node configurations by node configuration.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeConfigurationName is the Dsc node configuration
|
||||
// name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// nodeConfigurationName is the Dsc node configuration name.
|
||||
func (client DscNodeConfigurationClient) Get(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -279,8 +271,8 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu
|
|||
|
||||
// ListByAutomationAccount retrieve a list of dsc node configurations.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client DscNodeConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -375,3 +367,48 @@ func (client DscNodeConfigurationClient) ListByAutomationAccountNextResults(last
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNodeConfiguration, <-chan error) {
|
||||
resultChan := make(chan DscNodeConfiguration)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
|
15
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go
generated
vendored
15
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// FieldsClient is the composite Swagger json for Azure Automation Client
|
||||
// FieldsClient is the automation Client
|
||||
type FieldsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -40,12 +39,10 @@ func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsCli
|
|||
return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListByType retrieve a list of fields of a given type identified by module
|
||||
// name.
|
||||
// ListByType retrieve a list of fields of a given type identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. typeName is the
|
||||
// name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. typeName is the name of type.
|
||||
func (client FieldsClient) ListByType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go
generated
vendored
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,29 +24,25 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// HybridRunbookWorkerGroupClient is the composite Swagger json for Azure
|
||||
// Automation Client
|
||||
// HybridRunbookWorkerGroupClient is the automation Client
|
||||
type HybridRunbookWorkerGroupClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewHybridRunbookWorkerGroupClient creates an instance of the
|
||||
// HybridRunbookWorkerGroupClient client.
|
||||
// NewHybridRunbookWorkerGroupClient creates an instance of the HybridRunbookWorkerGroupClient client.
|
||||
func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorkerGroupClient {
|
||||
return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the
|
||||
// HybridRunbookWorkerGroupClient client.
|
||||
// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client.
|
||||
func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient {
|
||||
return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Delete delete a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name
|
||||
// resourceGroupName is the resource group name. automationAccountName is automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name
|
||||
func (client HybridRunbookWorkerGroupClient) Delete(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -118,9 +113,8 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response
|
|||
|
||||
// Get retrieve a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name
|
||||
func (client HybridRunbookWorkerGroupClient) Get(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -192,8 +186,7 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) (
|
|||
|
||||
// ListByAutomationAccount retrieve a list of hybrid runbook worker groups.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -286,11 +279,55 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountNextResults(
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan HybridRunbookWorkerGroup, <-chan error) {
|
||||
resultChan := make(chan HybridRunbookWorkerGroup)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update a hybrid runbook worker group.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook
|
||||
// worker group name parameters is the hybrid runbook worker group
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker group
|
||||
func (client HybridRunbookWorkerGroupClient) Update(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
90
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go
generated
vendored
90
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go
generated
vendored
|
@ -14,19 +14,18 @@ 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.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.
|
||||
// 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"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobClient is the composite Swagger json for Azure Automation Client
|
||||
// JobClient is the automation Client
|
||||
type JobClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -43,9 +42,8 @@ func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient {
|
|||
|
||||
// Create create a job of the runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. parameters is the parameters
|
||||
// supplied to the create job operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. parameters is the parameters supplied to the create job operation.
|
||||
func (client JobClient) Create(resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -122,8 +120,8 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er
|
|||
|
||||
// Get retrieve the job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Get(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -195,8 +193,8 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error
|
|||
|
||||
// GetOutput retrieve the job output identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) GetOutput(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -265,11 +263,10 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos
|
|||
return
|
||||
}
|
||||
|
||||
// GetRunbookContent retrieve the runbook content of the job identified by job
|
||||
// id.
|
||||
// GetRunbookContent retrieve the runbook content of the job identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) GetRunbookContent(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -340,8 +337,8 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result
|
|||
|
||||
// ListByAutomationAccount retrieve a list of jobs.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client JobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result JobListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -437,10 +434,55 @@ func (client JobClient) ListByAutomationAccountNextResults(lastResults JobListRe
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client JobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Job, <-chan error) {
|
||||
resultChan := make(chan Job)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Resume resume the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Resume(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -511,8 +553,8 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re
|
|||
|
||||
// Stop stop the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Stop(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -583,8 +625,8 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp
|
|||
|
||||
// Suspend suspend the job identified by jobId.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id.
|
||||
func (client JobClient) Suspend(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
73
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go
generated
vendored
73
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go
generated
vendored
|
@ -14,19 +14,18 @@ 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.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.
|
||||
// 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"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// JobScheduleClient is the composite Swagger json for Azure Automation Client
|
||||
// JobScheduleClient is the automation Client
|
||||
type JobScheduleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,17 +35,15 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient {
|
|||
return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient
|
||||
// client.
|
||||
// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client.
|
||||
func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient {
|
||||
return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create a job schedule.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name. parameters
|
||||
// is the parameters supplied to the create job schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name. parameters is the parameters supplied to the create job schedule operation.
|
||||
func (client JobScheduleClient) Create(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -125,8 +122,8 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job
|
|||
|
||||
// Delete delete the job schedule identified by job schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name.
|
||||
func (client JobScheduleClient) Delete(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -197,8 +194,8 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut
|
|||
|
||||
// Get retrieve the job schedule identified by job schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobScheduleID is the job schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is
|
||||
// the job schedule name.
|
||||
func (client JobScheduleClient) Get(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -270,8 +267,7 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch
|
|||
|
||||
// ListByAutomationAccount retrieve a list of job schedules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client JobScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result JobScheduleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -363,3 +359,48 @@ func (client JobScheduleClient) ListByAutomationAccountNextResults(lastResults J
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client JobScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan JobSchedule, <-chan error) {
|
||||
resultChan := make(chan JobSchedule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
|
65
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go
generated
vendored
65
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// JobStreamClient is the composite Swagger json for Azure Automation Client
|
||||
// JobStreamClient is the automation Client
|
||||
type JobStreamClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,17 +34,15 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient {
|
|||
return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient
|
||||
// client.
|
||||
// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client.
|
||||
func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient {
|
||||
return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the job stream identified by job stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job id. jobStreamID is the job stream
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// id. jobStreamID is the job stream id.
|
||||
func (client JobStreamClient) Get(resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -118,9 +115,8 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea
|
|||
|
||||
// ListByJob retrieve a list of jobs streams identified by job id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. jobID is the job Id. filter is the filter to apply
|
||||
// on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job
|
||||
// Id. filter is the filter to apply on the operation.
|
||||
func (client JobStreamClient) ListByJob(resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -216,3 +212,48 @@ func (client JobStreamClient) ListByJobNextResults(lastResults JobStreamListResu
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByJobComplete gets all elements from the list without paging.
|
||||
func (client JobStreamClient) ListByJobComplete(resourceGroupName string, automationAccountName string, jobID string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) {
|
||||
resultChan := make(chan JobStream)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByJob(resourceGroupName, automationAccountName, jobID, filter)
|
||||
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.ListByJobNextResults(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
|
||||
}
|
||||
|
|
421
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go
generated
vendored
421
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go
generated
vendored
|
@ -14,15 +14,14 @@ 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.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.
|
||||
// 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"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
@ -39,8 +38,7 @@ const (
|
|||
Unavailable AccountState = "Unavailable"
|
||||
)
|
||||
|
||||
// AgentRegistrationKeyName enumerates the values for agent registration key
|
||||
// name.
|
||||
// AgentRegistrationKeyName enumerates the values for agent registration key name.
|
||||
type AgentRegistrationKeyName string
|
||||
|
||||
const (
|
||||
|
@ -54,20 +52,17 @@ const (
|
|||
type ContentSourceType string
|
||||
|
||||
const (
|
||||
// EmbeddedContent specifies the embedded content state for content source
|
||||
// type.
|
||||
// EmbeddedContent specifies the embedded content state for content source type.
|
||||
EmbeddedContent ContentSourceType = "embeddedContent"
|
||||
// URI specifies the uri state for content source type.
|
||||
URI ContentSourceType = "uri"
|
||||
)
|
||||
|
||||
// DscConfigurationProvisioningState enumerates the values for dsc
|
||||
// configuration provisioning state.
|
||||
// DscConfigurationProvisioningState enumerates the values for dsc configuration provisioning state.
|
||||
type DscConfigurationProvisioningState string
|
||||
|
||||
const (
|
||||
// Succeeded specifies the succeeded state for dsc configuration
|
||||
// provisioning state.
|
||||
// Succeeded specifies the succeeded state for dsc configuration provisioning state.
|
||||
Succeeded DscConfigurationProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
|
@ -75,14 +70,11 @@ const (
|
|||
type DscConfigurationState string
|
||||
|
||||
const (
|
||||
// DscConfigurationStateEdit specifies the dsc configuration state edit
|
||||
// state for dsc configuration state.
|
||||
// DscConfigurationStateEdit specifies the dsc configuration state edit state for dsc configuration state.
|
||||
DscConfigurationStateEdit DscConfigurationState = "Edit"
|
||||
// DscConfigurationStateNew specifies the dsc configuration state new state
|
||||
// for dsc configuration state.
|
||||
// DscConfigurationStateNew specifies the dsc configuration state new state for dsc configuration state.
|
||||
DscConfigurationStateNew DscConfigurationState = "New"
|
||||
// DscConfigurationStatePublished specifies the dsc configuration state
|
||||
// published state for dsc configuration state.
|
||||
// DscConfigurationStatePublished specifies the dsc configuration state published state for dsc configuration state.
|
||||
DscConfigurationStatePublished DscConfigurationState = "Published"
|
||||
)
|
||||
|
||||
|
@ -104,8 +96,7 @@ const (
|
|||
Continue HTTPStatusCode = "Continue"
|
||||
// Created specifies the created state for http status code.
|
||||
Created HTTPStatusCode = "Created"
|
||||
// ExpectationFailed specifies the expectation failed state for http status
|
||||
// code.
|
||||
// ExpectationFailed specifies the expectation failed state for http status code.
|
||||
ExpectationFailed HTTPStatusCode = "ExpectationFailed"
|
||||
// Forbidden specifies the forbidden state for http status code.
|
||||
Forbidden HTTPStatusCode = "Forbidden"
|
||||
|
@ -115,29 +106,23 @@ const (
|
|||
GatewayTimeout HTTPStatusCode = "GatewayTimeout"
|
||||
// Gone specifies the gone state for http status code.
|
||||
Gone HTTPStatusCode = "Gone"
|
||||
// HTTPVersionNotSupported specifies the http version not supported state
|
||||
// for http status code.
|
||||
// HTTPVersionNotSupported specifies the http version not supported state for http status code.
|
||||
HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported"
|
||||
// InternalServerError specifies the internal server error state for http
|
||||
// status code.
|
||||
// InternalServerError specifies the internal server error state for http status code.
|
||||
InternalServerError HTTPStatusCode = "InternalServerError"
|
||||
// LengthRequired specifies the length required state for http status code.
|
||||
LengthRequired HTTPStatusCode = "LengthRequired"
|
||||
// MethodNotAllowed specifies the method not allowed state for http status
|
||||
// code.
|
||||
// MethodNotAllowed specifies the method not allowed state for http status code.
|
||||
MethodNotAllowed HTTPStatusCode = "MethodNotAllowed"
|
||||
// Moved specifies the moved state for http status code.
|
||||
Moved HTTPStatusCode = "Moved"
|
||||
// MovedPermanently specifies the moved permanently state for http status
|
||||
// code.
|
||||
// MovedPermanently specifies the moved permanently state for http status code.
|
||||
MovedPermanently HTTPStatusCode = "MovedPermanently"
|
||||
// MultipleChoices specifies the multiple choices state for http status
|
||||
// code.
|
||||
// MultipleChoices specifies the multiple choices state for http status code.
|
||||
MultipleChoices HTTPStatusCode = "MultipleChoices"
|
||||
// NoContent specifies the no content state for http status code.
|
||||
NoContent HTTPStatusCode = "NoContent"
|
||||
// NonAuthoritativeInformation specifies the non authoritative information
|
||||
// state for http status code.
|
||||
// NonAuthoritativeInformation specifies the non authoritative information state for http status code.
|
||||
NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation"
|
||||
// NotAcceptable specifies the not acceptable state for http status code.
|
||||
NotAcceptable HTTPStatusCode = "NotAcceptable"
|
||||
|
@ -151,55 +136,43 @@ const (
|
|||
OK HTTPStatusCode = "OK"
|
||||
// PartialContent specifies the partial content state for http status code.
|
||||
PartialContent HTTPStatusCode = "PartialContent"
|
||||
// PaymentRequired specifies the payment required state for http status
|
||||
// code.
|
||||
// PaymentRequired specifies the payment required state for http status code.
|
||||
PaymentRequired HTTPStatusCode = "PaymentRequired"
|
||||
// PreconditionFailed specifies the precondition failed state for http
|
||||
// status code.
|
||||
// PreconditionFailed specifies the precondition failed state for http status code.
|
||||
PreconditionFailed HTTPStatusCode = "PreconditionFailed"
|
||||
// ProxyAuthenticationRequired specifies the proxy authentication required
|
||||
// state for http status code.
|
||||
// ProxyAuthenticationRequired specifies the proxy authentication required state for http status code.
|
||||
ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired"
|
||||
// Redirect specifies the redirect state for http status code.
|
||||
Redirect HTTPStatusCode = "Redirect"
|
||||
// RedirectKeepVerb specifies the redirect keep verb state for http status
|
||||
// code.
|
||||
// RedirectKeepVerb specifies the redirect keep verb state for http status code.
|
||||
RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb"
|
||||
// RedirectMethod specifies the redirect method state for http status code.
|
||||
RedirectMethod HTTPStatusCode = "RedirectMethod"
|
||||
// RequestedRangeNotSatisfiable specifies the requested range not
|
||||
// satisfiable state for http status code.
|
||||
// RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code.
|
||||
RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable"
|
||||
// RequestEntityTooLarge specifies the request entity too large state for
|
||||
// http status code.
|
||||
// RequestEntityTooLarge specifies the request entity too large state for http status code.
|
||||
RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge"
|
||||
// RequestTimeout specifies the request timeout state for http status code.
|
||||
RequestTimeout HTTPStatusCode = "RequestTimeout"
|
||||
// RequestURITooLong specifies the request uri too long state for http
|
||||
// status code.
|
||||
// RequestURITooLong specifies the request uri too long state for http status code.
|
||||
RequestURITooLong HTTPStatusCode = "RequestUriTooLong"
|
||||
// ResetContent specifies the reset content state for http status code.
|
||||
ResetContent HTTPStatusCode = "ResetContent"
|
||||
// SeeOther specifies the see other state for http status code.
|
||||
SeeOther HTTPStatusCode = "SeeOther"
|
||||
// ServiceUnavailable specifies the service unavailable state for http
|
||||
// status code.
|
||||
// ServiceUnavailable specifies the service unavailable state for http status code.
|
||||
ServiceUnavailable HTTPStatusCode = "ServiceUnavailable"
|
||||
// SwitchingProtocols specifies the switching protocols state for http
|
||||
// status code.
|
||||
// SwitchingProtocols specifies the switching protocols state for http status code.
|
||||
SwitchingProtocols HTTPStatusCode = "SwitchingProtocols"
|
||||
// TemporaryRedirect specifies the temporary redirect state for http status
|
||||
// code.
|
||||
// TemporaryRedirect specifies the temporary redirect state for http status code.
|
||||
TemporaryRedirect HTTPStatusCode = "TemporaryRedirect"
|
||||
// Unauthorized specifies the unauthorized state for http status code.
|
||||
Unauthorized HTTPStatusCode = "Unauthorized"
|
||||
// UnsupportedMediaType specifies the unsupported media type state for http
|
||||
// status code.
|
||||
// UnsupportedMediaType specifies the unsupported media type state for http status code.
|
||||
UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType"
|
||||
// Unused specifies the unused state for http status code.
|
||||
Unused HTTPStatusCode = "Unused"
|
||||
// UpgradeRequired specifies the upgrade required state for http status
|
||||
// code.
|
||||
// UpgradeRequired specifies the upgrade required state for http status code.
|
||||
UpgradeRequired HTTPStatusCode = "UpgradeRequired"
|
||||
// UseProxy specifies the use proxy state for http status code.
|
||||
UseProxy HTTPStatusCode = "UseProxy"
|
||||
|
@ -209,39 +182,31 @@ const (
|
|||
type JobStatus string
|
||||
|
||||
const (
|
||||
// JobStatusActivating specifies the job status activating state for job
|
||||
// status.
|
||||
// JobStatusActivating specifies the job status activating state for job status.
|
||||
JobStatusActivating JobStatus = "Activating"
|
||||
// JobStatusBlocked specifies the job status blocked state for job status.
|
||||
JobStatusBlocked JobStatus = "Blocked"
|
||||
// JobStatusCompleted specifies the job status completed state for job
|
||||
// status.
|
||||
// JobStatusCompleted specifies the job status completed state for job status.
|
||||
JobStatusCompleted JobStatus = "Completed"
|
||||
// JobStatusDisconnected specifies the job status disconnected state for
|
||||
// job status.
|
||||
// JobStatusDisconnected specifies the job status disconnected state for job status.
|
||||
JobStatusDisconnected JobStatus = "Disconnected"
|
||||
// JobStatusFailed specifies the job status failed state for job status.
|
||||
JobStatusFailed JobStatus = "Failed"
|
||||
// JobStatusNew specifies the job status new state for job status.
|
||||
JobStatusNew JobStatus = "New"
|
||||
// JobStatusRemoving specifies the job status removing state for job
|
||||
// status.
|
||||
// JobStatusRemoving specifies the job status removing state for job status.
|
||||
JobStatusRemoving JobStatus = "Removing"
|
||||
// JobStatusResuming specifies the job status resuming state for job
|
||||
// status.
|
||||
// JobStatusResuming specifies the job status resuming state for job status.
|
||||
JobStatusResuming JobStatus = "Resuming"
|
||||
// JobStatusRunning specifies the job status running state for job status.
|
||||
JobStatusRunning JobStatus = "Running"
|
||||
// JobStatusStopped specifies the job status stopped state for job status.
|
||||
JobStatusStopped JobStatus = "Stopped"
|
||||
// JobStatusStopping specifies the job status stopping state for job
|
||||
// status.
|
||||
// JobStatusStopping specifies the job status stopping state for job status.
|
||||
JobStatusStopping JobStatus = "Stopping"
|
||||
// JobStatusSuspended specifies the job status suspended state for job
|
||||
// status.
|
||||
// JobStatusSuspended specifies the job status suspended state for job status.
|
||||
JobStatusSuspended JobStatus = "Suspended"
|
||||
// JobStatusSuspending specifies the job status suspending state for job
|
||||
// status.
|
||||
// JobStatusSuspending specifies the job status suspending state for job status.
|
||||
JobStatusSuspending JobStatus = "Suspending"
|
||||
)
|
||||
|
||||
|
@ -269,72 +234,60 @@ const (
|
|||
type ModuleProvisioningState string
|
||||
|
||||
const (
|
||||
// ModuleProvisioningStateActivitiesStored specifies the module
|
||||
// provisioning state activities stored state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateActivitiesStored specifies the module provisioning state activities stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored"
|
||||
// ModuleProvisioningStateCancelled specifies the module provisioning state
|
||||
// cancelled state for module provisioning state.
|
||||
// ModuleProvisioningStateCancelled specifies the module provisioning state cancelled state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled"
|
||||
// ModuleProvisioningStateConnectionTypeImported specifies the module
|
||||
// provisioning state connection type imported state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateConnectionTypeImported specifies the module provisioning state connection type imported state
|
||||
// for module provisioning state.
|
||||
ModuleProvisioningStateConnectionTypeImported ModuleProvisioningState = "ConnectionTypeImported"
|
||||
// ModuleProvisioningStateContentDownloaded specifies the module
|
||||
// provisioning state content downloaded state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentDownloaded specifies the module provisioning state content downloaded state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded"
|
||||
// ModuleProvisioningStateContentRetrieved specifies the module
|
||||
// provisioning state content retrieved state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentRetrieved specifies the module provisioning state content retrieved state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved"
|
||||
// ModuleProvisioningStateContentStored specifies the module provisioning
|
||||
// state content stored state for module provisioning state.
|
||||
// ModuleProvisioningStateContentStored specifies the module provisioning state content stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentStored ModuleProvisioningState = "ContentStored"
|
||||
// ModuleProvisioningStateContentValidated specifies the module
|
||||
// provisioning state content validated state for module provisioning
|
||||
// state.
|
||||
// ModuleProvisioningStateContentValidated specifies the module provisioning state content validated state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated"
|
||||
// ModuleProvisioningStateCreated specifies the module provisioning state
|
||||
// created state for module provisioning state.
|
||||
// ModuleProvisioningStateCreated specifies the module provisioning state created state for module provisioning state.
|
||||
ModuleProvisioningStateCreated ModuleProvisioningState = "Created"
|
||||
// ModuleProvisioningStateCreating specifies the module provisioning state
|
||||
// creating state for module provisioning state.
|
||||
ModuleProvisioningStateCreating ModuleProvisioningState = "Creating"
|
||||
// ModuleProvisioningStateFailed specifies the module provisioning state
|
||||
// failed state for module provisioning state.
|
||||
ModuleProvisioningStateFailed ModuleProvisioningState = "Failed"
|
||||
// ModuleProvisioningStateModuleDataStored specifies the module
|
||||
// provisioning state module data stored state for module provisioning
|
||||
// ModuleProvisioningStateCreating specifies the module provisioning state creating state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateCreating ModuleProvisioningState = "Creating"
|
||||
// ModuleProvisioningStateFailed specifies the module provisioning state failed state for module provisioning state.
|
||||
ModuleProvisioningStateFailed ModuleProvisioningState = "Failed"
|
||||
// ModuleProvisioningStateModuleDataStored specifies the module provisioning state module data stored state for module
|
||||
// provisioning state.
|
||||
ModuleProvisioningStateModuleDataStored ModuleProvisioningState = "ModuleDataStored"
|
||||
// ModuleProvisioningStateModuleImportRunbookComplete specifies the module
|
||||
// provisioning state module import runbook complete state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateModuleImportRunbookComplete specifies the module provisioning state module import runbook
|
||||
// complete state for module provisioning state.
|
||||
ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete"
|
||||
// ModuleProvisioningStateRunningImportModuleRunbook specifies the module
|
||||
// provisioning state running import module runbook state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateRunningImportModuleRunbook specifies the module provisioning state running import module
|
||||
// runbook state for module provisioning state.
|
||||
ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook"
|
||||
// ModuleProvisioningStateStartingImportModuleRunbook specifies the module
|
||||
// provisioning state starting import module runbook state for module
|
||||
// provisioning state.
|
||||
// ModuleProvisioningStateStartingImportModuleRunbook specifies the module provisioning state starting import module
|
||||
// runbook state for module provisioning state.
|
||||
ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook"
|
||||
// ModuleProvisioningStateSucceeded specifies the module provisioning state
|
||||
// succeeded state for module provisioning state.
|
||||
// ModuleProvisioningStateSucceeded specifies the module provisioning state succeeded state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateSucceeded ModuleProvisioningState = "Succeeded"
|
||||
// ModuleProvisioningStateUpdating specifies the module provisioning state
|
||||
// updating state for module provisioning state.
|
||||
// ModuleProvisioningStateUpdating specifies the module provisioning state updating state for module provisioning
|
||||
// state.
|
||||
ModuleProvisioningStateUpdating ModuleProvisioningState = "Updating"
|
||||
)
|
||||
|
||||
// RunbookProvisioningState enumerates the values for runbook provisioning
|
||||
// state.
|
||||
// RunbookProvisioningState enumerates the values for runbook provisioning state.
|
||||
type RunbookProvisioningState string
|
||||
|
||||
const (
|
||||
// RunbookProvisioningStateSucceeded specifies the runbook provisioning
|
||||
// state succeeded state for runbook provisioning state.
|
||||
// RunbookProvisioningStateSucceeded specifies the runbook provisioning state succeeded state for runbook provisioning
|
||||
// state.
|
||||
RunbookProvisioningStateSucceeded RunbookProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
|
@ -342,13 +295,11 @@ const (
|
|||
type RunbookState string
|
||||
|
||||
const (
|
||||
// RunbookStateEdit specifies the runbook state edit state for runbook
|
||||
// state.
|
||||
// RunbookStateEdit specifies the runbook state edit state for runbook state.
|
||||
RunbookStateEdit RunbookState = "Edit"
|
||||
// RunbookStateNew specifies the runbook state new state for runbook state.
|
||||
RunbookStateNew RunbookState = "New"
|
||||
// RunbookStatePublished specifies the runbook state published state for
|
||||
// runbook state.
|
||||
// RunbookStatePublished specifies the runbook state published state for runbook state.
|
||||
RunbookStatePublished RunbookState = "Published"
|
||||
)
|
||||
|
||||
|
@ -358,16 +309,13 @@ type RunbookTypeEnum string
|
|||
const (
|
||||
// Graph specifies the graph state for runbook type enum.
|
||||
Graph RunbookTypeEnum = "Graph"
|
||||
// GraphPowerShell specifies the graph power shell state for runbook type
|
||||
// enum.
|
||||
// GraphPowerShell specifies the graph power shell state for runbook type enum.
|
||||
GraphPowerShell RunbookTypeEnum = "GraphPowerShell"
|
||||
// GraphPowerShellWorkflow specifies the graph power shell workflow state
|
||||
// for runbook type enum.
|
||||
// GraphPowerShellWorkflow specifies the graph power shell workflow state for runbook type enum.
|
||||
GraphPowerShellWorkflow RunbookTypeEnum = "GraphPowerShellWorkflow"
|
||||
// PowerShell specifies the power shell state for runbook type enum.
|
||||
PowerShell RunbookTypeEnum = "PowerShell"
|
||||
// PowerShellWorkflow specifies the power shell workflow state for runbook
|
||||
// type enum.
|
||||
// PowerShellWorkflow specifies the power shell workflow state for runbook type enum.
|
||||
PowerShellWorkflow RunbookTypeEnum = "PowerShellWorkflow"
|
||||
// Script specifies the script state for runbook type enum.
|
||||
Script RunbookTypeEnum = "Script"
|
||||
|
@ -431,8 +379,7 @@ type Account struct {
|
|||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update automation account operation.
|
||||
// AccountCreateOrUpdateParameters is the parameters supplied to the create or update automation account operation.
|
||||
type AccountCreateOrUpdateParameters struct {
|
||||
*AccountCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -440,8 +387,7 @@ type AccountCreateOrUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update account properties.
|
||||
// AccountCreateOrUpdateProperties is the parameters supplied to the create or update account properties.
|
||||
type AccountCreateOrUpdateProperties struct {
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
}
|
||||
|
@ -475,8 +421,7 @@ type AccountProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateParameters is the parameters supplied to the update automation
|
||||
// account operation.
|
||||
// AccountUpdateParameters is the parameters supplied to the update automation account operation.
|
||||
type AccountUpdateParameters struct {
|
||||
*AccountUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -484,8 +429,7 @@ type AccountUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateProperties is the parameters supplied to the update account
|
||||
// properties.
|
||||
// AccountUpdateProperties is the parameters supplied to the update account properties.
|
||||
type AccountUpdateProperties struct {
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
}
|
||||
|
@ -558,8 +502,7 @@ type AdvancedSchedule struct {
|
|||
MonthlyOccurrences *[]AdvancedScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"`
|
||||
}
|
||||
|
||||
// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced
|
||||
// schedule monthly occurrence.
|
||||
// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced schedule monthly occurrence.
|
||||
type AdvancedScheduleMonthlyOccurrence struct {
|
||||
Occurrence *int32 `json:"occurrence,omitempty"`
|
||||
Day ScheduleDay `json:"day,omitempty"`
|
||||
|
@ -580,8 +523,7 @@ type AgentRegistrationKeys struct {
|
|||
Secondary *string `json:"secondary,omitempty"`
|
||||
}
|
||||
|
||||
// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the
|
||||
// regenerate keys operation.
|
||||
// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the regenerate keys operation.
|
||||
type AgentRegistrationRegenerateKeyParameter struct {
|
||||
KeyName AgentRegistrationKeyName `json:"keyName,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -597,15 +539,14 @@ type Certificate struct {
|
|||
*CertificateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update or replace certificate operation.
|
||||
// CertificateCreateOrUpdateParameters is the parameters supplied to the create or update or replace certificate
|
||||
// operation.
|
||||
type CertificateCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CertificateCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateCreateOrUpdateProperties is the properties of the create
|
||||
// certificate operation.
|
||||
// CertificateCreateOrUpdateProperties is the properties of the create certificate operation.
|
||||
type CertificateCreateOrUpdateProperties struct {
|
||||
Base64Value *string `json:"base64Value,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
|
@ -613,8 +554,7 @@ type CertificateCreateOrUpdateProperties struct {
|
|||
IsExportable *bool `json:"isExportable,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateListResult is the response model for the list certificate
|
||||
// operation.
|
||||
// CertificateListResult is the response model for the list certificate operation.
|
||||
type CertificateListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Certificate `json:"value,omitempty"`
|
||||
|
@ -643,15 +583,13 @@ type CertificateProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateUpdateParameters is the parameters supplied to the update
|
||||
// certificate operation.
|
||||
// CertificateUpdateParameters is the parameters supplied to the update certificate operation.
|
||||
type CertificateUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CertificateUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CertificateUpdateProperties is the properties of the update certificate
|
||||
// operation
|
||||
// CertificateUpdateProperties is the properties of the update certificate operation
|
||||
type CertificateUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
@ -664,23 +602,20 @@ type Connection struct {
|
|||
*ConnectionProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update connection operation.
|
||||
// ConnectionCreateOrUpdateParameters is the parameters supplied to the create or update connection operation.
|
||||
type ConnectionCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionCreateOrUpdateProperties is the properties of the create
|
||||
// connection properties
|
||||
// ConnectionCreateOrUpdateProperties is the properties of the create connection properties
|
||||
type ConnectionCreateOrUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
ConnectionType *ConnectionTypeAssociationProperty `json:"connectionType,omitempty"`
|
||||
FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionListResult is the response model for the list connection
|
||||
// operation.
|
||||
// ConnectionListResult is the response model for the list connection operation.
|
||||
type ConnectionListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Connection `json:"value,omitempty"`
|
||||
|
@ -716,28 +651,24 @@ type ConnectionType struct {
|
|||
*ConnectionTypeProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeAssociationProperty is the connection type property associated
|
||||
// with the entity.
|
||||
// ConnectionTypeAssociationProperty is the connection type property associated with the entity.
|
||||
type ConnectionTypeAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the
|
||||
// create or update connection type operation.
|
||||
// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the create or update connection type operation.
|
||||
type ConnectionTypeCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionTypeCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeCreateOrUpdateProperties is the properties of the create
|
||||
// connection type.
|
||||
// ConnectionTypeCreateOrUpdateProperties is the properties of the create connection type.
|
||||
type ConnectionTypeCreateOrUpdateProperties struct {
|
||||
IsGlobal *bool `json:"isGlobal,omitempty"`
|
||||
FieldDefinitions *map[string]*FieldDefinition `json:"fieldDefinitions,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionTypeListResult is the response model for the list connection type
|
||||
// operation.
|
||||
// ConnectionTypeListResult is the response model for the list connection type operation.
|
||||
type ConnectionTypeListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ConnectionType `json:"value,omitempty"`
|
||||
|
@ -765,15 +696,13 @@ type ConnectionTypeProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionUpdateParameters is the parameters supplied to the update
|
||||
// connection operation.
|
||||
// ConnectionUpdateParameters is the parameters supplied to the update connection operation.
|
||||
type ConnectionUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ConnectionUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ConnectionUpdateProperties is the properties of the update connection
|
||||
// operation.
|
||||
// ConnectionUpdateProperties is the properties of the update connection operation.
|
||||
type ConnectionUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"`
|
||||
|
@ -808,23 +737,20 @@ type Credential struct {
|
|||
*CredentialProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialCreateOrUpdateParameters is the parameters supplied to the create
|
||||
// or update credential operation.
|
||||
// CredentialCreateOrUpdateParameters is the parameters supplied to the create or update credential operation.
|
||||
type CredentialCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CredentialCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialCreateOrUpdateProperties is the properties of the create
|
||||
// cerdential operation.
|
||||
// CredentialCreateOrUpdateProperties is the properties of the create cerdential operation.
|
||||
type CredentialCreateOrUpdateProperties struct {
|
||||
UserName *string `json:"userName,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialListResult is the response model for the list credential
|
||||
// operation.
|
||||
// CredentialListResult is the response model for the list credential operation.
|
||||
type CredentialListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Credential `json:"value,omitempty"`
|
||||
|
@ -851,8 +777,7 @@ type CredentialProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialUpdateParameters is the parameters supplied to the Update
|
||||
// credential operation.
|
||||
// CredentialUpdateParameters is the parameters supplied to the Update credential operation.
|
||||
type CredentialUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*CredentialUpdateProperties `json:"properties,omitempty"`
|
||||
|
@ -872,8 +797,7 @@ type DscCompilationJob struct {
|
|||
*DscCompilationJobProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobCreateParameters is the parameters supplied to the create
|
||||
// compilation job operation.
|
||||
// DscCompilationJobCreateParameters is the parameters supplied to the create compilation job operation.
|
||||
type DscCompilationJobCreateParameters struct {
|
||||
*DscCompilationJobCreateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -881,15 +805,13 @@ type DscCompilationJobCreateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobCreateProperties is the parameters supplied to the create
|
||||
// compilation job operation.
|
||||
// DscCompilationJobCreateProperties is the parameters supplied to the create compilation job operation.
|
||||
type DscCompilationJobCreateProperties struct {
|
||||
Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// DscCompilationJobListResult is the response model for the list job
|
||||
// operation.
|
||||
// DscCompilationJobListResult is the response model for the list job operation.
|
||||
type DscCompilationJobListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscCompilationJob `json:"value,omitempty"`
|
||||
|
@ -936,14 +858,12 @@ type DscConfiguration struct {
|
|||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationAssociationProperty is the Dsc configuration property
|
||||
// associated with the entity.
|
||||
// DscConfigurationAssociationProperty is the Dsc configuration property associated with the entity.
|
||||
type DscConfigurationAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the
|
||||
// create or update configuration operation.
|
||||
// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update configuration operation.
|
||||
type DscConfigurationCreateOrUpdateParameters struct {
|
||||
*DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -951,8 +871,7 @@ type DscConfigurationCreateOrUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationCreateOrUpdateProperties is the properties to create or
|
||||
// update configuration.
|
||||
// DscConfigurationCreateOrUpdateProperties is the properties to create or update configuration.
|
||||
type DscConfigurationCreateOrUpdateProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
|
@ -961,8 +880,7 @@ type DscConfigurationCreateOrUpdateProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// DscConfigurationListResult is the response model for the list configuration
|
||||
// operation.
|
||||
// DscConfigurationListResult is the response model for the list configuration operation.
|
||||
type DscConfigurationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscConfiguration `json:"value,omitempty"`
|
||||
|
@ -1041,22 +959,20 @@ type DscNodeConfiguration struct {
|
|||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration
|
||||
// property associated with the entity.
|
||||
// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration property associated with the entity.
|
||||
type DscNodeConfigurationAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to
|
||||
// the create or update node configuration operation.
|
||||
// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update node configuration
|
||||
// operation.
|
||||
type DscNodeConfigurationCreateOrUpdateParameters struct {
|
||||
Source *ContentSource `json:"source,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeConfigurationListResult is the response model for the list job
|
||||
// operation.
|
||||
// DscNodeConfigurationListResult is the response model for the list job operation.
|
||||
type DscNodeConfigurationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscNodeConfiguration `json:"value,omitempty"`
|
||||
|
@ -1118,8 +1034,7 @@ type DscNodeReport struct {
|
|||
RawErrors *string `json:"rawErrors,omitempty"`
|
||||
}
|
||||
|
||||
// DscNodeReportListResult is the response model for the list dsc nodes
|
||||
// operation.
|
||||
// DscNodeReportListResult is the response model for the list dsc nodes operation.
|
||||
type DscNodeReportListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]DscNodeReport `json:"value,omitempty"`
|
||||
|
@ -1138,8 +1053,7 @@ func (client DscNodeReportListResult) DscNodeReportListResultPreparer() (*http.R
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// DscNodeUpdateParameters is the parameters supplied to the update dsc node
|
||||
// operation.
|
||||
// DscNodeUpdateParameters is the parameters supplied to the update dsc node operation.
|
||||
type DscNodeUpdateParameters struct {
|
||||
NodeID *string `json:"nodeId,omitempty"`
|
||||
NodeConfiguration *DscNodeConfigurationAssociationProperty `json:"nodeConfiguration,omitempty"`
|
||||
|
@ -1203,8 +1117,7 @@ type HybridRunbookWorkerGroup struct {
|
|||
Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
|
||||
}
|
||||
|
||||
// HybridRunbookWorkerGroupsListResult is the response model for the list
|
||||
// hybrid runbook worker groups.
|
||||
// HybridRunbookWorkerGroupsListResult is the response model for the list hybrid runbook worker groups.
|
||||
type HybridRunbookWorkerGroupsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]HybridRunbookWorkerGroup `json:"value,omitempty"`
|
||||
|
@ -1223,8 +1136,7 @@ func (client HybridRunbookWorkerGroupsListResult) HybridRunbookWorkerGroupsListR
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the
|
||||
// update operation.
|
||||
// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the update operation.
|
||||
type HybridRunbookWorkerGroupUpdateParameters struct {
|
||||
Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"`
|
||||
}
|
||||
|
@ -1294,14 +1206,12 @@ type JobSchedule struct {
|
|||
*JobScheduleProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleCreateParameters is the parameters supplied to the create job
|
||||
// schedule operation.
|
||||
// JobScheduleCreateParameters is the parameters supplied to the create job schedule operation.
|
||||
type JobScheduleCreateParameters struct {
|
||||
*JobScheduleCreateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleCreateProperties is the parameters supplied to the create job
|
||||
// schedule operation.
|
||||
// JobScheduleCreateProperties is the parameters supplied to the create job schedule operation.
|
||||
type JobScheduleCreateProperties struct {
|
||||
Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"`
|
||||
Runbook *RunbookAssociationProperty `json:"runbook,omitempty"`
|
||||
|
@ -1309,8 +1219,7 @@ type JobScheduleCreateProperties struct {
|
|||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// JobScheduleListResult is the response model for the list job schedule
|
||||
// operation.
|
||||
// JobScheduleListResult is the response model for the list job schedule operation.
|
||||
type JobScheduleListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]JobSchedule `json:"value,omitempty"`
|
||||
|
@ -1386,8 +1295,7 @@ type Module struct {
|
|||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update module operation.
|
||||
// ModuleCreateOrUpdateParameters is the parameters supplied to the create or update module operation.
|
||||
type ModuleCreateOrUpdateParameters struct {
|
||||
*ModuleCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -1395,8 +1303,7 @@ type ModuleCreateOrUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update module properties.
|
||||
// ModuleCreateOrUpdateProperties is the parameters supplied to the create or update module properties.
|
||||
type ModuleCreateOrUpdateProperties struct {
|
||||
ContentLink *ContentLink `json:"contentLink,omitempty"`
|
||||
}
|
||||
|
@ -1440,8 +1347,7 @@ type ModuleProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ModuleUpdateParameters is the parameters supplied to the update module
|
||||
// operation.
|
||||
// ModuleUpdateParameters is the parameters supplied to the update module operation.
|
||||
type ModuleUpdateParameters struct {
|
||||
*ModuleUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -1467,8 +1373,7 @@ type OperationDisplay struct {
|
|||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is the response model for the list of Automation
|
||||
// operations
|
||||
// OperationListResult is the response model for the list of Automation operations
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
|
@ -1489,8 +1394,7 @@ type Resource struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunAsCredentialAssociationProperty is definition of runas credential to use
|
||||
// for hybrid worker.
|
||||
// RunAsCredentialAssociationProperty is definition of runas credential to use for hybrid worker.
|
||||
type RunAsCredentialAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
@ -1507,14 +1411,27 @@ type Runbook struct {
|
|||
Etag *string `json:"etag,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookAssociationProperty is the runbook property associated with the
|
||||
// entity.
|
||||
// RunbookAssociationProperty is the runbook property associated with the entity.
|
||||
type RunbookAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update runbook operation.
|
||||
// RunbookCreateOrUpdateDraftParameters is the parameters supplied to the create or update runbook operation.
|
||||
type RunbookCreateOrUpdateDraftParameters struct {
|
||||
RunbookContent *string `json:"runbookContent,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateDraftProperties is the parameters supplied to the create or update dratft runbook properties.
|
||||
type RunbookCreateOrUpdateDraftProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
RunbookType RunbookTypeEnum `json:"runbookType,omitempty"`
|
||||
Draft *RunbookDraft `json:"draft,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
LogActivityTrace *int32 `json:"logActivityTrace,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateParameters is the parameters supplied to the create or update runbook operation.
|
||||
type RunbookCreateOrUpdateParameters struct {
|
||||
*RunbookCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -1522,8 +1439,7 @@ type RunbookCreateOrUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update runbook properties.
|
||||
// RunbookCreateOrUpdateProperties is the parameters supplied to the create or update runbook properties.
|
||||
type RunbookCreateOrUpdateProperties struct {
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
LogProgress *bool `json:"logProgress,omitempty"`
|
||||
|
@ -1545,8 +1461,7 @@ type RunbookDraft struct {
|
|||
OutputTypes *[]string `json:"outputTypes,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookDraftUndoEditResult is the response model for the undoedit runbook
|
||||
// operation.
|
||||
// RunbookDraftUndoEditResult is the response model for the undoedit runbook operation.
|
||||
type RunbookDraftUndoEditResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
|
||||
|
@ -1599,8 +1514,7 @@ type RunbookProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookUpdateParameters is the parameters supplied to the update runbook
|
||||
// operation.
|
||||
// RunbookUpdateParameters is the parameters supplied to the update runbook operation.
|
||||
type RunbookUpdateParameters struct {
|
||||
*RunbookUpdateProperties `json:"properties,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -1608,8 +1522,7 @@ type RunbookUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// RunbookUpdateProperties is the parameters supplied to the update runbook
|
||||
// properties.
|
||||
// RunbookUpdateProperties is the parameters supplied to the update runbook properties.
|
||||
type RunbookUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
LogVerbose *bool `json:"logVerbose,omitempty"`
|
||||
|
@ -1625,21 +1538,18 @@ type Schedule struct {
|
|||
*ScheduleProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleAssociationProperty is the schedule property associated with the
|
||||
// entity.
|
||||
// ScheduleAssociationProperty is the schedule property associated with the entity.
|
||||
type ScheduleAssociationProperty struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update schedule operation.
|
||||
// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or update schedule operation.
|
||||
type ScheduleCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ScheduleCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or
|
||||
// update schedule operation.
|
||||
// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or update schedule operation.
|
||||
type ScheduleCreateOrUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
StartTime *date.Time `json:"startTime,omitempty"`
|
||||
|
@ -1687,15 +1597,13 @@ type ScheduleProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleUpdateParameters is the parameters supplied to the update schedule
|
||||
// operation.
|
||||
// ScheduleUpdateParameters is the parameters supplied to the update schedule operation.
|
||||
type ScheduleUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*ScheduleUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ScheduleUpdateProperties is the parameters supplied to the update schedule
|
||||
// operation.
|
||||
// ScheduleUpdateProperties is the parameters supplied to the update schedule operation.
|
||||
type ScheduleUpdateProperties struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
IsEnabled *bool `json:"isEnabled,omitempty"`
|
||||
|
@ -1717,8 +1625,7 @@ type Statistics struct {
|
|||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// StatisticsListResult is the response model for the list statistics
|
||||
// operation.
|
||||
// StatisticsListResult is the response model for the list statistics operation.
|
||||
type StatisticsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Statistics `json:"value,omitempty"`
|
||||
|
@ -1730,6 +1637,11 @@ type String struct {
|
|||
Value *string `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SubResource is the Sub Resource definition.
|
||||
type SubResource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// TestJob is definition of the test job.
|
||||
type TestJob struct {
|
||||
autorest.Response `json:"-"`
|
||||
|
@ -1745,8 +1657,7 @@ type TestJob struct {
|
|||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// TestJobCreateParameters is the parameters supplied to the create test job
|
||||
// operation.
|
||||
// TestJobCreateParameters is the parameters supplied to the create test job operation.
|
||||
type TestJobCreateParameters struct {
|
||||
RunbookName *string `json:"runbookName,omitempty"`
|
||||
Parameters *map[string]*string `json:"parameters,omitempty"`
|
||||
|
@ -1795,15 +1706,13 @@ type Variable struct {
|
|||
*VariableProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VariableCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update variable operation.
|
||||
// VariableCreateOrUpdateParameters is the parameters supplied to the create or update variable operation.
|
||||
type VariableCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*VariableCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// VariableCreateOrUpdateProperties is the properties of the create variable
|
||||
// operation.
|
||||
// VariableCreateOrUpdateProperties is the properties of the create variable operation.
|
||||
type VariableCreateOrUpdateProperties struct {
|
||||
Value *string `json:"value,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
|
@ -1838,8 +1747,7 @@ type VariableProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// VariableUpdateParameters is the parameters supplied to the update variable
|
||||
// operation.
|
||||
// VariableUpdateParameters is the parameters supplied to the update variable operation.
|
||||
type VariableUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*VariableUpdateProperties `json:"properties,omitempty"`
|
||||
|
@ -1859,15 +1767,13 @@ type Webhook struct {
|
|||
*WebhookProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookCreateOrUpdateParameters is the parameters supplied to the create or
|
||||
// update webhook operation.
|
||||
// WebhookCreateOrUpdateParameters is the parameters supplied to the create or update webhook operation.
|
||||
type WebhookCreateOrUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*WebhookCreateOrUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookCreateOrUpdateProperties is the properties of the create webhook
|
||||
// operation.
|
||||
// WebhookCreateOrUpdateProperties is the properties of the create webhook operation.
|
||||
type WebhookCreateOrUpdateProperties struct {
|
||||
IsEnabled *bool `json:"isEnabled,omitempty"`
|
||||
URI *string `json:"uri,omitempty"`
|
||||
|
@ -1910,8 +1816,7 @@ type WebhookProperties struct {
|
|||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// WebhookUpdateParameters is the parameters supplied to the update webhook
|
||||
// operation.
|
||||
// WebhookUpdateParameters is the parameters supplied to the update webhook operation.
|
||||
type WebhookUpdateParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*WebhookUpdateProperties `json:"properties,omitempty"`
|
||||
|
|
73
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go
generated
vendored
73
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ModuleClient is the composite Swagger json for Azure Automation Client
|
||||
// ModuleClient is the automation Client
|
||||
type ModuleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,9 +41,8 @@ func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleCli
|
|||
|
||||
// CreateOrUpdate create or Update the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. parameters is the
|
||||
// create or update parameters for module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. parameters is the create or update parameters for module.
|
||||
func (client ModuleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -127,8 +125,8 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result
|
|||
|
||||
// Delete delete the module by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the module name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the module name.
|
||||
func (client ModuleClient) Delete(resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -199,8 +197,8 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest
|
|||
|
||||
// Get retrieve the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the module name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the module name.
|
||||
func (client ModuleClient) Get(resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -272,8 +270,7 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err
|
|||
|
||||
// ListByAutomationAccount retrieve a list of modules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ModuleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ModuleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -366,11 +363,55 @@ func (client ModuleClient) ListByAutomationAccountNextResults(lastResults Module
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ModuleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Module, <-chan error) {
|
||||
resultChan := make(chan Module)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update the module identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. parameters is the
|
||||
// update parameters for module.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. parameters is the update parameters for module.
|
||||
func (client ModuleClient) Update(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
70
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go
generated
vendored
70
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// NodeReportsClient is the composite Swagger json for Azure Automation Client
|
||||
// NodeReportsClient is the automation Client
|
||||
type NodeReportsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,17 +34,15 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient {
|
|||
return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient
|
||||
// client.
|
||||
// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client.
|
||||
func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient {
|
||||
return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve the Dsc node report data by node id and report id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the Dsc node id. reportID is the report
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// Dsc node id. reportID is the report id.
|
||||
func (client NodeReportsClient) Get(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -118,9 +115,8 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod
|
|||
|
||||
// GetContent retrieve the Dsc node reports by node id and report id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the Dsc node id. reportID is the report
|
||||
// id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// Dsc node id. reportID is the report id.
|
||||
func (client NodeReportsClient) GetContent(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -192,9 +188,8 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result
|
|||
|
||||
// ListByNode retrieve the Dsc node report list by node id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. nodeID is the parameters supplied to the list
|
||||
// operation. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the
|
||||
// parameters supplied to the list operation. filter is the filter to apply on the operation.
|
||||
func (client NodeReportsClient) ListByNode(resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -290,3 +285,48 @@ func (client NodeReportsClient) ListByNodeNextResults(lastResults DscNodeReportL
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByNodeComplete gets all elements from the list without paging.
|
||||
func (client NodeReportsClient) ListByNodeComplete(resourceGroupName string, automationAccountName string, nodeID string, filter string, cancel <-chan struct{}) (<-chan DscNodeReport, <-chan error) {
|
||||
resultChan := make(chan DscNodeReport)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByNode(resourceGroupName, automationAccountName, nodeID, filter)
|
||||
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.ListByNodeNextResults(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
|
||||
}
|
||||
|
|
29
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go
generated
vendored
29
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,30 +24,25 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ObjectDataTypesClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// ObjectDataTypesClient is the automation Client
|
||||
type ObjectDataTypesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient
|
||||
// client.
|
||||
// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient client.
|
||||
func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient {
|
||||
return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewObjectDataTypesClientWithBaseURI creates an instance of the
|
||||
// ObjectDataTypesClient client.
|
||||
// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client.
|
||||
func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient {
|
||||
return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListFieldsByModuleAndType retrieve a list of fields of a given type
|
||||
// identified by module name.
|
||||
// ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. moduleName is the name of module. typeName is the
|
||||
// name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is
|
||||
// the name of module. typeName is the name of type.
|
||||
func (client ObjectDataTypesClient) ListFieldsByModuleAndType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -119,11 +113,10 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt
|
|||
return
|
||||
}
|
||||
|
||||
// ListFieldsByType retrieve a list of fields of a given type across all
|
||||
// accessible modules.
|
||||
// ListFieldsByType retrieve a list of fields of a given type across all accessible modules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. typeName is the name of type.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is the
|
||||
// name of type.
|
||||
func (client ObjectDataTypesClient) ListFieldsByType(resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
10
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go
generated
vendored
10
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,7 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the composite Swagger json for Azure Automation Client
|
||||
// OperationsClient is the automation Client
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
|||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
|
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go
generated
vendored
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// RunbookClient is the composite Swagger json for Azure Automation Client
|
||||
// RunbookClient is the automation Client
|
||||
type RunbookClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,9 +41,8 @@ func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookC
|
|||
|
||||
// CreateOrUpdate create the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. parameters is the
|
||||
// create or update parameters for runbook. Provide either content link for a
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. parameters is the create or update parameters for runbook. Provide either content link for a
|
||||
// published runbook or draft, not both.
|
||||
func (client RunbookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
|
@ -135,8 +133,8 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result
|
|||
|
||||
// Delete delete the runbook by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) Delete(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -207,8 +205,8 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores
|
|||
|
||||
// Get retrieve the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -280,8 +278,8 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e
|
|||
|
||||
// GetContent retrieve the content of runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -352,8 +350,7 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Rea
|
|||
|
||||
// ListByAutomationAccount retrieve a list of runbooks.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client RunbookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result RunbookListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -446,11 +443,55 @@ func (client RunbookClient) ListByAutomationAccountNextResults(lastResults Runbo
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client RunbookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) {
|
||||
resultChan := make(chan Runbook)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. parameters is the
|
||||
// update parameters for runbook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. parameters is the update parameters for runbook.
|
||||
func (client RunbookClient) Update(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
52
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go
generated
vendored
52
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -26,7 +25,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// RunbookDraftClient is the composite Swagger json for Azure Automation Client
|
||||
// RunbookDraftClient is the automation Client
|
||||
type RunbookDraftClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,21 +35,18 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient {
|
|||
return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRunbookDraftClientWithBaseURI creates an instance of the
|
||||
// RunbookDraftClient client.
|
||||
// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client.
|
||||
func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient {
|
||||
return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate updates the runbook draft with runbookStream as its content.
|
||||
// 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
|
||||
// CreateOrUpdate updates the runbook draft with runbookStream as its content. 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 resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. runbookContent is
|
||||
// the runbook draft content. runbookContent will be closed upon successful
|
||||
// return. Callers should ensure closure when receiving an error.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. runbookContent is the runbook draft content. runbookContent will be closed upon successful return.
|
||||
// Callers should ensure closure when receiving an error.
|
||||
func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadCloser, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -67,8 +63,10 @@ func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automa
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -138,8 +136,8 @@ func (client RunbookDraftClient) CreateOrUpdateResponder(resp *http.Response) (r
|
|||
|
||||
// Get retrieve the runbook draft identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -211,8 +209,8 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo
|
|||
|
||||
// GetContent retrieve the content of runbook draft identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -281,13 +279,11 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul
|
|||
return
|
||||
}
|
||||
|
||||
// Publish publish runbook draft. 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.
|
||||
// Publish publish runbook draft. 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 resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the parameters supplied to the
|
||||
// publish runbook operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the parameters supplied to the publish runbook operation.
|
||||
func (client RunbookDraftClient) Publish(resourceGroupName string, automationAccountName string, runbookName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) {
|
||||
resultChan := make(chan Runbook, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -304,8 +300,10 @@ func (client RunbookDraftClient) Publish(resourceGroupName string, automationAcc
|
|||
var err error
|
||||
var result Runbook
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -375,8 +373,8 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result R
|
|||
|
||||
// UndoEdit retrieve the runbook identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client RunbookDraftClient) UndoEdit(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
76
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go
generated
vendored
76
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ScheduleClient is the composite Swagger json for Azure Automation Client
|
||||
// ScheduleClient is the automation Client
|
||||
type ScheduleClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,17 +34,15 @@ func NewScheduleClient(subscriptionID string) ScheduleClient {
|
|||
return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient
|
||||
// client.
|
||||
// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client.
|
||||
func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient {
|
||||
return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a schedule.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name. parameters is
|
||||
// the parameters supplied to the create or update schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name. parameters is the parameters supplied to the create or update schedule operation.
|
||||
func (client ScheduleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -123,8 +120,8 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
|||
|
||||
// Delete delete the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name.
|
||||
func (client ScheduleClient) Delete(resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -195,8 +192,8 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore
|
|||
|
||||
// Get retrieve the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name.
|
||||
func (client ScheduleClient) Get(resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -268,8 +265,7 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule,
|
|||
|
||||
// ListByAutomationAccount retrieve a list of schedules.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client ScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ScheduleListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -362,11 +358,55 @@ func (client ScheduleClient) ListByAutomationAccountNextResults(lastResults Sche
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client ScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) {
|
||||
resultChan := make(chan Schedule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update the schedule identified by schedule name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. scheduleName is the schedule name. parameters is
|
||||
// the parameters supplied to the update schedule operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is
|
||||
// the schedule name. parameters is the parameters supplied to the update schedule operation.
|
||||
func (client ScheduleClient) Update(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
14
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go
generated
vendored
14
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// StatisticsClient is the composite Swagger json for Azure Automation Client
|
||||
// StatisticsClient is the automation Client
|
||||
type StatisticsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,16 +34,15 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient {
|
|||
return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient
|
||||
// client.
|
||||
// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client.
|
||||
func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient {
|
||||
return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// ListByAutomationAccount retrieve the statistics for the account.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client StatisticsClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result StatisticsListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
33
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go
generated
vendored
33
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// TestJobsClient is the composite Swagger json for Azure Automation Client
|
||||
// TestJobsClient is the automation Client
|
||||
type TestJobsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,18 +34,16 @@ func NewTestJobsClient(subscriptionID string) TestJobsClient {
|
|||
return NewTestJobsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient
|
||||
// client.
|
||||
// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient client.
|
||||
func NewTestJobsClientWithBaseURI(baseURI string, subscriptionID string) TestJobsClient {
|
||||
return TestJobsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create a test job of the runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the parameters supplied to the
|
||||
// create test job operation. parameters is the parameters supplied to the
|
||||
// create test job operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the parameters supplied to the create test job operation. parameters is the parameters supplied to the create test
|
||||
// job operation.
|
||||
func (client TestJobsClient) Create(resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -122,8 +119,8 @@ func (client TestJobsClient) CreateResponder(resp *http.Response) (result TestJo
|
|||
|
||||
// Get retrieve the test job for the specified runbook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -195,8 +192,8 @@ func (client TestJobsClient) GetResponder(resp *http.Response) (result TestJob,
|
|||
|
||||
// Resume resume the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Resume(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -267,8 +264,8 @@ func (client TestJobsClient) ResumeResponder(resp *http.Response) (result autore
|
|||
|
||||
// Stop stop the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Stop(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -339,8 +336,8 @@ func (client TestJobsClient) StopResponder(resp *http.Response) (result autorest
|
|||
|
||||
// Suspend suspend the test job.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name.
|
||||
func (client TestJobsClient) Suspend(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
72
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go
generated
vendored
72
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,29 +24,25 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// TestJobStreamsClient is the composite Swagger json for Azure Automation
|
||||
// Client
|
||||
// TestJobStreamsClient is the automation Client
|
||||
type TestJobStreamsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient
|
||||
// client.
|
||||
// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient client.
|
||||
func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient {
|
||||
return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewTestJobStreamsClientWithBaseURI creates an instance of the
|
||||
// TestJobStreamsClient client.
|
||||
// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client.
|
||||
func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient {
|
||||
return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get retrieve a test job streams identified by runbook name and stream id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. jobStreamID is the
|
||||
// job stream id.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. jobStreamID is the job stream id.
|
||||
func (client TestJobStreamsClient) Get(resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -118,12 +113,10 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job
|
|||
return
|
||||
}
|
||||
|
||||
// ListByTestJob retrieve a list of test job streams identified by runbook
|
||||
// name.
|
||||
// ListByTestJob retrieve a list of test job streams identified by runbook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. runbookName is the runbook name. filter is the
|
||||
// filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is
|
||||
// the runbook name. filter is the filter to apply on the operation.
|
||||
func (client TestJobStreamsClient) ListByTestJob(resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -219,3 +212,48 @@ func (client TestJobStreamsClient) ListByTestJobNextResults(lastResults JobStrea
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByTestJobComplete gets all elements from the list without paging.
|
||||
func (client TestJobStreamsClient) ListByTestJobComplete(resourceGroupName string, automationAccountName string, runbookName string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) {
|
||||
resultChan := make(chan JobStream)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByTestJob(resourceGroupName, automationAccountName, runbookName, filter)
|
||||
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.ListByTestJobNextResults(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
|
||||
}
|
||||
|
|
10
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go
generated
vendored
10
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// UsagesClient is the composite Swagger json for Azure Automation Client
|
||||
// UsagesClient is the automation Client
|
||||
type UsagesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,8 +41,7 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
|
|||
|
||||
// ListByAutomationAccount retrieve the usage for the account id.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client UsagesClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result UsageListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
76
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go
generated
vendored
76
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// VariableClient is the composite Swagger json for Azure Automation Client
|
||||
// VariableClient is the automation Client
|
||||
type VariableClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,17 +34,15 @@ func NewVariableClient(subscriptionID string) VariableClient {
|
|||
return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewVariableClientWithBaseURI creates an instance of the VariableClient
|
||||
// client.
|
||||
// NewVariableClientWithBaseURI creates an instance of the VariableClient client.
|
||||
func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient {
|
||||
return VariableClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create a variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the variable name. parameters is
|
||||
// the parameters supplied to the create or update variable operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the variable name. parameters is the parameters supplied to the create or update variable operation.
|
||||
func (client VariableClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -122,8 +119,8 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
|||
|
||||
// Delete delete the variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the name of variable.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the name of variable.
|
||||
func (client VariableClient) Delete(resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -194,8 +191,8 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore
|
|||
|
||||
// Get retrieve the variable identified by variable name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the name of variable.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the name of variable.
|
||||
func (client VariableClient) Get(resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -267,8 +264,7 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable,
|
|||
|
||||
// ListByAutomationAccount retrieve a list of variables.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client VariableClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result VariableListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -361,11 +357,55 @@ func (client VariableClient) ListByAutomationAccountNextResults(lastResults Vari
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client VariableClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Variable, <-chan error) {
|
||||
resultChan := make(chan Variable)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update a variable.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. variableName is the variable name. parameters is
|
||||
// the parameters supplied to the update variable operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is
|
||||
// the variable name. parameters is the parameters supplied to the update variable operation.
|
||||
func (client VariableClient) Update(resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-automation/2015-10-31"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-automation/2015-10-31"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go
generated
vendored
77
vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// WebhookClient is the composite Swagger json for Azure Automation Client
|
||||
// WebhookClient is the automation Client
|
||||
type WebhookClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -42,9 +41,8 @@ func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookC
|
|||
|
||||
// CreateOrUpdate create the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name. parameters is the
|
||||
// create or update parameters for webhook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name. parameters is the create or update parameters for webhook.
|
||||
func (client WebhookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -121,8 +119,8 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result
|
|||
|
||||
// Delete delete the webhook by name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name.
|
||||
func (client WebhookClient) Delete(resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -193,8 +191,7 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores
|
|||
|
||||
// GenerateURI generates a Uri for use in creating a webhook.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name.
|
||||
func (client WebhookClient) GenerateURI(resourceGroupName string, automationAccountName string) (result String, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -265,8 +262,8 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St
|
|||
|
||||
// Get retrieve the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name.
|
||||
func (client WebhookClient) Get(resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -338,8 +335,8 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e
|
|||
|
||||
// ListByAutomationAccount retrieve a list of webhooks.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. filter is the filter to apply on the operation.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the
|
||||
// filter to apply on the operation.
|
||||
func (client WebhookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result WebhookListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -435,11 +432,55 @@ func (client WebhookClient) ListByAutomationAccountNextResults(lastResults Webho
|
|||
return
|
||||
}
|
||||
|
||||
// ListByAutomationAccountComplete gets all elements from the list without paging.
|
||||
func (client WebhookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Webhook, <-chan error) {
|
||||
resultChan := make(chan Webhook)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter)
|
||||
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.ListByAutomationAccountNextResults(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
|
||||
}
|
||||
|
||||
// Update update the webhook identified by webhook name.
|
||||
//
|
||||
// resourceGroupName is the resource group name. automationAccountName is the
|
||||
// automation account name. webhookName is the webhook name. parameters is the
|
||||
// update parameters for webhook.
|
||||
// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is
|
||||
// the webhook name. parameters is the update parameters for webhook.
|
||||
func (client WebhookClient) Update(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
|
210
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go
generated
vendored
210
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -40,20 +39,16 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC
|
|||
return AccountClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a new Batch account with the specified parameters. Existing
|
||||
// accounts cannot be updated with this API and should instead be updated with
|
||||
// the Update Batch Account API. 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.
|
||||
// Create creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API
|
||||
// and should instead be updated with the Update Batch Account API. 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 that contains the new
|
||||
// Batch account. accountName is a name for the Batch account which must be
|
||||
// unique within the region. Batch account names must be between 3 and 24
|
||||
// characters in length and must use only numbers and lowercase letters. This
|
||||
// name is used as part of the DNS name that is used to access the Batch
|
||||
// service in the region in which the account is created. For example:
|
||||
// http://accountname.region.batch.azure.com/. parameters is additional
|
||||
// parameters for account creation.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is a name for the
|
||||
// Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in
|
||||
// length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to
|
||||
// access the Batch service in the region in which the account is created. For example:
|
||||
// http://accountname.region.batch.azure.com/. parameters is additional parameters for account creation.
|
||||
func (client AccountClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters, cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -66,12 +61,12 @@ func (client AccountClient) Create(resourceGroupName string, accountName string,
|
|||
{Target: "accountName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}},
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.AccountBaseProperties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.AutoStorage", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.AutoStorage.StorageAccountID", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
{Target: "parameters.AccountBaseProperties.KeyVaultReference", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.KeyVaultReference.ID", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.AccountBaseProperties.KeyVaultReference.URL", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.AccountCreateProperties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.AutoStorage", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.AutoStorage.StorageAccountID", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
{Target: "parameters.AccountCreateProperties.KeyVaultReference", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.KeyVaultReference.ID", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.AccountCreateProperties.KeyVaultReference.URL", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}},
|
||||
}}}}}); err != nil {
|
||||
errChan <- validation.NewErrorWithValidationError(err, "batch.AccountClient", "Create")
|
||||
|
@ -84,8 +79,10 @@ func (client AccountClient) Create(resourceGroupName string, accountName string,
|
|||
var err error
|
||||
var result Account
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -118,7 +115,7 @@ func (client AccountClient) CreatePreparer(resourceGroupName string, accountName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -154,13 +151,11 @@ func (client AccountClient) CreateResponder(resp *http.Response) (result Account
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes the specified Batch account. 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.
|
||||
// Delete deletes the specified Batch account. 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 that contains the Batch
|
||||
// account to be deleted. accountName is the name of the account to be deleted.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account.
|
||||
func (client AccountClient) Delete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -181,8 +176,10 @@ func (client AccountClient) Delete(resourceGroupName string, accountName string,
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -215,7 +212,7 @@ func (client AccountClient) DeletePreparer(resourceGroupName string, accountName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -242,7 +239,7 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
|
|||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
|
||||
autorest.ByClosing())
|
||||
result.Response = resp
|
||||
return
|
||||
|
@ -250,8 +247,8 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
|
|||
|
||||
// Get gets information about the specified Batch account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the account.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account.
|
||||
func (client AccountClient) Get(resourceGroupName string, accountName string) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -292,7 +289,7 @@ func (client AccountClient) GetPreparer(resourceGroupName string, accountName st
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -324,14 +321,12 @@ func (client AccountClient) GetResponder(resp *http.Response) (result Account, e
|
|||
return
|
||||
}
|
||||
|
||||
// GetKeys this operation applies only to Batch accounts created with a
|
||||
// poolAllocationMode of 'BatchService'. If the Batch account was created with
|
||||
// a poolAllocationMode of 'UserSubscription', clients cannot use access to
|
||||
// keys to authenticate, and must use Azure Active Directory instead. In this
|
||||
// case, getting the keys will fail.
|
||||
// GetKeys this operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the
|
||||
// Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to
|
||||
// authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the account.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account.
|
||||
func (client AccountClient) GetKeys(resourceGroupName string, accountName string) (result AccountKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -372,7 +367,7 @@ func (client AccountClient) GetKeysPreparer(resourceGroupName string, accountNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -404,8 +399,7 @@ func (client AccountClient) GetKeysResponder(resp *http.Response) (result Accoun
|
|||
return
|
||||
}
|
||||
|
||||
// List gets information about the Batch accounts associated with the
|
||||
// subscription.
|
||||
// List gets information about the Batch accounts associated with the subscription.
|
||||
func (client AccountClient) List() (result AccountListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -434,7 +428,7 @@ func (client AccountClient) ListPreparer() (*http.Request, error) {
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -490,11 +484,54 @@ func (client AccountClient) ListNextResults(lastResults AccountListResult) (resu
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup gets information about the Batch accounts associated
|
||||
// within the specified resource group.
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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 gets information about the Batch accounts associated with the specified resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group whose Batch accounts to
|
||||
// list.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account.
|
||||
func (client AccountClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -530,7 +567,7 @@ func (client AccountClient) ListByResourceGroupPreparer(resourceGroupName string
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -586,11 +623,55 @@ func (client AccountClient) ListByResourceGroupNextResults(lastResults AccountLi
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client AccountClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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
|
||||
}
|
||||
|
||||
// RegenerateKey regenerates the specified account key for the Batch account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the account. parameters is the type of
|
||||
// key to regenerate.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. parameters is the type of key to regenerate.
|
||||
func (client AccountClient) RegenerateKey(resourceGroupName string, accountName string, parameters AccountRegenerateKeyParameters) (result AccountKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -631,7 +712,7 @@ func (client AccountClient) RegenerateKeyPreparer(resourceGroupName string, acco
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -665,11 +746,11 @@ func (client AccountClient) RegenerateKeyResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// SynchronizeAutoStorageKeys synchronizes access keys for the auto storage
|
||||
// account configured for the specified Batch account.
|
||||
// SynchronizeAutoStorageKeys synchronizes access keys for the auto-storage account configured for the specified Batch
|
||||
// account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account.
|
||||
func (client AccountClient) SynchronizeAutoStorageKeys(resourceGroupName string, accountName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -710,7 +791,7 @@ func (client AccountClient) SynchronizeAutoStorageKeysPreparer(resourceGroupName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -743,9 +824,8 @@ func (client AccountClient) SynchronizeAutoStorageKeysResponder(resp *http.Respo
|
|||
|
||||
// Update updates the properties of an existing Batch account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the account. parameters is additional
|
||||
// parameters for account update.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. parameters is additional parameters for account update.
|
||||
func (client AccountClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -786,7 +866,7 @@ func (client AccountClient) UpdatePreparer(resourceGroupName string, accountName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
99
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go
generated
vendored
99
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,8 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationClient is the client for the Application methods of the Batch
|
||||
// service.
|
||||
// ApplicationClient is the client for the Application methods of the Batch service.
|
||||
type ApplicationClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,18 +34,16 @@ func NewApplicationClient(subscriptionID string) ApplicationClient {
|
|||
return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient
|
||||
// client.
|
||||
// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client.
|
||||
func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient {
|
||||
return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create adds an application to the specified Batch account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. parameters is the parameters for the request.
|
||||
func (client ApplicationClient) Create(resourceGroupName string, accountName string, applicationID string, parameters *AddApplicationParameters) (result Application, err error) {
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. parameters is the parameters for the request.
|
||||
func (client ApplicationClient) Create(resourceGroupName string, accountName string, applicationID string, parameters *ApplicationCreateParameters) (result Application, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}},
|
||||
|
@ -80,7 +76,7 @@ func (client ApplicationClient) Create(resourceGroupName string, accountName str
|
|||
}
|
||||
|
||||
// CreatePreparer prepares the Create request.
|
||||
func (client ApplicationClient) CreatePreparer(resourceGroupName string, accountName string, applicationID string, parameters *AddApplicationParameters) (*http.Request, error) {
|
||||
func (client ApplicationClient) CreatePreparer(resourceGroupName string, accountName string, applicationID string, parameters *ApplicationCreateParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"accountName": autorest.Encode("path", accountName),
|
||||
"applicationId": autorest.Encode("path", applicationID),
|
||||
|
@ -88,7 +84,7 @@ func (client ApplicationClient) CreatePreparer(resourceGroupName string, account
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -127,9 +123,8 @@ func (client ApplicationClient) CreateResponder(resp *http.Response) (result App
|
|||
|
||||
// Delete deletes an application.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application.
|
||||
func (client ApplicationClient) Delete(resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -171,7 +166,7 @@ func (client ApplicationClient) DeletePreparer(resourceGroupName string, account
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -204,9 +199,8 @@ func (client ApplicationClient) DeleteResponder(resp *http.Response) (result aut
|
|||
|
||||
// Get gets information about the specified application.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application.
|
||||
func (client ApplicationClient) Get(resourceGroupName string, accountName string, applicationID string) (result Application, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -248,7 +242,7 @@ func (client ApplicationClient) GetPreparer(resourceGroupName string, accountNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -282,9 +276,8 @@ func (client ApplicationClient) GetResponder(resp *http.Response) (result Applic
|
|||
|
||||
// List lists all of the applications in the specified account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. maxresults is the
|
||||
// maximum number of items to return in the response.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. maxresults is the maximum number of items to return in the response.
|
||||
func (client ApplicationClient) List(resourceGroupName string, accountName string, maxresults *int32) (result ListApplicationsResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -325,7 +318,7 @@ func (client ApplicationClient) ListPreparer(resourceGroupName string, accountNa
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -384,12 +377,56 @@ func (client ApplicationClient) ListNextResults(lastResults ListApplicationsResu
|
|||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ApplicationClient) ListComplete(resourceGroupName string, accountName string, maxresults *int32, cancel <-chan struct{}) (<-chan Application, <-chan error) {
|
||||
resultChan := make(chan Application)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(resourceGroupName, accountName, maxresults)
|
||||
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
|
||||
}
|
||||
|
||||
// Update updates settings for the specified application.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. parameters is the parameters for the request.
|
||||
func (client ApplicationClient) Update(resourceGroupName string, accountName string, applicationID string, parameters UpdateApplicationParameters) (result autorest.Response, err error) {
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. parameters is the parameters for the request.
|
||||
func (client ApplicationClient) Update(resourceGroupName string, accountName string, applicationID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}},
|
||||
|
@ -422,7 +459,7 @@ func (client ApplicationClient) Update(resourceGroupName string, accountName str
|
|||
}
|
||||
|
||||
// UpdatePreparer prepares the Update request.
|
||||
func (client ApplicationClient) UpdatePreparer(resourceGroupName string, accountName string, applicationID string, parameters UpdateApplicationParameters) (*http.Request, error) {
|
||||
func (client ApplicationClient) UpdatePreparer(resourceGroupName string, accountName string, applicationID string, parameters ApplicationUpdateParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"accountName": autorest.Encode("path", accountName),
|
||||
"applicationId": autorest.Encode("path", applicationID),
|
||||
|
@ -430,7 +467,7 @@ func (client ApplicationClient) UpdatePreparer(resourceGroupName string, account
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
44
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go
generated
vendored
44
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,30 +24,26 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ApplicationPackageClient is the client for the ApplicationPackage methods of
|
||||
// the Batch service.
|
||||
// ApplicationPackageClient is the client for the ApplicationPackage methods of the Batch service.
|
||||
type ApplicationPackageClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewApplicationPackageClient creates an instance of the
|
||||
// ApplicationPackageClient client.
|
||||
// NewApplicationPackageClient creates an instance of the ApplicationPackageClient client.
|
||||
func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient {
|
||||
return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewApplicationPackageClientWithBaseURI creates an instance of the
|
||||
// ApplicationPackageClient client.
|
||||
// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client.
|
||||
func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient {
|
||||
return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Activate activates the specified application package.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. version is the version of the application to
|
||||
// activate. parameters is the parameters for the request.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. version is the version of the application to activate.
|
||||
// parameters is the parameters for the request.
|
||||
func (client ApplicationPackageClient) Activate(resourceGroupName string, accountName string, applicationID string, version string, parameters ActivateApplicationPackageParameters) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -93,7 +88,7 @@ func (client ApplicationPackageClient) ActivatePreparer(resourceGroupName string
|
|||
"version": autorest.Encode("path", version),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -128,9 +123,8 @@ func (client ApplicationPackageClient) ActivateResponder(resp *http.Response) (r
|
|||
|
||||
// Create creates an application package record.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. version is the version of the application.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. version is the version of the application.
|
||||
func (client ApplicationPackageClient) Create(resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -173,7 +167,7 @@ func (client ApplicationPackageClient) CreatePreparer(resourceGroupName string,
|
|||
"version": autorest.Encode("path", version),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -207,9 +201,8 @@ func (client ApplicationPackageClient) CreateResponder(resp *http.Response) (res
|
|||
|
||||
// Delete deletes an application package record and its associated binary file.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. version is the version of the application to delete.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. version is the version of the application to delete.
|
||||
func (client ApplicationPackageClient) Delete(resourceGroupName string, accountName string, applicationID string, version string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -252,7 +245,7 @@ func (client ApplicationPackageClient) DeletePreparer(resourceGroupName string,
|
|||
"version": autorest.Encode("path", version),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -285,9 +278,8 @@ func (client ApplicationPackageClient) DeleteResponder(resp *http.Response) (res
|
|||
|
||||
// Get gets information about the specified application package.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the Batch
|
||||
// account. accountName is the name of the Batch account. applicationID is the
|
||||
// ID of the application. version is the version of the application.
|
||||
// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the
|
||||
// Batch account. applicationID is the ID of the application. version is the version of the application.
|
||||
func (client ApplicationPackageClient) Get(resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -330,7 +322,7 @@ func (client ApplicationPackageClient) GetPreparer(resourceGroupName string, acc
|
|||
"version": autorest.Encode("path", version),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
7
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go
generated
vendored
7
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
// Package batch implements the Azure ARM Batch service API version 2017-01-01.
|
||||
// Package batch implements the Azure ARM Batch service API version 2017-05-01.
|
||||
//
|
||||
//
|
||||
package batch
|
||||
|
@ -17,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
90
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go
generated
vendored
90
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go
generated
vendored
|
@ -14,13 +14,13 @@ 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.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.
|
||||
// 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"
|
||||
)
|
||||
|
||||
|
@ -34,16 +34,88 @@ func NewLocationClient(subscriptionID string) LocationClient {
|
|||
return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewLocationClientWithBaseURI creates an instance of the LocationClient
|
||||
// client.
|
||||
// NewLocationClientWithBaseURI creates an instance of the LocationClient client.
|
||||
func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient {
|
||||
return LocationClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// GetQuotas gets the Batch service quotas for the specified subscription at
|
||||
// the given location.
|
||||
// CheckNameAvailability checks whether the Batch account name is available in the specified region.
|
||||
//
|
||||
// locationName is the desired region for the quotas.
|
||||
// locationName is the desired region for the name check. parameters is properties needed to check the availability of
|
||||
// a name.
|
||||
func (client LocationClient) CheckNameAvailability(locationName string, parameters CheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "batch.LocationClient", "CheckNameAvailability")
|
||||
}
|
||||
|
||||
req, err := client.CheckNameAvailabilityPreparer(locationName, parameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.CheckNameAvailabilitySender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.CheckNameAvailabilityResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
|
||||
func (client LocationClient) CheckNameAvailabilityPreparer(locationName string, parameters CheckNameAvailabilityParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"locationName": autorest.Encode("path", locationName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsJSON(),
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability", pathParameters),
|
||||
autorest.WithJSON(parameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client LocationClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client LocationClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// GetQuotas gets the Batch service quotas for the specified subscription at the given location.
|
||||
//
|
||||
// locationName is the region for which to retrieve Batch service quotas.
|
||||
func (client LocationClient) GetQuotas(locationName string) (result LocationQuota, err error) {
|
||||
req, err := client.GetQuotasPreparer(locationName)
|
||||
if err != nil {
|
||||
|
@ -73,7 +145,7 @@ func (client LocationClient) GetQuotasPreparer(locationName string) (*http.Reque
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-01"
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
197
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go
generated
vendored
197
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -35,6 +34,16 @@ const (
|
|||
Secondary AccountKeyType = "Secondary"
|
||||
)
|
||||
|
||||
// NameAvailabilityReason enumerates the values for name availability reason.
|
||||
type NameAvailabilityReason string
|
||||
|
||||
const (
|
||||
// AlreadyExists specifies the already exists state for name availability reason.
|
||||
AlreadyExists NameAvailabilityReason = "AlreadyExists"
|
||||
// Invalid specifies the invalid state for name availability reason.
|
||||
Invalid NameAvailabilityReason = "Invalid"
|
||||
)
|
||||
|
||||
// PackageState enumerates the values for package state.
|
||||
type PackageState string
|
||||
|
||||
|
@ -53,8 +62,7 @@ type PoolAllocationMode string
|
|||
const (
|
||||
// BatchService specifies the batch service state for pool allocation mode.
|
||||
BatchService PoolAllocationMode = "BatchService"
|
||||
// UserSubscription specifies the user subscription state for pool
|
||||
// allocation mode.
|
||||
// UserSubscription specifies the user subscription state for pool allocation mode.
|
||||
UserSubscription PoolAllocationMode = "UserSubscription"
|
||||
)
|
||||
|
||||
|
@ -62,18 +70,18 @@ const (
|
|||
type ProvisioningState string
|
||||
|
||||
const (
|
||||
// Cancelled specifies the cancelled state for provisioning state.
|
||||
Cancelled ProvisioningState = "Cancelled"
|
||||
// Creating specifies the creating state for provisioning state.
|
||||
Creating ProvisioningState = "Creating"
|
||||
// Deleting specifies the deleting state for provisioning state.
|
||||
Deleting ProvisioningState = "Deleting"
|
||||
// Failed specifies the failed state for provisioning state.
|
||||
Failed ProvisioningState = "Failed"
|
||||
// Invalid specifies the invalid state for provisioning state.
|
||||
Invalid ProvisioningState = "Invalid"
|
||||
// Succeeded specifies the succeeded state for provisioning state.
|
||||
Succeeded ProvisioningState = "Succeeded"
|
||||
// ProvisioningStateCancelled specifies the provisioning state cancelled state for provisioning state.
|
||||
ProvisioningStateCancelled ProvisioningState = "Cancelled"
|
||||
// ProvisioningStateCreating specifies the provisioning state creating state for provisioning state.
|
||||
ProvisioningStateCreating ProvisioningState = "Creating"
|
||||
// ProvisioningStateDeleting specifies the provisioning state deleting state for provisioning state.
|
||||
ProvisioningStateDeleting ProvisioningState = "Deleting"
|
||||
// ProvisioningStateFailed specifies the provisioning state failed state for provisioning state.
|
||||
ProvisioningStateFailed ProvisioningState = "Failed"
|
||||
// ProvisioningStateInvalid specifies the provisioning state invalid state for provisioning state.
|
||||
ProvisioningStateInvalid ProvisioningState = "Invalid"
|
||||
// ProvisioningStateSucceeded specifies the provisioning state succeeded state for provisioning state.
|
||||
ProvisioningStateSucceeded ProvisioningState = "Succeeded"
|
||||
)
|
||||
|
||||
// Account is contains information about an Azure Batch account.
|
||||
|
@ -87,23 +95,24 @@ type Account struct {
|
|||
*AccountProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// AccountBaseProperties is the properties of a Batch account.
|
||||
type AccountBaseProperties struct {
|
||||
// AccountCreateParameters is parameters supplied to the Create operation.
|
||||
type AccountCreateParameters struct {
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*AccountCreateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateProperties is the properties of a Batch account.
|
||||
type AccountCreateProperties struct {
|
||||
AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`
|
||||
PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"`
|
||||
KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`
|
||||
}
|
||||
|
||||
// AccountCreateParameters is parameters supplied to the Create operation.
|
||||
type AccountCreateParameters struct {
|
||||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*AccountBaseProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// AccountKeys is a set of Azure Batch account keys.
|
||||
type AccountKeys struct {
|
||||
autorest.Response `json:"-"`
|
||||
AccountName *string `json:"accountName,omitempty"`
|
||||
Primary *string `json:"primary,omitempty"`
|
||||
Secondary *string `json:"secondary,omitempty"`
|
||||
}
|
||||
|
@ -134,41 +143,33 @@ type AccountProperties struct {
|
|||
PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"`
|
||||
KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`
|
||||
AutoStorage *AutoStorageProperties `json:"autoStorage,omitempty"`
|
||||
CoreQuota *int32 `json:"coreQuota,omitempty"`
|
||||
DedicatedCoreQuota *int32 `json:"dedicatedCoreQuota,omitempty"`
|
||||
LowPriorityCoreQuota *int32 `json:"lowPriorityCoreQuota,omitempty"`
|
||||
PoolQuota *int32 `json:"poolQuota,omitempty"`
|
||||
ActiveJobAndJobScheduleQuota *int32 `json:"activeJobAndJobScheduleQuota,omitempty"`
|
||||
}
|
||||
|
||||
// AccountRegenerateKeyParameters is parameters supplied to the RegenerateKey
|
||||
// operation.
|
||||
// AccountRegenerateKeyParameters is parameters supplied to the RegenerateKey operation.
|
||||
type AccountRegenerateKeyParameters struct {
|
||||
KeyName AccountKeyType `json:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateBaseProperties is the properties for a Batch account update.
|
||||
type AccountUpdateBaseProperties struct {
|
||||
// AccountUpdateParameters is parameters for updating an Azure Batch account.
|
||||
type AccountUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*AccountUpdateProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateProperties is the properties of a Batch account.
|
||||
type AccountUpdateProperties struct {
|
||||
AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateParameters is parameters supplied to the Update operation.
|
||||
type AccountUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*AccountUpdateBaseProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ActivateApplicationPackageParameters is parameters for an
|
||||
// ApplicationOperations.ActivateApplicationPackage request.
|
||||
// ActivateApplicationPackageParameters is parameters for an activating an application package.
|
||||
type ActivateApplicationPackageParameters struct {
|
||||
Format *string `json:"format,omitempty"`
|
||||
}
|
||||
|
||||
// AddApplicationParameters is parameters for an
|
||||
// ApplicationOperations.AddApplication request.
|
||||
type AddApplicationParameters struct {
|
||||
AllowUpdates *bool `json:"allowUpdates,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
}
|
||||
|
||||
// Application is contains information about an application in a Batch account.
|
||||
type Application struct {
|
||||
autorest.Response `json:"-"`
|
||||
|
@ -179,8 +180,13 @@ type Application struct {
|
|||
DefaultVersion *string `json:"defaultVersion,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationPackage is an application package which represents a particular
|
||||
// version of an application.
|
||||
// ApplicationCreateParameters is parameters for adding an Application.
|
||||
type ApplicationCreateParameters struct {
|
||||
AllowUpdates *bool `json:"allowUpdates,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationPackage is an application package which represents a particular version of an application.
|
||||
type ApplicationPackage struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -192,35 +198,58 @@ type ApplicationPackage struct {
|
|||
LastActivationTime *date.Time `json:"lastActivationTime,omitempty"`
|
||||
}
|
||||
|
||||
// AutoStorageBaseProperties is the properties related to auto storage account.
|
||||
// ApplicationUpdateParameters is parameters for an update application request.
|
||||
type ApplicationUpdateParameters struct {
|
||||
AllowUpdates *bool `json:"allowUpdates,omitempty"`
|
||||
DefaultVersion *string `json:"defaultVersion,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
}
|
||||
|
||||
// AutoStorageBaseProperties is the properties related to the auto-storage account.
|
||||
type AutoStorageBaseProperties struct {
|
||||
StorageAccountID *string `json:"storageAccountId,omitempty"`
|
||||
}
|
||||
|
||||
// AutoStorageProperties is contains information about the auto storage account
|
||||
// associated with a Batch account.
|
||||
// AutoStorageProperties is contains information about the auto-storage account associated with a Batch account.
|
||||
type AutoStorageProperties struct {
|
||||
StorageAccountID *string `json:"storageAccountId,omitempty"`
|
||||
LastKeySync *date.Time `json:"lastKeySync,omitempty"`
|
||||
}
|
||||
|
||||
// CloudError is an error response from the Batch service.
|
||||
type CloudError struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Target *string `json:"target,omitempty"`
|
||||
Details *[]CloudError `json:"details,omitempty"`
|
||||
// CheckNameAvailabilityParameters is parameters for a check name availability request.
|
||||
type CheckNameAvailabilityParameters struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// KeyVaultReference is identifies the Azure key vault associated with a Batch
|
||||
// account.
|
||||
// CheckNameAvailabilityResult is the CheckNameAvailability operation response.
|
||||
type CheckNameAvailabilityResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
NameAvailable *bool `json:"nameAvailable,omitempty"`
|
||||
Reason NameAvailabilityReason `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// CloudError is an error response from the Batch service.
|
||||
type CloudError struct {
|
||||
Error *CloudErrorBody `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// CloudErrorBody is an error response from the Batch service.
|
||||
type CloudErrorBody struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Target *string `json:"target,omitempty"`
|
||||
Details *[]CloudErrorBody `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// KeyVaultReference is identifies the Azure key vault associated with a Batch account.
|
||||
type KeyVaultReference struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
// ListApplicationsResult is response to an
|
||||
// ApplicationOperations.ListApplications request.
|
||||
// ListApplicationsResult is the result of performing list applications.
|
||||
type ListApplicationsResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Application `json:"value,omitempty"`
|
||||
|
@ -239,13 +268,47 @@ func (client ListApplicationsResult) ListApplicationsResultPreparer() (*http.Req
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// LocationQuota is quotas associated with a Batch region for a particular
|
||||
// subscription.
|
||||
// LocationQuota is quotas associated with a Batch region for a particular subscription.
|
||||
type LocationQuota struct {
|
||||
autorest.Response `json:"-"`
|
||||
AccountQuota *int32 `json:"accountQuota,omitempty"`
|
||||
}
|
||||
|
||||
// Operation is
|
||||
type Operation struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplay `json:"display,omitempty"`
|
||||
Origin *string `json:"origin,omitempty"`
|
||||
Properties *map[string]interface{} `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// OperationDisplay is
|
||||
type OperationDisplay struct {
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client OperationListResult) OperationListResultPreparer() (*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)))
|
||||
}
|
||||
|
||||
// Resource is a definition of an Azure resource.
|
||||
type Resource struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -254,11 +317,3 @@ type Resource struct {
|
|||
Location *string `json:"location,omitempty"`
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// UpdateApplicationParameters is parameters for an
|
||||
// ApplicationOperations.UpdateApplication request.
|
||||
type UpdateApplicationParameters struct {
|
||||
AllowUpdates *bool `json:"allowUpdates,omitempty"`
|
||||
DefaultVersion *string `json:"defaultVersion,omitempty"`
|
||||
DisplayName *string `json:"displayName,omitempty"`
|
||||
}
|
||||
|
|
165
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go
generated
vendored
Normal file
165
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go
generated
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
package batch
|
||||
|
||||
// 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.
|
||||
// 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 client for the Operations methods of the Batch service.
|
||||
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 lists available operations for the Microsoft.Batch provider
|
||||
func (client OperationsClient) List() (result OperationListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "batch.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, "batch.OperationsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-05-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.Batch/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 OperationListResult, 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 OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
|
||||
req, err := lastResults.OperationListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "batch.OperationsClient", "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, "batch.OperationsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
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
|
||||
}
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-batch/2017-05-01"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-batch/2017-05-01"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
13
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go
generated
vendored
13
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go
generated
vendored
|
@ -1,9 +1,7 @@
|
|||
// Package billing implements the Azure ARM Billing service API version
|
||||
// 2017-04-24-preview.
|
||||
// Package billing implements the Azure ARM Billing service API version 2017-04-24-preview.
|
||||
//
|
||||
// Billing client provides access to billing resources for Azure Web-Direct
|
||||
// subscriptions. Other subscription types which were not purchased directly
|
||||
// through the Azure web portal are not supported through this preview API.
|
||||
// Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types
|
||||
// which were not purchased directly through the Azure web portal are not supported through this preview API.
|
||||
package billing
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -20,9 +18,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
93
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go
generated
vendored
93
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,10 +24,9 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// InvoicesClient is the billing client provides access to billing resources
|
||||
// for Azure Web-Direct subscriptions. Other subscription types which were not
|
||||
// purchased directly through the Azure web portal are not supported through
|
||||
// this preview API.
|
||||
// InvoicesClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other
|
||||
// subscription types which were not purchased directly through the Azure web portal are not supported through this
|
||||
// preview API.
|
||||
type InvoicesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -38,14 +36,13 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient {
|
|||
return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient
|
||||
// client.
|
||||
// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client.
|
||||
func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient {
|
||||
return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get gets a named invoice resource. When getting a single invoice, the
|
||||
// downloadUrl property is expanded automatically.
|
||||
// Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded
|
||||
// automatically.
|
||||
//
|
||||
// invoiceName is the name of an invoice resource.
|
||||
func (client InvoicesClient) Get(invoiceName string) (result Invoice, err error) {
|
||||
|
@ -109,8 +106,8 @@ func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice,
|
|||
return
|
||||
}
|
||||
|
||||
// GetLatest gets the most recent invoice. When getting a single invoice, the
|
||||
// downloadUrl property is expanded automatically.
|
||||
// GetLatest gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded
|
||||
// automatically.
|
||||
func (client InvoicesClient) GetLatest() (result Invoice, err error) {
|
||||
req, err := client.GetLatestPreparer()
|
||||
if err != nil {
|
||||
|
@ -171,22 +168,17 @@ func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Inv
|
|||
return
|
||||
}
|
||||
|
||||
// List lists the available invoices for a subscription in reverse
|
||||
// chronological order beginning with the most recent invoice. In preview,
|
||||
// invoices are available via this API only for invoice periods which end
|
||||
// December 1, 2016 or later.
|
||||
// List lists the available invoices for a subscription in reverse chronological order beginning with the most recent
|
||||
// invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or
|
||||
// later.
|
||||
//
|
||||
// expand is may be used to expand the downloadUrl property within a list of
|
||||
// invoices. This enables download links to be generated for multiple invoices
|
||||
// at once. By default, downloadURLs are not included when listing invoices.
|
||||
// filter is may be used to filter invoices by invoicePeriodEndDate. The filter
|
||||
// supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently
|
||||
// support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a
|
||||
// previous operation returned a partial result. If a previous response
|
||||
// contains a nextLink element, the value of the nextLink element will include
|
||||
// a skiptoken parameter that specifies a starting point to use for subsequent
|
||||
// calls. top is may be used to limit the number of results to the most recent
|
||||
// N invoices.
|
||||
// expand is may be used to expand the downloadUrl property within a list of invoices. This enables download links to
|
||||
// be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. filter
|
||||
// is may be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and
|
||||
// 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a previous
|
||||
// operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink
|
||||
// element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top is may
|
||||
// be used to limit the number of results to the most recent N invoices.
|
||||
func (client InvoicesClient) List(expand string, filter string, skiptoken string, top *int32) (result InvoicesListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: top,
|
||||
|
@ -291,3 +283,48 @@ func (client InvoicesClient) ListNextResults(lastResults InvoicesListResult) (re
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client InvoicesClient) ListComplete(expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Invoice, <-chan error) {
|
||||
resultChan := make(chan Invoice)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(expand, filter, skiptoken, top)
|
||||
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
|
||||
}
|
||||
|
|
27
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go
generated
vendored
27
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,8 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// DownloadURL is a secure URL that can be used to download a PDF invoice until
|
||||
// the URL expires.
|
||||
// DownloadURL is a secure URL that can be used to download a PDF invoice until the URL expires.
|
||||
type DownloadURL struct {
|
||||
ExpiryTime *date.Time `json:"expiryTime,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
|
@ -39,14 +37,13 @@ type ErrorDetails struct {
|
|||
Target *string `json:"target,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorResponse is error response indicates that the service is not able to
|
||||
// process the incoming request. The reason is provided in the error message.
|
||||
// ErrorResponse is error response indicates that the service is not able to process the incoming request. The reason
|
||||
// is provided in the error message.
|
||||
type ErrorResponse struct {
|
||||
Error *ErrorDetails `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// Invoice is an invoice resource can be used download a PDF version of an
|
||||
// invoice.
|
||||
// Invoice is an invoice resource can be used download a PDF version of an invoice.
|
||||
type Invoice struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -63,8 +60,8 @@ type InvoiceProperties struct {
|
|||
BillingPeriodIds *[]string `json:"billingPeriodIds,omitempty"`
|
||||
}
|
||||
|
||||
// InvoicesListResult is result of listing invoices. It contains a list of
|
||||
// available invoices in reverse chronological order.
|
||||
// InvoicesListResult is result of listing invoices. It contains a list of available invoices in reverse chronological
|
||||
// order.
|
||||
type InvoicesListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Invoice `json:"value,omitempty"`
|
||||
|
@ -96,8 +93,8 @@ type OperationDisplay struct {
|
|||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result listing billing operations. It contains a list
|
||||
// of operations and a URL link to get the next set of results.
|
||||
// OperationListResult is result listing billing operations. It contains a list of operations and a URL link to get the
|
||||
// next set of results.
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
|
@ -132,8 +129,8 @@ type PeriodProperties struct {
|
|||
InvoiceIds *[]string `json:"invoiceIds,omitempty"`
|
||||
}
|
||||
|
||||
// PeriodsListResult is result of listing billing periods. It contains a list
|
||||
// of available billing periods in reverse chronological order.
|
||||
// PeriodsListResult is result of listing billing periods. It contains a list of available billing periods in reverse
|
||||
// chronological order.
|
||||
type PeriodsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Period `json:"value,omitempty"`
|
||||
|
|
58
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go
generated
vendored
58
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,9 +23,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the billing client provides access to billing resources
|
||||
// for Azure Web-Direct subscriptions. Other subscription types which were not
|
||||
// purchased directly through the Azure web portal are not supported through
|
||||
// OperationsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions.
|
||||
// Other subscription types which were not purchased directly through the Azure web portal are not supported through
|
||||
// this preview API.
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
|
@ -37,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
|
|||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
|
||||
// client.
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
@ -123,3 +120,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult)
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
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
|
||||
}
|
||||
|
|
73
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go
generated
vendored
73
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,10 +24,9 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// PeriodsClient is the billing client provides access to billing resources for
|
||||
// Azure Web-Direct subscriptions. Other subscription types which were not
|
||||
// purchased directly through the Azure web portal are not supported through
|
||||
// this preview API.
|
||||
// PeriodsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other
|
||||
// subscription types which were not purchased directly through the Azure web portal are not supported through this
|
||||
// preview API.
|
||||
type PeriodsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -107,17 +105,13 @@ func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, er
|
|||
return
|
||||
}
|
||||
|
||||
// List lists the available billing periods for a subscription in reverse
|
||||
// chronological order.
|
||||
// List lists the available billing periods for a subscription in reverse chronological order.
|
||||
//
|
||||
// filter is may be used to filter billing periods by billingPeriodEndDate. The
|
||||
// filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not
|
||||
// currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used
|
||||
// if a previous operation returned a partial result. If a previous response
|
||||
// contains a nextLink element, the value of the nextLink element will include
|
||||
// a skiptoken parameter that specifies a starting point to use for subsequent
|
||||
// calls. top is may be used to limit the number of results to the most recent
|
||||
// N billing periods.
|
||||
// filter is may be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le',
|
||||
// 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a
|
||||
// previous operation returned a partial result. If a previous response contains a nextLink element, the value of the
|
||||
// nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top
|
||||
// is may be used to limit the number of results to the most recent N billing periods.
|
||||
func (client PeriodsClient) List(filter string, skiptoken string, top *int32) (result PeriodsListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: top,
|
||||
|
@ -219,3 +213,48 @@ func (client PeriodsClient) ListNextResults(lastResults PeriodsListResult) (resu
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client PeriodsClient) ListComplete(filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Period, <-chan error) {
|
||||
resultChan := make(chan Period)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(filter, skiptoken, top)
|
||||
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
|
||||
}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-billing/2017-04-24-preview"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-billing/2017-04-24-preview"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
168
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go
generated
vendored
168
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go
generated
vendored
|
@ -1,8 +1,7 @@
|
|||
// Package cdn implements the Azure ARM Cdn service API version 2016-10-02.
|
||||
// Package cdn implements the Azure ARM Cdn service API version 2017-04-02.
|
||||
//
|
||||
// Use these APIs to manage Azure CDN resources through the Azure Resource
|
||||
// Manager. You must make sure that requests made to these resources are
|
||||
// secure.
|
||||
// Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests
|
||||
// made to these resources are secure.
|
||||
package cdn
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -19,9 +18,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -56,8 +54,8 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient {
|
|||
}
|
||||
}
|
||||
|
||||
// CheckNameAvailability check the availability of a resource name. This is
|
||||
// needed for resources where name is globally unique, such as a CDN endpoint.
|
||||
// CheckNameAvailability check the availability of a resource name. This is needed for resources where name is globally
|
||||
// unique, such as a CDN endpoint.
|
||||
//
|
||||
// checkNameAvailabilityInput is input to check.
|
||||
func (client ManagementClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) {
|
||||
|
@ -91,7 +89,7 @@ func (client ManagementClient) CheckNameAvailability(checkNameAvailabilityInput
|
|||
|
||||
// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
|
||||
func (client ManagementClient) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) {
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -125,139 +123,69 @@ func (client ManagementClient) CheckNameAvailabilityResponder(resp *http.Respons
|
|||
return
|
||||
}
|
||||
|
||||
// ListOperations lists all of the available CDN REST API operations.
|
||||
func (client ManagementClient) ListOperations() (result OperationListResult, err error) {
|
||||
req, err := client.ListOperationsPreparer()
|
||||
// ValidateProbe check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file
|
||||
// hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is
|
||||
// relative to the origin path specified in the endpoint configuration.
|
||||
//
|
||||
// validateProbeInput is input to check.
|
||||
func (client ManagementClient) ValidateProbe(validateProbeInput ValidateProbeInput) (result ValidateProbeOutput, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: validateProbeInput,
|
||||
Constraints: []validation.Constraint{{Target: "validateProbeInput.ProbeURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cdn.ManagementClient", "ValidateProbe")
|
||||
}
|
||||
|
||||
req, err := client.ValidateProbePreparer(validateProbeInput)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing request")
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListOperationsSender(req)
|
||||
resp, err := client.ValidateProbeSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending request")
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListOperationsResponder(resp)
|
||||
result, err = client.ValidateProbeResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to request")
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListOperationsPreparer prepares the ListOperations request.
|
||||
func (client ManagementClient) ListOperationsPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2016-10-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.Cdn/operations"),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListOperationsSender sends the ListOperations request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ManagementClient) ListOperationsSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListOperationsResponder handles the response to the ListOperations request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ManagementClient) ListOperationsResponder(resp *http.Response) (result OperationListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListOperationsNextResults retrieves the next set of results, if any.
|
||||
func (client ManagementClient) ListOperationsNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
|
||||
req, err := lastResults.OperationListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListOperationsSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListOperationsResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListResourceUsage check the quota and actual usage of the CDN profiles under
|
||||
// the given subscription.
|
||||
func (client ManagementClient) ListResourceUsage() (result ResourceUsageListResult, err error) {
|
||||
req, err := client.ListResourceUsagePreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListResourceUsageSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResourceUsageResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListResourceUsagePreparer prepares the ListResourceUsage request.
|
||||
func (client ManagementClient) ListResourceUsagePreparer() (*http.Request, error) {
|
||||
// ValidateProbePreparer prepares the ValidateProbe request.
|
||||
func (client ManagementClient) ValidateProbePreparer(validateProbeInput ValidateProbeInput) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsJSON(),
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage", pathParameters),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe", pathParameters),
|
||||
autorest.WithJSON(validateProbeInput),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListResourceUsageSender sends the ListResourceUsage request. The method will close the
|
||||
// ValidateProbeSender sends the ValidateProbe request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ManagementClient) ListResourceUsageSender(req *http.Request) (*http.Response, error) {
|
||||
func (client ManagementClient) ValidateProbeSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListResourceUsageResponder handles the response to the ListResourceUsage request. The method always
|
||||
// ValidateProbeResponder handles the response to the ValidateProbe request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ManagementClient) ListResourceUsageResponder(resp *http.Response) (result ResourceUsageListResult, err error) {
|
||||
func (client ManagementClient) ValidateProbeResponder(resp *http.Response) (result ValidateProbeOutput, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
|
@ -267,27 +195,3 @@ func (client ManagementClient) ListResourceUsageResponder(resp *http.Response) (
|
|||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListResourceUsageNextResults retrieves the next set of results, if any.
|
||||
func (client ManagementClient) ListResourceUsageNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
|
||||
req, err := lastResults.ResourceUsageListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListResourceUsageSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResourceUsageResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
|
148
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go
generated
vendored
148
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,36 +24,30 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// CustomDomainsClient is the use these APIs to manage Azure CDN resources
|
||||
// through the Azure Resource Manager. You must make sure that requests made to
|
||||
// these resources are secure.
|
||||
// CustomDomainsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must
|
||||
// make sure that requests made to these resources are secure.
|
||||
type CustomDomainsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewCustomDomainsClient creates an instance of the CustomDomainsClient
|
||||
// client.
|
||||
// NewCustomDomainsClient creates an instance of the CustomDomainsClient client.
|
||||
func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient {
|
||||
return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCustomDomainsClientWithBaseURI creates an instance of the
|
||||
// CustomDomainsClient client.
|
||||
// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client.
|
||||
func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient {
|
||||
return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a new custom domain within an endpoint. 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.
|
||||
// Create creates a new custom domain within an endpoint. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainName is name of the custom domain
|
||||
// within an endpoint. customDomainProperties is properties required to create
|
||||
// a new custom domain.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainName is name of the custom domain within an endpoint. customDomainProperties is
|
||||
// properties required to create a new custom domain.
|
||||
func (client CustomDomainsClient) Create(resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) {
|
||||
resultChan := make(chan CustomDomain, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -76,8 +69,10 @@ func (client CustomDomainsClient) Create(resourceGroupName string, profileName s
|
|||
var err error
|
||||
var result CustomDomain
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -112,7 +107,7 @@ func (client CustomDomainsClient) CreatePreparer(resourceGroupName string, profi
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -148,16 +143,13 @@ func (client CustomDomainsClient) CreateResponder(resp *http.Response) (result C
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes an existing custom domain within an endpoint. 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.
|
||||
// Delete deletes an existing custom domain within an endpoint. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainName is name of the custom domain
|
||||
// within an endpoint.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainName is name of the custom domain within an endpoint.
|
||||
func (client CustomDomainsClient) Delete(resourceGroupName string, profileName string, endpointName string, customDomainName string, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) {
|
||||
resultChan := make(chan CustomDomain, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -176,8 +168,10 @@ func (client CustomDomainsClient) Delete(resourceGroupName string, profileName s
|
|||
var err error
|
||||
var result CustomDomain
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -212,7 +206,7 @@ func (client CustomDomainsClient) DeletePreparer(resourceGroupName string, profi
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -248,11 +242,9 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C
|
|||
|
||||
// DisableCustomHTTPS disable https delivery of the custom domain.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainName is name of the custom domain
|
||||
// within an endpoint.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainName is name of the custom domain within an endpoint.
|
||||
func (client CustomDomainsClient) DisableCustomHTTPS(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -293,7 +285,7 @@ func (client CustomDomainsClient) DisableCustomHTTPSPreparer(resourceGroupName s
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -318,7 +310,7 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons
|
|||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
|
@ -327,11 +319,9 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons
|
|||
|
||||
// EnableCustomHTTPS enable https delivery of the custom domain.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainName is name of the custom domain
|
||||
// within an endpoint.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainName is name of the custom domain within an endpoint.
|
||||
func (client CustomDomainsClient) EnableCustomHTTPS(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -372,7 +362,7 @@ func (client CustomDomainsClient) EnableCustomHTTPSPreparer(resourceGroupName st
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -397,7 +387,7 @@ func (client CustomDomainsClient) EnableCustomHTTPSResponder(resp *http.Response
|
|||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
|
@ -406,11 +396,9 @@ func (client CustomDomainsClient) EnableCustomHTTPSResponder(resp *http.Response
|
|||
|
||||
// Get gets an exisitng custom domain within an endpoint.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainName is name of the custom domain
|
||||
// within an endpoint.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainName is name of the custom domain within an endpoint.
|
||||
func (client CustomDomainsClient) Get(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -451,7 +439,7 @@ func (client CustomDomainsClient) GetPreparer(resourceGroupName string, profileN
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -485,10 +473,9 @@ func (client CustomDomainsClient) GetResponder(resp *http.Response) (result Cust
|
|||
|
||||
// ListByEndpoint lists all of the existing custom domains within an endpoint.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client CustomDomainsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result CustomDomainListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -528,7 +515,7 @@ func (client CustomDomainsClient) ListByEndpointPreparer(resourceGroupName strin
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -583,3 +570,48 @@ func (client CustomDomainsClient) ListByEndpointNextResults(lastResults CustomDo
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByEndpointComplete gets all elements from the list without paging.
|
||||
func (client CustomDomainsClient) ListByEndpointComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) {
|
||||
resultChan := make(chan CustomDomain)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByEndpoint(resourceGroupName, profileName, endpointName)
|
||||
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.ListByEndpointNextResults(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
|
||||
}
|
||||
|
|
62
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go
generated
vendored
62
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,9 +23,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// EdgeNodesClient is the use these APIs to manage Azure CDN resources through
|
||||
// the Azure Resource Manager. You must make sure that requests made to these
|
||||
// resources are secure.
|
||||
// EdgeNodesClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must
|
||||
// make sure that requests made to these resources are secure.
|
||||
type EdgeNodesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -36,13 +34,12 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient {
|
|||
return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient
|
||||
// client.
|
||||
// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client.
|
||||
func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient {
|
||||
return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists all the edge nodes of a CDN service.
|
||||
// List edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.
|
||||
func (client EdgeNodesClient) List() (result EdgenodeResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -67,7 +64,7 @@ func (client EdgeNodesClient) List() (result EdgenodeResult, err error) {
|
|||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client EdgeNodesClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -122,3 +119,48 @@ func (client EdgeNodesClient) ListNextResults(lastResults EdgenodeResult) (resul
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client EdgeNodesClient) ListComplete(cancel <-chan struct{}) (<-chan EdgeNode, <-chan error) {
|
||||
resultChan := make(chan EdgeNode)
|
||||
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
|
||||
}
|
||||
|
|
300
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go
generated
vendored
300
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,9 +24,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// EndpointsClient is the use these APIs to manage Azure CDN resources through
|
||||
// the Azure Resource Manager. You must make sure that requests made to these
|
||||
// resources are secure.
|
||||
// EndpointsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must
|
||||
// make sure that requests made to these resources are secure.
|
||||
type EndpointsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -37,22 +35,18 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient {
|
|||
return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient
|
||||
// client.
|
||||
// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client.
|
||||
func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient {
|
||||
return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a new CDN endpoint with the specified endpoint name under the
|
||||
// specified subscription, resource group and profile. 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.
|
||||
// Create creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group
|
||||
// and profile. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. endpoint is endpoint properties
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. endpoint is endpoint properties
|
||||
func (client EndpointsClient) Create(resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) {
|
||||
resultChan := make(chan Endpoint, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -74,8 +68,10 @@ func (client EndpointsClient) Create(resourceGroupName string, profileName strin
|
|||
var err error
|
||||
var result Endpoint
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -109,7 +105,7 @@ func (client EndpointsClient) CreatePreparer(resourceGroupName string, profileNa
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -145,16 +141,13 @@ func (client EndpointsClient) CreateResponder(resp *http.Response) (result Endpo
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes an existing CDN endpoint with the specified endpoint name
|
||||
// under the specified subscription, resource group and profile. 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.
|
||||
// Delete deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource
|
||||
// group and profile. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -173,8 +166,10 @@ func (client EndpointsClient) Delete(resourceGroupName string, profileName strin
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -208,7 +203,7 @@ func (client EndpointsClient) DeletePreparer(resourceGroupName string, profileNa
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -241,13 +236,12 @@ func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autor
|
|||
return
|
||||
}
|
||||
|
||||
// Get gets an existing CDN endpoint with the specified endpoint name under the
|
||||
// specified subscription, resource group and profile.
|
||||
// Get gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group
|
||||
// and profile.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client EndpointsClient) Get(resourceGroupName string, profileName string, endpointName string) (result Endpoint, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -287,7 +281,7 @@ func (client EndpointsClient) GetPreparer(resourceGroupName string, profileName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -321,9 +315,8 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint
|
|||
|
||||
// ListByProfile lists existing CDN endpoints.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client EndpointsClient) ListByProfile(resourceGroupName string, profileName string) (result EndpointListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -362,7 +355,7 @@ func (client EndpointsClient) ListByProfilePreparer(resourceGroupName string, pr
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -418,13 +411,56 @@ func (client EndpointsClient) ListByProfileNextResults(lastResults EndpointListR
|
|||
return
|
||||
}
|
||||
|
||||
// ListResourceUsage checks the quota and usage of geo filters and custom
|
||||
// domains under the given endpoint.
|
||||
// ListByProfileComplete gets all elements from the list without paging.
|
||||
func (client EndpointsClient) ListByProfileComplete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) {
|
||||
resultChan := make(chan Endpoint)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByProfile(resourceGroupName, profileName)
|
||||
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.ListByProfileNextResults(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
|
||||
}
|
||||
|
||||
// ListResourceUsage checks the quota and usage of geo filters and custom domains under the given endpoint.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client EndpointsClient) ListResourceUsage(resourceGroupName string, profileName string, endpointName string) (result ResourceUsageListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -464,7 +500,7 @@ func (client EndpointsClient) ListResourceUsagePreparer(resourceGroupName string
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -520,17 +556,59 @@ func (client EndpointsClient) ListResourceUsageNextResults(lastResults ResourceU
|
|||
return
|
||||
}
|
||||
|
||||
// LoadContent pre-loads a content to CDN. Available for Verizon Profiles. 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
|
||||
// ListResourceUsageComplete gets all elements from the list without paging.
|
||||
func (client EndpointsClient) ListResourceUsageComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) {
|
||||
resultChan := make(chan ResourceUsage)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListResourceUsage(resourceGroupName, profileName, endpointName)
|
||||
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.ListResourceUsageNextResults(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
|
||||
}
|
||||
|
||||
// LoadContent pre-loads a content to CDN. Available for Verizon Profiles. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. contentFilePaths is the path to the content to be
|
||||
// loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a
|
||||
// single file
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. contentFilePaths is the path to the content to be loaded. Path should be a full URL, e.g.
|
||||
// ‘/pictires/city.png' which loads a single file
|
||||
func (client EndpointsClient) LoadContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -551,8 +629,10 @@ func (client EndpointsClient) LoadContent(resourceGroupName string, profileName
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -586,7 +666,7 @@ func (client EndpointsClient) LoadContentPreparer(resourceGroupName string, prof
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -621,18 +701,14 @@ func (client EndpointsClient) LoadContentResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// PurgeContent removes a content from CDN. 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.
|
||||
// PurgeContent removes a content from CDN. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. contentFilePaths is the path to the content to be
|
||||
// purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a
|
||||
// single file, or a directory with a wildcard, e.g. '/pictures/*' which
|
||||
// removes all folders and files in the directory.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. contentFilePaths is the path to the content to be purged. Path can be a full URL, e.g.
|
||||
// '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes
|
||||
// all folders and files in the directory.
|
||||
func (client EndpointsClient) PurgeContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -653,8 +729,10 @@ func (client EndpointsClient) PurgeContent(resourceGroupName string, profileName
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -688,7 +766,7 @@ func (client EndpointsClient) PurgeContentPreparer(resourceGroupName string, pro
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -723,15 +801,13 @@ func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// Start starts an existing CDN endpoint that is on a stopped state. 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.
|
||||
// Start starts an existing CDN endpoint that is on a stopped state. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client EndpointsClient) Start(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) {
|
||||
resultChan := make(chan Endpoint, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -750,8 +826,10 @@ func (client EndpointsClient) Start(resourceGroupName string, profileName string
|
|||
var err error
|
||||
var result Endpoint
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -785,7 +863,7 @@ func (client EndpointsClient) StartPreparer(resourceGroupName string, profileNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -819,15 +897,12 @@ func (client EndpointsClient) StartResponder(resp *http.Response) (result Endpoi
|
|||
return
|
||||
}
|
||||
|
||||
// Stop stops an existing running CDN endpoint. 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.
|
||||
// Stop stops an existing running CDN endpoint. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client EndpointsClient) Stop(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) {
|
||||
resultChan := make(chan Endpoint, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -846,8 +921,10 @@ func (client EndpointsClient) Stop(resourceGroupName string, profileName string,
|
|||
var err error
|
||||
var result Endpoint
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -881,7 +958,7 @@ func (client EndpointsClient) StopPreparer(resourceGroupName string, profileName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -915,19 +992,15 @@ func (client EndpointsClient) StopResponder(resp *http.Response) (result Endpoin
|
|||
return
|
||||
}
|
||||
|
||||
// Update updates an existing CDN endpoint with the specified endpoint name
|
||||
// under the specified subscription, resource group and profile. Only tags and
|
||||
// Origin HostHeader can be updated after creating an endpoint. To update
|
||||
// origins, use the Update Origin operation. To update custom domains, use the
|
||||
// Update Custom Domain operation. 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.
|
||||
// Update updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource
|
||||
// group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update origins, use
|
||||
// the Update Origin operation. To update custom domains, use the Update Custom Domain operation. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. endpointUpdateProperties is endpoint update
|
||||
// properties
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. endpointUpdateProperties is endpoint update properties
|
||||
func (client EndpointsClient) Update(resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) {
|
||||
resultChan := make(chan Endpoint, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -946,8 +1019,10 @@ func (client EndpointsClient) Update(resourceGroupName string, profileName strin
|
|||
var err error
|
||||
var result Endpoint
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -981,7 +1056,7 @@ func (client EndpointsClient) UpdatePreparer(resourceGroupName string, profileNa
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -1017,14 +1092,11 @@ func (client EndpointsClient) UpdateResponder(resp *http.Response) (result Endpo
|
|||
return
|
||||
}
|
||||
|
||||
// ValidateCustomDomain validates the custom domain mapping to ensure it maps
|
||||
// to the correct CDN endpoint in DNS.
|
||||
// ValidateCustomDomain validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. customDomainProperties is custom domain to be
|
||||
// validated.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. customDomainProperties is custom domain to be validated.
|
||||
func (client EndpointsClient) ValidateCustomDomain(resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput) (result ValidateCustomDomainOutput, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -1066,7 +1138,7 @@ func (client EndpointsClient) ValidateCustomDomainPreparer(resourceGroupName str
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
269
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go
generated
vendored
269
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,8 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// CustomDomainResourceState enumerates the values for custom domain resource
|
||||
// state.
|
||||
// CustomDomainResourceState enumerates the values for custom domain resource state.
|
||||
type CustomDomainResourceState string
|
||||
|
||||
const (
|
||||
|
@ -37,47 +35,68 @@ const (
|
|||
Deleting CustomDomainResourceState = "Deleting"
|
||||
)
|
||||
|
||||
// CustomHTTPSProvisioningState enumerates the values for custom https
|
||||
// provisioning state.
|
||||
// CustomHTTPSProvisioningState enumerates the values for custom https provisioning state.
|
||||
type CustomHTTPSProvisioningState string
|
||||
|
||||
const (
|
||||
// Disabled specifies the disabled state for custom https provisioning
|
||||
// state.
|
||||
// Disabled specifies the disabled state for custom https provisioning state.
|
||||
Disabled CustomHTTPSProvisioningState = "Disabled"
|
||||
// Disabling specifies the disabling state for custom https provisioning
|
||||
// state.
|
||||
// Disabling specifies the disabling state for custom https provisioning state.
|
||||
Disabling CustomHTTPSProvisioningState = "Disabling"
|
||||
// Enabled specifies the enabled state for custom https provisioning state.
|
||||
Enabled CustomHTTPSProvisioningState = "Enabled"
|
||||
// Enabling specifies the enabling state for custom https provisioning
|
||||
// state.
|
||||
// Enabling specifies the enabling state for custom https provisioning state.
|
||||
Enabling CustomHTTPSProvisioningState = "Enabling"
|
||||
// Failed specifies the failed state for custom https provisioning state.
|
||||
Failed CustomHTTPSProvisioningState = "Failed"
|
||||
)
|
||||
|
||||
// CustomHTTPSProvisioningSubstate enumerates the values for custom https provisioning substate.
|
||||
type CustomHTTPSProvisioningSubstate string
|
||||
|
||||
const (
|
||||
// CertificateDeleted specifies the certificate deleted state for custom https provisioning substate.
|
||||
CertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted"
|
||||
// CertificateDeployed specifies the certificate deployed state for custom https provisioning substate.
|
||||
CertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed"
|
||||
// DeletingCertificate specifies the deleting certificate state for custom https provisioning substate.
|
||||
DeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate"
|
||||
// DeployingCertificate specifies the deploying certificate state for custom https provisioning substate.
|
||||
DeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate"
|
||||
// DomainControlValidationRequestApproved specifies the domain control validation request approved state for custom
|
||||
// https provisioning substate.
|
||||
DomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved"
|
||||
// DomainControlValidationRequestRejected specifies the domain control validation request rejected state for custom
|
||||
// https provisioning substate.
|
||||
DomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected"
|
||||
// DomainControlValidationRequestTimedOut specifies the domain control validation request timed out state for custom
|
||||
// https provisioning substate.
|
||||
DomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut"
|
||||
// IssuingCertificate specifies the issuing certificate state for custom https provisioning substate.
|
||||
IssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate"
|
||||
// PendingDomainControlValidationREquestApproval specifies the pending domain control validation r equest approval
|
||||
// state for custom https provisioning substate.
|
||||
PendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval"
|
||||
// SubmittingDomainControlValidationRequest specifies the submitting domain control validation request state for custom
|
||||
// https provisioning substate.
|
||||
SubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest"
|
||||
)
|
||||
|
||||
// EndpointResourceState enumerates the values for endpoint resource state.
|
||||
type EndpointResourceState string
|
||||
|
||||
const (
|
||||
// EndpointResourceStateCreating specifies the endpoint resource state
|
||||
// creating state for endpoint resource state.
|
||||
// EndpointResourceStateCreating specifies the endpoint resource state creating state for endpoint resource state.
|
||||
EndpointResourceStateCreating EndpointResourceState = "Creating"
|
||||
// EndpointResourceStateDeleting specifies the endpoint resource state
|
||||
// deleting state for endpoint resource state.
|
||||
// EndpointResourceStateDeleting specifies the endpoint resource state deleting state for endpoint resource state.
|
||||
EndpointResourceStateDeleting EndpointResourceState = "Deleting"
|
||||
// EndpointResourceStateRunning specifies the endpoint resource state
|
||||
// running state for endpoint resource state.
|
||||
// EndpointResourceStateRunning specifies the endpoint resource state running state for endpoint resource state.
|
||||
EndpointResourceStateRunning EndpointResourceState = "Running"
|
||||
// EndpointResourceStateStarting specifies the endpoint resource state
|
||||
// starting state for endpoint resource state.
|
||||
// EndpointResourceStateStarting specifies the endpoint resource state starting state for endpoint resource state.
|
||||
EndpointResourceStateStarting EndpointResourceState = "Starting"
|
||||
// EndpointResourceStateStopped specifies the endpoint resource state
|
||||
// stopped state for endpoint resource state.
|
||||
// EndpointResourceStateStopped specifies the endpoint resource state stopped state for endpoint resource state.
|
||||
EndpointResourceStateStopped EndpointResourceState = "Stopped"
|
||||
// EndpointResourceStateStopping specifies the endpoint resource state
|
||||
// stopping state for endpoint resource state.
|
||||
// EndpointResourceStateStopping specifies the endpoint resource state stopping state for endpoint resource state.
|
||||
EndpointResourceStateStopping EndpointResourceState = "Stopping"
|
||||
)
|
||||
|
||||
|
@ -91,18 +110,31 @@ const (
|
|||
Block GeoFilterActions = "Block"
|
||||
)
|
||||
|
||||
// OptimizationType enumerates the values for optimization type.
|
||||
type OptimizationType string
|
||||
|
||||
const (
|
||||
// DynamicSiteAcceleration specifies the dynamic site acceleration state for optimization type.
|
||||
DynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration"
|
||||
// GeneralMediaStreaming specifies the general media streaming state for optimization type.
|
||||
GeneralMediaStreaming OptimizationType = "GeneralMediaStreaming"
|
||||
// GeneralWebDelivery specifies the general web delivery state for optimization type.
|
||||
GeneralWebDelivery OptimizationType = "GeneralWebDelivery"
|
||||
// LargeFileDownload specifies the large file download state for optimization type.
|
||||
LargeFileDownload OptimizationType = "LargeFileDownload"
|
||||
// VideoOnDemandMediaStreaming specifies the video on demand media streaming state for optimization type.
|
||||
VideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming"
|
||||
)
|
||||
|
||||
// OriginResourceState enumerates the values for origin resource state.
|
||||
type OriginResourceState string
|
||||
|
||||
const (
|
||||
// OriginResourceStateActive specifies the origin resource state active
|
||||
// state for origin resource state.
|
||||
// OriginResourceStateActive specifies the origin resource state active state for origin resource state.
|
||||
OriginResourceStateActive OriginResourceState = "Active"
|
||||
// OriginResourceStateCreating specifies the origin resource state creating
|
||||
// state for origin resource state.
|
||||
// OriginResourceStateCreating specifies the origin resource state creating state for origin resource state.
|
||||
OriginResourceStateCreating OriginResourceState = "Creating"
|
||||
// OriginResourceStateDeleting specifies the origin resource state deleting
|
||||
// state for origin resource state.
|
||||
// OriginResourceStateDeleting specifies the origin resource state deleting state for origin resource state.
|
||||
OriginResourceStateDeleting OriginResourceState = "Deleting"
|
||||
)
|
||||
|
||||
|
@ -110,35 +142,27 @@ const (
|
|||
type ProfileResourceState string
|
||||
|
||||
const (
|
||||
// ProfileResourceStateActive specifies the profile resource state active
|
||||
// state for profile resource state.
|
||||
// ProfileResourceStateActive specifies the profile resource state active state for profile resource state.
|
||||
ProfileResourceStateActive ProfileResourceState = "Active"
|
||||
// ProfileResourceStateCreating specifies the profile resource state
|
||||
// creating state for profile resource state.
|
||||
// ProfileResourceStateCreating specifies the profile resource state creating state for profile resource state.
|
||||
ProfileResourceStateCreating ProfileResourceState = "Creating"
|
||||
// ProfileResourceStateDeleting specifies the profile resource state
|
||||
// deleting state for profile resource state.
|
||||
// ProfileResourceStateDeleting specifies the profile resource state deleting state for profile resource state.
|
||||
ProfileResourceStateDeleting ProfileResourceState = "Deleting"
|
||||
// ProfileResourceStateDisabled specifies the profile resource state
|
||||
// disabled state for profile resource state.
|
||||
// ProfileResourceStateDisabled specifies the profile resource state disabled state for profile resource state.
|
||||
ProfileResourceStateDisabled ProfileResourceState = "Disabled"
|
||||
)
|
||||
|
||||
// QueryStringCachingBehavior enumerates the values for query string caching
|
||||
// behavior.
|
||||
// QueryStringCachingBehavior enumerates the values for query string caching behavior.
|
||||
type QueryStringCachingBehavior string
|
||||
|
||||
const (
|
||||
// BypassCaching specifies the bypass caching state for query string
|
||||
// caching behavior.
|
||||
// BypassCaching specifies the bypass caching state for query string caching behavior.
|
||||
BypassCaching QueryStringCachingBehavior = "BypassCaching"
|
||||
// IgnoreQueryString specifies the ignore query string state for query
|
||||
// string caching behavior.
|
||||
// IgnoreQueryString specifies the ignore query string state for query string caching behavior.
|
||||
IgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString"
|
||||
// NotSet specifies the not set state for query string caching behavior.
|
||||
NotSet QueryStringCachingBehavior = "NotSet"
|
||||
// UseQueryString specifies the use query string state for query string
|
||||
// caching behavior.
|
||||
// UseQueryString specifies the use query string state for query string caching behavior.
|
||||
UseQueryString QueryStringCachingBehavior = "UseQueryString"
|
||||
)
|
||||
|
||||
|
@ -146,8 +170,7 @@ const (
|
|||
type ResourceType string
|
||||
|
||||
const (
|
||||
// MicrosoftCdnProfilesEndpoints specifies the microsoft cdn profiles
|
||||
// endpoints state for resource type.
|
||||
// MicrosoftCdnProfilesEndpoints specifies the microsoft cdn profiles endpoints state for resource type.
|
||||
MicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints"
|
||||
)
|
||||
|
||||
|
@ -181,14 +204,14 @@ type CheckNameAvailabilityOutput struct {
|
|||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// CidrIPAddress is cIDR Ip address
|
||||
// CidrIPAddress is CIDR Ip address
|
||||
type CidrIPAddress struct {
|
||||
BaseIPAddress *string `json:"baseIpAddress,omitempty"`
|
||||
PrefixLength *int32 `json:"prefixLength,omitempty"`
|
||||
}
|
||||
|
||||
// CustomDomain is customer provided domain for branding purposes, e.g.
|
||||
// www.consoto.com.
|
||||
// CustomDomain is friendly domain name mapping to the endpoint hostname that the customer provides for branding
|
||||
// purposes, e.g. www.consoto.com.
|
||||
type CustomDomain struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -199,9 +222,8 @@ type CustomDomain struct {
|
|||
*CustomDomainProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CustomDomainListResult is result of the request to list custom domains. It
|
||||
// contains a list of custom domain objects and a URL link to get the next set
|
||||
// of results.
|
||||
// CustomDomainListResult is result of the request to list custom domains. It contains a list of custom domain objects
|
||||
// and a URL link to get the next set of results.
|
||||
type CustomDomainListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]CustomDomain `json:"value,omitempty"`
|
||||
|
@ -220,43 +242,40 @@ func (client CustomDomainListResult) CustomDomainListResultPreparer() (*http.Req
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// CustomDomainParameters is the customDomain JSON object required for custom
|
||||
// domain creation or update.
|
||||
// CustomDomainParameters is the customDomain JSON object required for custom domain creation or update.
|
||||
type CustomDomainParameters struct {
|
||||
*CustomDomainPropertiesParameters `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// CustomDomainProperties is the JSON object that contains the properties of
|
||||
// the custom domain to create.
|
||||
// CustomDomainProperties is the JSON object that contains the properties of the custom domain to create.
|
||||
type CustomDomainProperties struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
ResourceState CustomDomainResourceState `json:"resourceState,omitempty"`
|
||||
CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"`
|
||||
ValidationData *string `json:"validationData,omitempty"`
|
||||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
ResourceState CustomDomainResourceState `json:"resourceState,omitempty"`
|
||||
CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"`
|
||||
CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"`
|
||||
ValidationData *string `json:"validationData,omitempty"`
|
||||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
}
|
||||
|
||||
// CustomDomainPropertiesParameters is the JSON object that contains the
|
||||
// properties of the custom domain to create.
|
||||
// CustomDomainPropertiesParameters is the JSON object that contains the properties of the custom domain to create.
|
||||
type CustomDomainPropertiesParameters struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
}
|
||||
|
||||
// DeepCreatedOrigin is origin to be added when creating a CDN endpoint.
|
||||
// DeepCreatedOrigin is the main origin of CDN content which is added when creating a CDN endpoint.
|
||||
type DeepCreatedOrigin struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
*DeepCreatedOriginProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// DeepCreatedOriginProperties is properties of origin Properties of the origin
|
||||
// created on the CDN endpoint.
|
||||
// DeepCreatedOriginProperties is properties of the origin created on the CDN endpoint.
|
||||
type DeepCreatedOriginProperties struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
HTTPPort *int32 `json:"httpPort,omitempty"`
|
||||
HTTPSPort *int32 `json:"httpsPort,omitempty"`
|
||||
}
|
||||
|
||||
// EdgeNode is edge node of CDN service.
|
||||
// EdgeNode is edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users.
|
||||
type EdgeNode struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
@ -266,14 +285,13 @@ type EdgeNode struct {
|
|||
*EdgeNodeProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// EdgeNodeProperties is the JSON object that contains the properties required
|
||||
// to create an edgenode.
|
||||
// EdgeNodeProperties is the JSON object that contains the properties required to create an edgenode.
|
||||
type EdgeNodeProperties struct {
|
||||
IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"`
|
||||
}
|
||||
|
||||
// EdgenodeResult is result of the request to list CDN edgenodes. It contains a
|
||||
// list of ip address group and a URL link to get the next set of results.
|
||||
// EdgenodeResult is result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link
|
||||
// to get the next set of results.
|
||||
type EdgenodeResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]EdgeNode `json:"value,omitempty"`
|
||||
|
@ -292,10 +310,8 @@ func (client EdgenodeResult) EdgenodeResultPreparer() (*http.Request, error) {
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// Endpoint is cDN endpoint is the entity within a CDN profile containing
|
||||
// configuration information such as origin, protocol, content caching and
|
||||
// delivery behavior. The CDN endpoint uses the URL format
|
||||
// <endpointname>.azureedge.net.
|
||||
// Endpoint is CDN endpoint is the entity within a CDN profile containing configuration information such as origin,
|
||||
// protocol, content caching and delivery behavior. The CDN endpoint uses the URL format <endpointname>.azureedge.net.
|
||||
type Endpoint struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -306,8 +322,8 @@ type Endpoint struct {
|
|||
*EndpointProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointListResult is result of the request to list endpoints. It contains a
|
||||
// list of endpoint objects and a URL link to get the the next set of results.
|
||||
// EndpointListResult is result of the request to list endpoints. It contains a list of endpoint objects and a URL link
|
||||
// to get the the next set of results.
|
||||
type EndpointListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Endpoint `json:"value,omitempty"`
|
||||
|
@ -326,8 +342,7 @@ func (client EndpointListResult) EndpointListResultPreparer() (*http.Request, er
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// EndpointProperties is the JSON object that contains the properties required
|
||||
// to create an endpoint.
|
||||
// EndpointProperties is the JSON object that contains the properties required to create an endpoint.
|
||||
type EndpointProperties struct {
|
||||
OriginHostHeader *string `json:"originHostHeader,omitempty"`
|
||||
OriginPath *string `json:"originPath,omitempty"`
|
||||
|
@ -336,7 +351,8 @@ type EndpointProperties struct {
|
|||
IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
|
||||
IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
|
||||
QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
|
||||
OptimizationType *string `json:"optimizationType,omitempty"`
|
||||
OptimizationType OptimizationType `json:"optimizationType,omitempty"`
|
||||
ProbePath *string `json:"probePath,omitempty"`
|
||||
GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
Origins *[]DeepCreatedOrigin `json:"origins,omitempty"`
|
||||
|
@ -344,9 +360,7 @@ type EndpointProperties struct {
|
|||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointPropertiesUpdateParameters is result of the request to list
|
||||
// endpoints. It contains a list of endpoints and a URL link to get the next
|
||||
// set of results.
|
||||
// EndpointPropertiesUpdateParameters is the JSON object containing endpoint update parameters.
|
||||
type EndpointPropertiesUpdateParameters struct {
|
||||
OriginHostHeader *string `json:"originHostHeader,omitempty"`
|
||||
OriginPath *string `json:"originPath,omitempty"`
|
||||
|
@ -355,31 +369,32 @@ type EndpointPropertiesUpdateParameters struct {
|
|||
IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"`
|
||||
IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"`
|
||||
QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"`
|
||||
OptimizationType *string `json:"optimizationType,omitempty"`
|
||||
OptimizationType OptimizationType `json:"optimizationType,omitempty"`
|
||||
ProbePath *string `json:"probePath,omitempty"`
|
||||
GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
|
||||
}
|
||||
|
||||
// EndpointUpdateParameters is properties required to create a new endpoint.
|
||||
// EndpointUpdateParameters is properties required to create or update an endpoint.
|
||||
type EndpointUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*EndpointPropertiesUpdateParameters `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorResponse is error reponse indicates CDN service is not able to process
|
||||
// the incoming request. The reason is provided in the error message.
|
||||
// ErrorResponse is error reponse indicates CDN service is not able to process the incoming request. The reason is
|
||||
// provided in the error message.
|
||||
type ErrorResponse struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// GeoFilter is rules defining user geo access within a CDN endpoint.
|
||||
// GeoFilter is rules defining user's geo access within a CDN endpoint.
|
||||
type GeoFilter struct {
|
||||
RelativePath *string `json:"relativePath,omitempty"`
|
||||
Action GeoFilterActions `json:"action,omitempty"`
|
||||
CountryCodes *[]string `json:"countryCodes,omitempty"`
|
||||
}
|
||||
|
||||
// IPAddressGroup is cDN Ip address group
|
||||
// IPAddressGroup is CDN Ip address group
|
||||
type IPAddressGroup struct {
|
||||
DeliveryRegion *string `json:"deliveryRegion,omitempty"`
|
||||
Ipv4Addresses *[]CidrIPAddress `json:"ipv4Addresses,omitempty"`
|
||||
|
@ -391,7 +406,7 @@ type LoadParameters struct {
|
|||
ContentPaths *[]string `json:"contentPaths,omitempty"`
|
||||
}
|
||||
|
||||
// Operation is cDN REST API operation
|
||||
// Operation is CDN REST API operation
|
||||
type Operation struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplay `json:"display,omitempty"`
|
||||
|
@ -404,17 +419,17 @@ type OperationDisplay struct {
|
|||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of the request to list CDN operations. It
|
||||
// contains a list of operations and a URL link to get the next set of results.
|
||||
type OperationListResult struct {
|
||||
// OperationsListResult is result of the request to list CDN operations. It contains a list of operations and a URL
|
||||
// link to get the next set of results.
|
||||
type OperationsListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// OperationsListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) {
|
||||
func (client OperationsListResult) OperationsListResultPreparer() (*http.Request, error) {
|
||||
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -424,9 +439,8 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request,
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// Origin is cDN origin is the source of the content being delivered via CDN.
|
||||
// When the edge nodes represented by an endpoint do not have the requested
|
||||
// content cached, they attempt to fetch it from one or more of the configured
|
||||
// Origin is CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an
|
||||
// endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured
|
||||
// origins.
|
||||
type Origin struct {
|
||||
autorest.Response `json:"-"`
|
||||
|
@ -438,8 +452,8 @@ type Origin struct {
|
|||
*OriginProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// OriginListResult is result of the request to list origins. It contains a
|
||||
// list of origin objects and a URL link to get the next set of results.
|
||||
// OriginListResult is result of the request to list origins. It contains a list of origin objects and a URL link to
|
||||
// get the next set of results.
|
||||
type OriginListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Origin `json:"value,omitempty"`
|
||||
|
@ -458,8 +472,7 @@ func (client OriginListResult) OriginListResultPreparer() (*http.Request, error)
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// OriginProperties is the JSON object that contains the properties of the
|
||||
// origin to create.
|
||||
// OriginProperties is the JSON object that contains the properties of the origin.
|
||||
type OriginProperties struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
HTTPPort *int32 `json:"httpPort,omitempty"`
|
||||
|
@ -468,24 +481,20 @@ type OriginProperties struct {
|
|||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
}
|
||||
|
||||
// OriginPropertiesParameters is the JSON object that contains the properties
|
||||
// of the origin to create.
|
||||
// OriginPropertiesParameters is the JSON object that contains the properties of the origin.
|
||||
type OriginPropertiesParameters struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
HTTPPort *int32 `json:"httpPort,omitempty"`
|
||||
HTTPSPort *int32 `json:"httpsPort,omitempty"`
|
||||
}
|
||||
|
||||
// OriginUpdateParameters is origin properties needed for origin creation or
|
||||
// update.
|
||||
// OriginUpdateParameters is origin properties needed for origin creation or update.
|
||||
type OriginUpdateParameters struct {
|
||||
*OriginPropertiesParameters `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// Profile is cDN profile represents the top level resource and the entry point
|
||||
// into the CDN API. This allows users to set up a logical grouping of
|
||||
// endpoints in addition to creating shared configuration settings and
|
||||
// selecting pricing tiers and providers.
|
||||
// Profile is CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and
|
||||
// pricing tier.
|
||||
type Profile struct {
|
||||
autorest.Response `json:"-"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
@ -497,8 +506,8 @@ type Profile struct {
|
|||
*ProfileProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ProfileListResult is result of the request to list profiles. It contains a
|
||||
// list of profile objects and a URL link to get the the next set of results.
|
||||
// ProfileListResult is result of the request to list profiles. It contains a list of profile objects and a URL link to
|
||||
// get the the next set of results.
|
||||
type ProfileListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Profile `json:"value,omitempty"`
|
||||
|
@ -517,8 +526,7 @@ func (client ProfileListResult) ProfileListResultPreparer() (*http.Request, erro
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// ProfileProperties is the JSON object that contains the properties required
|
||||
// to create a profile.
|
||||
// ProfileProperties is the JSON object that contains the properties required to create a profile.
|
||||
type ProfileProperties struct {
|
||||
ResourceState ProfileResourceState `json:"resourceState,omitempty"`
|
||||
ProvisioningState *string `json:"provisioningState,omitempty"`
|
||||
|
@ -570,20 +578,24 @@ func (client ResourceUsageListResult) ResourceUsageListResultPreparer() (*http.R
|
|||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// Sku is the pricing tier (defines a CDN provider, feature list and rate) of
|
||||
// the CDN profile.
|
||||
// Sku is the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
|
||||
type Sku struct {
|
||||
Name SkuName `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SsoURI is sSO URI required to login to the supplemental portal.
|
||||
// SsoURI is the URI required to login to the supplemental portal from the Azure portal.
|
||||
type SsoURI struct {
|
||||
autorest.Response `json:"-"`
|
||||
SsoURIValue *string `json:"ssoUriValue,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateCustomDomainInput is input of the custom domain to be validated for
|
||||
// DNS mapping.
|
||||
// SupportedOptimizationTypesListResult is the result of the GetSupportedOptimizationTypes API
|
||||
type SupportedOptimizationTypesListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
SupportedOptimizationTypes *[]OptimizationType `json:"supportedOptimizationTypes,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateCustomDomainInput is input of the custom domain to be validated for DNS mapping.
|
||||
type ValidateCustomDomainInput struct {
|
||||
HostName *string `json:"hostName,omitempty"`
|
||||
}
|
||||
|
@ -595,3 +607,16 @@ type ValidateCustomDomainOutput struct {
|
|||
Reason *string `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateProbeInput is input of the validate probe API.
|
||||
type ValidateProbeInput struct {
|
||||
ProbeURL *string `json:"probeURL,omitempty"`
|
||||
}
|
||||
|
||||
// ValidateProbeOutput is output of the validate probe API.
|
||||
type ValidateProbeOutput struct {
|
||||
autorest.Response `json:"-"`
|
||||
IsValid *bool `json:"isValid,omitempty"`
|
||||
ErrorCode *string `json:"errorCode,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
|
166
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go
generated
vendored
Normal file
166
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go
generated
vendored
Normal file
|
@ -0,0 +1,166 @@
|
|||
package cdn
|
||||
|
||||
// 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.
|
||||
// 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 use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must
|
||||
// make sure that requests made to these resources are secure.
|
||||
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 lists all of the available CDN REST API operations.
|
||||
func (client OperationsClient) List() (result OperationsListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.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, "cdn.OperationsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.Cdn/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
|
||||
}
|
||||
|
||||
// ListNextResults retrieves the next set of results, if any.
|
||||
func (client OperationsClient) ListNextResults(lastResults OperationsListResult) (result OperationsListResult, err error) {
|
||||
req, err := lastResults.OperationsListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "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, "cdn.OperationsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
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
|
||||
}
|
96
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go
generated
vendored
96
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,9 +24,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// OriginsClient is the use these APIs to manage Azure CDN resources through
|
||||
// the Azure Resource Manager. You must make sure that requests made to these
|
||||
// resources are secure.
|
||||
// OriginsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make
|
||||
// sure that requests made to these resources are secure.
|
||||
type OriginsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -44,11 +42,9 @@ func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsC
|
|||
|
||||
// Get gets an existing origin within an endpoint.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. originName is name of the origin which is unique
|
||||
// within the endpoint.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. originName is name of the origin which is unique within the endpoint.
|
||||
func (client OriginsClient) Get(resourceGroupName string, profileName string, endpointName string, originName string) (result Origin, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -89,7 +85,7 @@ func (client OriginsClient) GetPreparer(resourceGroupName string, profileName st
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -123,10 +119,9 @@ func (client OriginsClient) GetResponder(resp *http.Response) (result Origin, er
|
|||
|
||||
// ListByEndpoint lists all of the existing origins within an endpoint.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally.
|
||||
func (client OriginsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result OriginListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -166,7 +161,7 @@ func (client OriginsClient) ListByEndpointPreparer(resourceGroupName string, pro
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -222,16 +217,59 @@ func (client OriginsClient) ListByEndpointNextResults(lastResults OriginListResu
|
|||
return
|
||||
}
|
||||
|
||||
// Update updates an existing origin within an endpoint. 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.
|
||||
// ListByEndpointComplete gets all elements from the list without paging.
|
||||
func (client OriginsClient) ListByEndpointComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Origin, <-chan error) {
|
||||
resultChan := make(chan Origin)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByEndpoint(resourceGroupName, profileName, endpointName)
|
||||
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.ListByEndpointNextResults(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
|
||||
}
|
||||
|
||||
// Update updates an existing origin within an endpoint. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. endpointName is name of the endpoint under the profile
|
||||
// which is unique globally. originName is name of the origin which is unique
|
||||
// within the endpoint. originUpdateProperties is origin properties
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is
|
||||
// unique globally. originName is name of the origin which is unique within the endpoint. originUpdateProperties is
|
||||
// origin properties
|
||||
func (client OriginsClient) Update(resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, cancel <-chan struct{}) (<-chan Origin, <-chan error) {
|
||||
resultChan := make(chan Origin, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -250,8 +288,10 @@ func (client OriginsClient) Update(resourceGroupName string, profileName string,
|
|||
var err error
|
||||
var result Origin
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -286,7 +326,7 @@ func (client OriginsClient) UpdatePreparer(resourceGroupName string, profileName
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
328
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go
generated
vendored
328
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,9 +24,8 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ProfilesClient is the use these APIs to manage Azure CDN resources through
|
||||
// the Azure Resource Manager. You must make sure that requests made to these
|
||||
// resources are secure.
|
||||
// ProfilesClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make
|
||||
// sure that requests made to these resources are secure.
|
||||
type ProfilesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -37,21 +35,17 @@ func NewProfilesClient(subscriptionID string) ProfilesClient {
|
|||
return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient
|
||||
// client.
|
||||
// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client.
|
||||
func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient {
|
||||
return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create creates a new CDN profile with a profile name under the specified
|
||||
// subscription and resource group. 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.
|
||||
// Create creates a new CDN profile with a profile name under the specified subscription and resource group. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. profile is profile properties needed to create a new
|
||||
// profile.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. profile is profile properties needed to create a new profile.
|
||||
func (client ProfilesClient) Create(resourceGroupName string, profileName string, profile Profile, cancel <-chan struct{}) (<-chan Profile, <-chan error) {
|
||||
resultChan := make(chan Profile, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -72,8 +66,10 @@ func (client ProfilesClient) Create(resourceGroupName string, profileName string
|
|||
var err error
|
||||
var result Profile
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -106,7 +102,7 @@ func (client ProfilesClient) CreatePreparer(resourceGroupName string, profileNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -142,16 +138,13 @@ func (client ProfilesClient) CreateResponder(resp *http.Response) (result Profil
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes an existing CDN profile with the specified parameters.
|
||||
// Deleting a profile will result in the deletion of all of the sub-resources
|
||||
// including endpoints, origins and custom domains. 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.
|
||||
// Delete deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion
|
||||
// of all of the sub-resources including endpoints, origins and custom domains. 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 name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client ProfilesClient) Delete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -170,8 +163,10 @@ func (client ProfilesClient) Delete(resourceGroupName string, profileName string
|
|||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -204,7 +199,7 @@ func (client ProfilesClient) DeletePreparer(resourceGroupName string, profileNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -237,16 +232,13 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore
|
|||
return
|
||||
}
|
||||
|
||||
// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN
|
||||
// supplemental portal. Supplemnetal portal is used to configure advanced
|
||||
// feature capabilities that are not yet available in the Azure portal, such as
|
||||
// core reports in a standard profile; rules engine, advanced HTTP reports, and
|
||||
// real-time stats and alerts in a premium profile. The SSO URI changes
|
||||
// approximately every 10 minutes.
|
||||
// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemnetal portal is
|
||||
// used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports
|
||||
// in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The
|
||||
// SSO URI changes approximately every 10 minutes.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client ProfilesClient) GenerateSsoURI(resourceGroupName string, profileName string) (result SsoURI, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -285,7 +277,7 @@ func (client ProfilesClient) GenerateSsoURIPreparer(resourceGroupName string, pr
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -317,12 +309,10 @@ func (client ProfilesClient) GenerateSsoURIResponder(resp *http.Response) (resul
|
|||
return
|
||||
}
|
||||
|
||||
// Get gets a CDN profile with the specified profile name under the specified
|
||||
// subscription and resource group.
|
||||
// Get gets a CDN profile with the specified profile name under the specified subscription and resource group.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client ProfilesClient) Get(resourceGroupName string, profileName string) (result Profile, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -361,7 +351,7 @@ func (client ProfilesClient) GetPreparer(resourceGroupName string, profileName s
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -422,7 +412,7 @@ func (client ProfilesClient) ListPreparer() (*http.Request, error) {
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -478,10 +468,54 @@ func (client ProfilesClient) ListNextResults(lastResults ProfileListResult) (res
|
|||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ProfilesClient) ListComplete(cancel <-chan struct{}) (<-chan Profile, <-chan error) {
|
||||
resultChan := make(chan Profile)
|
||||
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 lists all of the CDN profiles within a resource group.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription.
|
||||
func (client ProfilesClient) ListByResourceGroup(resourceGroupName string) (result ProfileListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -519,7 +553,7 @@ func (client ProfilesClient) ListByResourceGroupPreparer(resourceGroupName strin
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -575,12 +609,55 @@ func (client ProfilesClient) ListByResourceGroupNextResults(lastResults ProfileL
|
|||
return
|
||||
}
|
||||
|
||||
// ListResourceUsage checks the quota and actual usage of endpoints under the
|
||||
// given CDN profile.
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ProfilesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Profile, <-chan error) {
|
||||
resultChan := make(chan Profile)
|
||||
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
|
||||
}
|
||||
|
||||
// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client ProfilesClient) ListResourceUsage(resourceGroupName string, profileName string) (result ResourceUsageListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
|
@ -619,7 +696,7 @@ func (client ProfilesClient) ListResourceUsagePreparer(resourceGroupName string,
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -675,16 +752,133 @@ func (client ProfilesClient) ListResourceUsageNextResults(lastResults ResourceUs
|
|||
return
|
||||
}
|
||||
|
||||
// Update updates an existing CDN profile with the specified profile name under
|
||||
// the specified subscription and resource group. 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.
|
||||
// ListResourceUsageComplete gets all elements from the list without paging.
|
||||
func (client ProfilesClient) ListResourceUsageComplete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) {
|
||||
resultChan := make(chan ResourceUsage)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListResourceUsage(resourceGroupName, profileName)
|
||||
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.ListResourceUsageNextResults(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
|
||||
}
|
||||
|
||||
// ListSupportedOptimizationTypes gets the supported optimization types for the current profile. A user can create an
|
||||
// endpoint with an optimization type from the listed values.
|
||||
//
|
||||
// resourceGroupName is name of the Resource group within the Azure
|
||||
// subscription. profileName is name of the CDN profile which is unique within
|
||||
// the resource group. profileUpdateParameters is profile properties needed to
|
||||
// update an existing profile.
|
||||
// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group.
|
||||
func (client ProfilesClient) ListSupportedOptimizationTypes(resourceGroupName string, profileName string) (result SupportedOptimizationTypesListResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes")
|
||||
}
|
||||
|
||||
req, err := client.ListSupportedOptimizationTypesPreparer(resourceGroupName, profileName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSupportedOptimizationTypesSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListSupportedOptimizationTypesResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListSupportedOptimizationTypesPreparer prepares the ListSupportedOptimizationTypes request.
|
||||
func (client ProfilesClient) ListSupportedOptimizationTypesPreparer(resourceGroupName string, profileName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"profileName": autorest.Encode("path", profileName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSupportedOptimizationTypesSender sends the ListSupportedOptimizationTypes request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ProfilesClient) ListSupportedOptimizationTypesSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListSupportedOptimizationTypesResponder handles the response to the ListSupportedOptimizationTypes request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ProfilesClient) ListSupportedOptimizationTypesResponder(resp *http.Response) (result SupportedOptimizationTypesListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates an existing CDN profile with the specified profile name under the specified subscription and resource
|
||||
// group. 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 name of the Resource group within the Azure subscription. profileName is name of the CDN
|
||||
// profile which is unique within the resource group. profileUpdateParameters is profile properties needed to update an
|
||||
// existing profile.
|
||||
func (client ProfilesClient) Update(resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, cancel <-chan struct{}) (<-chan Profile, <-chan error) {
|
||||
resultChan := make(chan Profile, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -703,8 +897,10 @@ func (client ProfilesClient) Update(resourceGroupName string, profileName string
|
|||
var err error
|
||||
var result Profile
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -737,7 +933,7 @@ func (client ProfilesClient) UpdatePreparer(resourceGroupName string, profileNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-10-02"
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
170
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go
generated
vendored
Normal file
170
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go
generated
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
package cdn
|
||||
|
||||
// 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.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ResourceUsageClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must
|
||||
// make sure that requests made to these resources are secure.
|
||||
type ResourceUsageClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewResourceUsageClient creates an instance of the ResourceUsageClient client.
|
||||
func NewResourceUsageClient(subscriptionID string) ResourceUsageClient {
|
||||
return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client.
|
||||
func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) ResourceUsageClient {
|
||||
return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List check the quota and actual usage of the CDN profiles under the given subscription.
|
||||
func (client ResourceUsageClient) List() (result ResourceUsageListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client ResourceUsageClient) ListPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-04-02"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage", 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 ResourceUsageClient) 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 ResourceUsageClient) ListResponder(resp *http.Response) (result ResourceUsageListResult, 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 ResourceUsageClient) ListNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
|
||||
req, err := lastResults.ResourceUsageListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "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, "cdn.ResourceUsageClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ResourceUsageClient) ListComplete(cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) {
|
||||
resultChan := make(chan ResourceUsage)
|
||||
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
|
||||
}
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-cdn/2016-10-02"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-cdn/2017-04-02"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
281
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go
generated
vendored
281
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go
generated
vendored
|
@ -14,9 +14,8 @@ package cognitiveservices
|
|||
// 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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -35,27 +34,21 @@ func NewAccountsClient(subscriptionID string) AccountsClient {
|
|||
return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewAccountsClientWithBaseURI creates an instance of the AccountsClient
|
||||
// client.
|
||||
// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client.
|
||||
func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient {
|
||||
return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create create Cognitive Services Account. Accounts is a resource group wide
|
||||
// resource type. It holds the keys for developer to access intelligent APIs.
|
||||
// It's also the resource type for billing.
|
||||
// Create create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for
|
||||
// developer to access intelligent APIs. It's also the resource type for billing.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only. parameters is the parameters to provide for the created
|
||||
// account.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account. parameters is the parameters to provide for the created account.
|
||||
func (client AccountsClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil},
|
||||
|
@ -93,7 +86,7 @@ func (client AccountsClient) CreatePreparer(resourceGroupName string, accountNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -129,16 +122,13 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result Accoun
|
|||
|
||||
// Delete deletes a Cognitive Services account from the resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account.
|
||||
func (client AccountsClient) Delete(resourceGroupName string, accountName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "Delete")
|
||||
}
|
||||
|
@ -172,7 +162,7 @@ func (client AccountsClient) DeletePreparer(resourceGroupName string, accountNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -203,19 +193,15 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore
|
|||
return
|
||||
}
|
||||
|
||||
// GetProperties returns a Cognitive Services account specified by the
|
||||
// parameters.
|
||||
// GetProperties returns a Cognitive Services account specified by the parameters.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account.
|
||||
func (client AccountsClient) GetProperties(resourceGroupName string, accountName string) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "GetProperties")
|
||||
}
|
||||
|
@ -249,7 +235,7 @@ func (client AccountsClient) GetPropertiesPreparer(resourceGroupName string, acc
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -281,8 +267,7 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// List returns all the resources of a particular type belonging to a
|
||||
// subscription.
|
||||
// List returns all the resources of a particular type belonging to a subscription.
|
||||
func (client AccountsClient) List() (result AccountListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -311,7 +296,7 @@ func (client AccountsClient) ListPreparer() (*http.Request, error) {
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -343,11 +328,78 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result AccountL
|
|||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup returns all the resources of a particular type belonging
|
||||
// to a resource group
|
||||
// ListNextResults retrieves the next set of results, if any.
|
||||
func (client AccountsClient) ListNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
|
||||
req, err := lastResults.AccountListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "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, "cognitiveservices.AccountsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client AccountsClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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 returns all the resources of a particular type belonging to a resource group
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription.
|
||||
func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
|
@ -377,7 +429,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(resourceGroupName strin
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -409,19 +461,84 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (
|
|||
return
|
||||
}
|
||||
|
||||
// ListKeys lists the account keys for the specified Cognitive Services
|
||||
// account.
|
||||
// ListByResourceGroupNextResults retrieves the next set of results, if any.
|
||||
func (client AccountsClient) ListByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
|
||||
req, err := lastResults.AccountListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "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, "cognitiveservices.AccountsClient", "ListByResourceGroup", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "ListByResourceGroup", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client AccountsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) {
|
||||
resultChan := make(chan Account)
|
||||
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
|
||||
}
|
||||
|
||||
// ListKeys lists the account keys for the specified Cognitive Services account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Congitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account.
|
||||
func (client AccountsClient) ListKeys(resourceGroupName string, accountName string) (result AccountKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "ListKeys")
|
||||
}
|
||||
|
@ -455,7 +572,7 @@ func (client AccountsClient) ListKeysPreparer(resourceGroupName string, accountN
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -489,16 +606,13 @@ func (client AccountsClient) ListKeysResponder(resp *http.Response) (result Acco
|
|||
|
||||
// ListSkus list available SKUs for the requested Cognitive Services account
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only.
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account.
|
||||
func (client AccountsClient) ListSkus(resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "ListSkus")
|
||||
}
|
||||
|
@ -532,7 +646,7 @@ func (client AccountsClient) ListSkusPreparer(resourceGroupName string, accountN
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -564,24 +678,20 @@ func (client AccountsClient) ListSkusResponder(resp *http.Response) (result Acco
|
|||
return
|
||||
}
|
||||
|
||||
// RegenerateKey regenerates the specified account key for the specified
|
||||
// Cognitive Services account.
|
||||
// RegenerateKey regenerates the specified account key for the specified Cognitive Services account.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only. body is regenerate key parameters.
|
||||
func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, body RegenerateKeyParameters) (result AccountKeys, err error) {
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account. parameters is regenerate key parameters.
|
||||
func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (result AccountKeys, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "RegenerateKey")
|
||||
}
|
||||
|
||||
req, err := client.RegenerateKeyPreparer(resourceGroupName, accountName, body)
|
||||
req, err := client.RegenerateKeyPreparer(resourceGroupName, accountName, parameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "RegenerateKey", nil, "Failure preparing request")
|
||||
return
|
||||
|
@ -603,14 +713,14 @@ func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName
|
|||
}
|
||||
|
||||
// RegenerateKeyPreparer prepares the RegenerateKey request.
|
||||
func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, body RegenerateKeyParameters) (*http.Request, error) {
|
||||
func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"accountName": autorest.Encode("path", accountName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -620,7 +730,7 @@ func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, acc
|
|||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey", pathParameters),
|
||||
autorest.WithJSON(body),
|
||||
autorest.WithJSON(parameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
@ -646,21 +756,18 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result
|
|||
|
||||
// Update updates a Cognitive Services account
|
||||
//
|
||||
// resourceGroupName is the name of the resource group within the user's
|
||||
// subscription. accountName is the name of the cognitive services account
|
||||
// within the specified resource group. Cognitive Services account names must
|
||||
// be between 3 and 24 characters in length and use numbers and lower-case
|
||||
// letters only. body is the parameters to provide for the created account.
|
||||
func (client AccountsClient) Update(resourceGroupName string, accountName string, body AccountUpdateParameters) (result Account, err error) {
|
||||
// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of
|
||||
// Cognitive Services account. parameters is the parameters to provide for the created account.
|
||||
func (client AccountsClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: accountName,
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
|
||||
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
|
||||
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "Update")
|
||||
}
|
||||
|
||||
req, err := client.UpdatePreparer(resourceGroupName, accountName, body)
|
||||
req, err := client.UpdatePreparer(resourceGroupName, accountName, parameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
|
@ -682,14 +789,14 @@ func (client AccountsClient) Update(resourceGroupName string, accountName string
|
|||
}
|
||||
|
||||
// UpdatePreparer prepares the Update request.
|
||||
func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, body AccountUpdateParameters) (*http.Request, error) {
|
||||
func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"accountName": autorest.Encode("path", accountName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-01-preview"
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -699,7 +806,7 @@ func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountNam
|
|||
autorest.AsPatch(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", pathParameters),
|
||||
autorest.WithJSON(body),
|
||||
autorest.WithJSON(parameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
|
113
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go
generated
vendored
Normal file
113
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go
generated
vendored
Normal file
|
@ -0,0 +1,113 @@
|
|||
package cognitiveservices
|
||||
|
||||
// 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.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// CheckSkuAvailabilityClient is the cognitive Services Management Client
|
||||
type CheckSkuAvailabilityClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewCheckSkuAvailabilityClient creates an instance of the CheckSkuAvailabilityClient client.
|
||||
func NewCheckSkuAvailabilityClient(subscriptionID string) CheckSkuAvailabilityClient {
|
||||
return NewCheckSkuAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewCheckSkuAvailabilityClientWithBaseURI creates an instance of the CheckSkuAvailabilityClient client.
|
||||
func NewCheckSkuAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckSkuAvailabilityClient {
|
||||
return CheckSkuAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List check available SKUs.
|
||||
//
|
||||
// location is resource location. parameters is check SKU Availablity POST body.
|
||||
func (client CheckSkuAvailabilityClient) List(location string, parameters CheckSkuAvailabilityParameter) (result CheckSkuAvailabilityResultList, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.Skus", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List")
|
||||
}
|
||||
|
||||
req, err := client.ListPreparer(location, parameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client CheckSkuAvailabilityClient) ListPreparer(location string, parameters CheckSkuAvailabilityParameter) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"location": autorest.Encode("path", location),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsJSON(),
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability", pathParameters),
|
||||
autorest.WithJSON(parameters),
|
||||
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 CheckSkuAvailabilityClient) 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 CheckSkuAvailabilityClient) ListResponder(resp *http.Response) (result CheckSkuAvailabilityResultList, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
8
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go
generated
vendored
|
@ -1,5 +1,4 @@
|
|||
// Package cognitiveservices implements the Azure ARM Cognitiveservices service
|
||||
// API version 2016-02-01-preview.
|
||||
// Package cognitiveservices implements the Azure ARM Cognitiveservices service API version 2017-04-18.
|
||||
//
|
||||
// Cognitive Services Management Client
|
||||
package cognitiveservices
|
||||
|
@ -18,9 +17,8 @@ package cognitiveservices
|
|||
// 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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
99
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go
generated
vendored
99
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go
generated
vendored
|
@ -14,12 +14,13 @@ package cognitiveservices
|
|||
// 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.
|
||||
// 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/to"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// KeyName enumerates the values for key name.
|
||||
|
@ -50,6 +51,8 @@ const (
|
|||
ComputerVision Kind = "ComputerVision"
|
||||
// ContentModerator specifies the content moderator state for kind.
|
||||
ContentModerator Kind = "ContentModerator"
|
||||
// CustomSpeech specifies the custom speech state for kind.
|
||||
CustomSpeech Kind = "CustomSpeech"
|
||||
// Emotion specifies the emotion state for kind.
|
||||
Emotion Kind = "Emotion"
|
||||
// Face specifies the face state for kind.
|
||||
|
@ -126,8 +129,8 @@ const (
|
|||
Standard SkuTier = "Standard"
|
||||
)
|
||||
|
||||
// Account is cognitive Services Account is an Azure resource representing the
|
||||
// provisioned account, its type, location and SKU.
|
||||
// Account is cognitive Services Account is an Azure resource representing the provisioned account, its type, location
|
||||
// and SKU.
|
||||
type Account struct {
|
||||
autorest.Response `json:"-"`
|
||||
Etag *string `json:"etag,omitempty"`
|
||||
|
@ -150,8 +153,7 @@ type AccountCreateParameters struct {
|
|||
Properties *map[string]interface{} `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// AccountEnumerateSkusResult is the list of cognitive services accounts
|
||||
// operation response.
|
||||
// AccountEnumerateSkusResult is the list of cognitive services accounts operation response.
|
||||
type AccountEnumerateSkusResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ResourceAndSku `json:"value,omitempty"`
|
||||
|
@ -164,17 +166,30 @@ type AccountKeys struct {
|
|||
Key2 *string `json:"key2,omitempty"`
|
||||
}
|
||||
|
||||
// AccountListResult is the list of cognitive services accounts operation
|
||||
// response.
|
||||
// AccountListResult is the list of cognitive services accounts operation response.
|
||||
type AccountListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
Value *[]Account `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// AccountProperties is
|
||||
// AccountListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client AccountListResult) AccountListResultPreparer() (*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)))
|
||||
}
|
||||
|
||||
// AccountProperties is properties of Cognitive Services account.
|
||||
type AccountProperties struct {
|
||||
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
|
||||
Endpoint *string `json:"endpoint,omitempty"`
|
||||
InternalID *string `json:"internalId,omitempty"`
|
||||
}
|
||||
|
||||
// AccountUpdateParameters is the parameters to provide for the account.
|
||||
|
@ -183,23 +198,81 @@ type AccountUpdateParameters struct {
|
|||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// Error is
|
||||
// CheckSkuAvailabilityParameter is check SKU availability parameter.
|
||||
type CheckSkuAvailabilityParameter struct {
|
||||
Skus *[]SkuName `json:"skus,omitempty"`
|
||||
Kind Kind `json:"kind,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// CheckSkuAvailabilityResult is check SKU availability result.
|
||||
type CheckSkuAvailabilityResult struct {
|
||||
Kind Kind `json:"kind,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
SkuName SkuName `json:"skuName,omitempty"`
|
||||
SkuAvailable *bool `json:"skuAvailable,omitempty"`
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// CheckSkuAvailabilityResultList is check SKU availability result list.
|
||||
type CheckSkuAvailabilityResultList struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]CheckSkuAvailabilityResult `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Error is cognitive Services error object.
|
||||
type Error struct {
|
||||
Error *ErrorBody `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// ErrorBody is
|
||||
// ErrorBody is cognitive Services error body.
|
||||
type ErrorBody struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// OperationDisplayInfo is the operation supported by Cognitive Services.
|
||||
type OperationDisplayInfo struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// OperationEntity is the operation supported by Cognitive Services.
|
||||
type OperationEntity struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplayInfo `json:"display,omitempty"`
|
||||
Origin *string `json:"origin,omitempty"`
|
||||
Properties *map[string]interface{} `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// OperationEntityListResult is the list of cognitive services accounts operation response.
|
||||
type OperationEntityListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
Value *[]OperationEntity `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// OperationEntityListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client OperationEntityListResult) OperationEntityListResultPreparer() (*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)))
|
||||
}
|
||||
|
||||
// RegenerateKeyParameters is regenerate key parameters.
|
||||
type RegenerateKeyParameters struct {
|
||||
KeyName KeyName `json:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceAndSku is
|
||||
// ResourceAndSku is cognitive Services resource type and SKU.
|
||||
type ResourceAndSku struct {
|
||||
ResourceType *string `json:"resourceType,omitempty"`
|
||||
Sku *Sku `json:"sku,omitempty"`
|
||||
|
|
165
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go
generated
vendored
Normal file
165
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go
generated
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
package cognitiveservices
|
||||
|
||||
// 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.
|
||||
// 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 cognitive Services 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 lists all the available Cognitive Services account operations.
|
||||
func (client OperationsClient) List() (result OperationEntityListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.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, "cognitiveservices.OperationsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-04-18"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.CognitiveServices/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 OperationEntityListResult, 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 OperationsClient) ListNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error) {
|
||||
req, err := lastResults.OperationEntityListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "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, "cognitiveservices.OperationsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error) {
|
||||
resultChan := make(chan OperationEntity)
|
||||
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
|
||||
}
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go
generated
vendored
|
@ -14,15 +14,15 @@ package cognitiveservices
|
|||
// 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.
|
||||
// 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-cognitiveservices/2016-02-01-preview"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-cognitiveservices/2017-04-18"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.2.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
8
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go
generated
vendored
|
@ -1,5 +1,4 @@
|
|||
// Package commerce implements the Azure ARM Commerce service API version
|
||||
// 2015-06-01-preview.
|
||||
// Package commerce implements the Azure ARM Commerce service API version 2015-06-01-preview.
|
||||
//
|
||||
//
|
||||
package commerce
|
||||
|
@ -18,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
221
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go
generated
vendored
221
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go
generated
vendored
|
@ -14,15 +14,16 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/date"
|
||||
"github.com/Azure/go-autorest/autorest/to"
|
||||
"github.com/satori/uuid"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/shopspring/decimal"
|
||||
"net/http"
|
||||
)
|
||||
|
@ -37,6 +38,18 @@ const (
|
|||
Hourly AggregationGranularity = "Hourly"
|
||||
)
|
||||
|
||||
// Name enumerates the values for name.
|
||||
type Name string
|
||||
|
||||
const (
|
||||
// NameMonetaryCommitment specifies the name monetary commitment state for name.
|
||||
NameMonetaryCommitment Name = "Monetary Commitment"
|
||||
// NameMonetaryCredit specifies the name monetary credit state for name.
|
||||
NameMonetaryCredit Name = "Monetary Credit"
|
||||
// NameRecurringCharge specifies the name recurring charge state for name.
|
||||
NameRecurringCharge Name = "Recurring Charge"
|
||||
)
|
||||
|
||||
// ErrorResponse is describes the format of Error response.
|
||||
type ErrorResponse struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
|
@ -62,28 +75,126 @@ type MeterInfo struct {
|
|||
IncludedQuantity *float64 `json:"IncludedQuantity,omitempty"`
|
||||
}
|
||||
|
||||
// MonetaryCommitment is indicates that a monetary commitment is required for
|
||||
// this offer
|
||||
// MonetaryCommitment is indicates that a monetary commitment is required for this offer
|
||||
type MonetaryCommitment struct {
|
||||
EffectiveDate *date.Time `json:"EffectiveDate,omitempty"`
|
||||
Name Name `json:"Name,omitempty"`
|
||||
TieredDiscount *map[string]*decimal.Decimal `json:"TieredDiscount,omitempty"`
|
||||
ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for MonetaryCommitment.
|
||||
func (mc MonetaryCommitment) MarshalJSON() ([]byte, error) {
|
||||
mc.Name = NameMonetaryCommitment
|
||||
type Alias MonetaryCommitment
|
||||
return json.Marshal(&struct {
|
||||
Alias
|
||||
}{
|
||||
Alias: (Alias)(mc),
|
||||
})
|
||||
}
|
||||
|
||||
// AsMonetaryCredit is the OfferTermInfo implementation for MonetaryCommitment.
|
||||
func (mc MonetaryCommitment) AsMonetaryCredit() (*MonetaryCredit, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// AsMonetaryCommitment is the OfferTermInfo implementation for MonetaryCommitment.
|
||||
func (mc MonetaryCommitment) AsMonetaryCommitment() (*MonetaryCommitment, bool) {
|
||||
return &mc, true
|
||||
}
|
||||
|
||||
// AsRecurringCharge is the OfferTermInfo implementation for MonetaryCommitment.
|
||||
func (mc MonetaryCommitment) AsRecurringCharge() (*RecurringCharge, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// MonetaryCredit is indicates that this is a monetary credit offer.
|
||||
type MonetaryCredit struct {
|
||||
EffectiveDate *date.Time `json:"EffectiveDate,omitempty"`
|
||||
Name Name `json:"Name,omitempty"`
|
||||
Credit *decimal.Decimal `json:"Credit,omitempty"`
|
||||
ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"`
|
||||
}
|
||||
|
||||
// OfferTermInfo is describes the offer term.
|
||||
type OfferTermInfo struct {
|
||||
EffectiveDate *date.Time `json:"EffectiveDate,omitempty"`
|
||||
// MarshalJSON is the custom marshaler for MonetaryCredit.
|
||||
func (mc MonetaryCredit) MarshalJSON() ([]byte, error) {
|
||||
mc.Name = NameMonetaryCredit
|
||||
type Alias MonetaryCredit
|
||||
return json.Marshal(&struct {
|
||||
Alias
|
||||
}{
|
||||
Alias: (Alias)(mc),
|
||||
})
|
||||
}
|
||||
|
||||
// RateCardQueryParameters is parameters that are used in the odata $filter
|
||||
// query parameter for providing RateCard information.
|
||||
// AsMonetaryCredit is the OfferTermInfo implementation for MonetaryCredit.
|
||||
func (mc MonetaryCredit) AsMonetaryCredit() (*MonetaryCredit, bool) {
|
||||
return &mc, true
|
||||
}
|
||||
|
||||
// AsMonetaryCommitment is the OfferTermInfo implementation for MonetaryCredit.
|
||||
func (mc MonetaryCredit) AsMonetaryCommitment() (*MonetaryCommitment, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// AsRecurringCharge is the OfferTermInfo implementation for MonetaryCredit.
|
||||
func (mc MonetaryCredit) AsRecurringCharge() (*RecurringCharge, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// OfferTermInfo is describes the offer term.
|
||||
type OfferTermInfo interface {
|
||||
AsMonetaryCredit() (*MonetaryCredit, bool)
|
||||
AsMonetaryCommitment() (*MonetaryCommitment, bool)
|
||||
AsRecurringCharge() (*RecurringCharge, bool)
|
||||
}
|
||||
|
||||
func unmarshalOfferTermInfo(body []byte) (OfferTermInfo, error) {
|
||||
var m map[string]interface{}
|
||||
err := json.Unmarshal(body, &m)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch m["Name"] {
|
||||
case string(NameMonetaryCredit):
|
||||
var mc MonetaryCredit
|
||||
err := json.Unmarshal(body, &mc)
|
||||
return mc, err
|
||||
case string(NameMonetaryCommitment):
|
||||
var mc MonetaryCommitment
|
||||
err := json.Unmarshal(body, &mc)
|
||||
return mc, err
|
||||
case string(NameRecurringCharge):
|
||||
var rc RecurringCharge
|
||||
err := json.Unmarshal(body, &rc)
|
||||
return rc, err
|
||||
default:
|
||||
return nil, errors.New("Unsupported type")
|
||||
}
|
||||
}
|
||||
func unmarshalOfferTermInfoArray(body []byte) ([]OfferTermInfo, error) {
|
||||
var rawMessages []*json.RawMessage
|
||||
err := json.Unmarshal(body, &rawMessages)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
otiArray := make([]OfferTermInfo, len(rawMessages))
|
||||
|
||||
for index, rawMessage := range rawMessages {
|
||||
oti, err := unmarshalOfferTermInfo(*rawMessage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
otiArray[index] = oti
|
||||
}
|
||||
return otiArray, nil
|
||||
}
|
||||
|
||||
// RateCardQueryParameters is parameters that are used in the odata $filter query parameter for providing RateCard
|
||||
// information.
|
||||
type RateCardQueryParameters struct {
|
||||
OfferDurableID *string `json:"OfferDurableId,omitempty"`
|
||||
Currency *string `json:"Currency,omitempty"`
|
||||
|
@ -94,9 +205,36 @@ type RateCardQueryParameters struct {
|
|||
// RecurringCharge is indicates a recurring charge is present for this offer.
|
||||
type RecurringCharge struct {
|
||||
EffectiveDate *date.Time `json:"EffectiveDate,omitempty"`
|
||||
Name Name `json:"Name,omitempty"`
|
||||
RecurringCharge *int32 `json:"RecurringCharge,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is the custom marshaler for RecurringCharge.
|
||||
func (rc RecurringCharge) MarshalJSON() ([]byte, error) {
|
||||
rc.Name = NameRecurringCharge
|
||||
type Alias RecurringCharge
|
||||
return json.Marshal(&struct {
|
||||
Alias
|
||||
}{
|
||||
Alias: (Alias)(rc),
|
||||
})
|
||||
}
|
||||
|
||||
// AsMonetaryCredit is the OfferTermInfo implementation for RecurringCharge.
|
||||
func (rc RecurringCharge) AsMonetaryCredit() (*MonetaryCredit, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// AsMonetaryCommitment is the OfferTermInfo implementation for RecurringCharge.
|
||||
func (rc RecurringCharge) AsMonetaryCommitment() (*MonetaryCommitment, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// AsRecurringCharge is the OfferTermInfo implementation for RecurringCharge.
|
||||
func (rc RecurringCharge) AsRecurringCharge() (*RecurringCharge, bool) {
|
||||
return &rc, true
|
||||
}
|
||||
|
||||
// ResourceRateCardInfo is price and Metadata information for resources
|
||||
type ResourceRateCardInfo struct {
|
||||
autorest.Response `json:"-"`
|
||||
|
@ -107,6 +245,67 @@ type ResourceRateCardInfo struct {
|
|||
Meters *[]MeterInfo `json:"Meters,omitempty"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON is the custom unmarshaler for ResourceRateCardInfo struct.
|
||||
func (rrci *ResourceRateCardInfo) UnmarshalJSON(body []byte) error {
|
||||
var m map[string]*json.RawMessage
|
||||
err := json.Unmarshal(body, &m)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var v *json.RawMessage
|
||||
|
||||
v = m["Currency"]
|
||||
if v != nil {
|
||||
var currency string
|
||||
err = json.Unmarshal(*m["Currency"], ¤cy)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rrci.Currency = ¤cy
|
||||
}
|
||||
|
||||
v = m["Locale"]
|
||||
if v != nil {
|
||||
var locale string
|
||||
err = json.Unmarshal(*m["Locale"], &locale)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rrci.Locale = &locale
|
||||
}
|
||||
|
||||
v = m["IsTaxIncluded"]
|
||||
if v != nil {
|
||||
var isTaxIncluded bool
|
||||
err = json.Unmarshal(*m["IsTaxIncluded"], &isTaxIncluded)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rrci.IsTaxIncluded = &isTaxIncluded
|
||||
}
|
||||
|
||||
v = m["OfferTerms"]
|
||||
if v != nil {
|
||||
offerTerms, err := unmarshalOfferTermInfoArray(*m["OfferTerms"])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rrci.OfferTerms = &offerTerms
|
||||
}
|
||||
|
||||
v = m["Meters"]
|
||||
if v != nil {
|
||||
var meters []MeterInfo
|
||||
err = json.Unmarshal(*m["Meters"], &meters)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rrci.Meters = &meters
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UsageAggregation is describes the usageAggregation.
|
||||
type UsageAggregation struct {
|
||||
ID *string `json:"id,omitempty"`
|
||||
|
|
33
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go
generated
vendored
33
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,8 +23,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// RateCardClient is the client for the RateCard methods of the Commerce
|
||||
// service.
|
||||
// RateCardClient is the client for the RateCard methods of the Commerce service.
|
||||
type RateCardClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -35,26 +33,21 @@ func NewRateCardClient(subscriptionID string) RateCardClient {
|
|||
return NewRateCardClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewRateCardClientWithBaseURI creates an instance of the RateCardClient
|
||||
// client.
|
||||
// NewRateCardClientWithBaseURI creates an instance of the RateCardClient client.
|
||||
func NewRateCardClientWithBaseURI(baseURI string, subscriptionID string) RateCardClient {
|
||||
return RateCardClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Get enables you to query for the resource/meter metadata and related prices
|
||||
// used in a given subscription by Offer ID, Currency, Locale and Region. The
|
||||
// metadata associated with the billing meters, including but not limited to
|
||||
// service names, types, resources, units of measure, and regions, is subject
|
||||
// to change at any time and without notice. If you intend to use this billing
|
||||
// data in an automated fashion, please use the billing meter GUID to uniquely
|
||||
// identify each billable item. If the billing meter GUID is scheduled to
|
||||
// change due to a new billing model, you will be notified in advance of the
|
||||
// change.
|
||||
// Get enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer
|
||||
// ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to
|
||||
// service names, types, resources, units of measure, and regions, is subject to change at any time and without notice.
|
||||
// If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely
|
||||
// identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will
|
||||
// be notified in advance of the change.
|
||||
//
|
||||
// filter is the filter to apply on the operation. It ONLY supports the 'eq'
|
||||
// and 'and' logical operators at this time. All the 4 query parameters
|
||||
// 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part
|
||||
// of the $filter.
|
||||
// filter is the filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical operators at this time.
|
||||
// All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part of the
|
||||
// $filter.
|
||||
func (client RateCardClient) Get(filter string) (result ResourceRateCardInfo, err error) {
|
||||
req, err := client.GetPreparer(filter)
|
||||
if err != nil {
|
||||
|
|
82
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go
generated
vendored
82
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,40 +24,32 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// UsageAggregatesClient is the client for the UsageAggregates methods of the
|
||||
// Commerce service.
|
||||
// UsageAggregatesClient is the client for the UsageAggregates methods of the Commerce service.
|
||||
type UsageAggregatesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewUsageAggregatesClient creates an instance of the UsageAggregatesClient
|
||||
// client.
|
||||
// NewUsageAggregatesClient creates an instance of the UsageAggregatesClient client.
|
||||
func NewUsageAggregatesClient(subscriptionID string) UsageAggregatesClient {
|
||||
return NewUsageAggregatesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewUsageAggregatesClientWithBaseURI creates an instance of the
|
||||
// UsageAggregatesClient client.
|
||||
// NewUsageAggregatesClientWithBaseURI creates an instance of the UsageAggregatesClient client.
|
||||
func NewUsageAggregatesClientWithBaseURI(baseURI string, subscriptionID string) UsageAggregatesClient {
|
||||
return UsageAggregatesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List query aggregated Azure subscription consumption data for a date range.
|
||||
//
|
||||
// reportedStartTime is the start of the time range to retrieve data for.
|
||||
// reportedEndTime is the end of the time range to retrieve data for.
|
||||
// showDetails is `True` returns usage data in instance-level detail, `false`
|
||||
// causes server-side aggregation with fewer details. For example, if you have
|
||||
// 3 website instances, by default you will get 3 line items for website
|
||||
// consumption. If you specify showDetails = false, the data will be aggregated
|
||||
// as a single line item for website consumption within the time period (for
|
||||
// the given subscriptionId, meterId, usageStartTime and usageEndTime).
|
||||
// aggregationGranularity is `Daily` (default) returns the data in daily
|
||||
// granularity, `Hourly` returns the data in hourly granularity.
|
||||
// continuationToken is used when a continuation token string is provided in
|
||||
// the response body of the previous call, enabling paging through a large
|
||||
// result set. If not present, the data is retrieved from the beginning of the
|
||||
// day/hour (based on the granularity) passed in.
|
||||
// reportedStartTime is the start of the time range to retrieve data for. reportedEndTime is the end of the time range
|
||||
// to retrieve data for. showDetails is `True` returns usage data in instance-level detail, `false` causes server-side
|
||||
// aggregation with fewer details. For example, if you have 3 website instances, by default you will get 3 line items
|
||||
// for website consumption. If you specify showDetails = false, the data will be aggregated as a single line item for
|
||||
// website consumption within the time period (for the given subscriptionId, meterId, usageStartTime and usageEndTime).
|
||||
// aggregationGranularity is `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in
|
||||
// hourly granularity. continuationToken is used when a continuation token string is provided in the response body of
|
||||
// the previous call, enabling paging through a large result set. If not present, the data is retrieved from the
|
||||
// beginning of the day/hour (based on the granularity) passed in.
|
||||
func (client UsageAggregatesClient) List(reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string) (result UsageAggregationListResult, err error) {
|
||||
req, err := client.ListPreparer(reportedStartTime, reportedEndTime, showDetails, aggregationGranularity, continuationToken)
|
||||
if err != nil {
|
||||
|
@ -153,3 +144,48 @@ func (client UsageAggregatesClient) ListNextResults(lastResults UsageAggregation
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client UsageAggregatesClient) ListComplete(reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string, cancel <-chan struct{}) (<-chan UsageAggregation, <-chan error) {
|
||||
resultChan := make(chan UsageAggregation)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List(reportedStartTime, reportedEndTime, showDetails, aggregationGranularity, continuationToken)
|
||||
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
|
||||
}
|
||||
|
|
6
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go
generated
vendored
|
@ -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 2.2.18.0
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// 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-commerce/2015-06-01-preview"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-commerce/2015-06-01-preview"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.3.1-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
|
55
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go
generated
vendored
55
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -24,30 +23,27 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// AvailabilitySetsClient is the the Compute Management Client.
|
||||
// AvailabilitySetsClient is the compute Client
|
||||
type AvailabilitySetsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient
|
||||
// client.
|
||||
// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient client.
|
||||
func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient {
|
||||
return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewAvailabilitySetsClientWithBaseURI creates an instance of the
|
||||
// AvailabilitySetsClient client.
|
||||
// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client.
|
||||
func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient {
|
||||
return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update an availability set.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. name is the name of the
|
||||
// availability set. parameters is parameters supplied to the Create
|
||||
// Availability Set operation.
|
||||
func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters AvailabilitySet) (result AvailabilitySet, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, name, parameters)
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set.
|
||||
// parameters is parameters supplied to the Create Availability Set operation.
|
||||
func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) {
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, availabilitySetName, parameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request")
|
||||
return
|
||||
|
@ -69,14 +65,14 @@ func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, na
|
|||
}
|
||||
|
||||
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
|
||||
func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName string, name string, parameters AvailabilitySet) (*http.Request, error) {
|
||||
func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"name": autorest.Encode("path", name),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
"availabilitySetName": autorest.Encode("path", availabilitySetName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -85,7 +81,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName st
|
|||
autorest.AsJSON(),
|
||||
autorest.AsPut(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{name}", pathParameters),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters),
|
||||
autorest.WithJSON(parameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
|
@ -112,8 +108,7 @@ func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response
|
|||
|
||||
// Delete delete an availability set.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is
|
||||
// the name of the availability set.
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set.
|
||||
func (client AvailabilitySetsClient) Delete(resourceGroupName string, availabilitySetName string) (result OperationStatusResponse, err error) {
|
||||
req, err := client.DeletePreparer(resourceGroupName, availabilitySetName)
|
||||
if err != nil {
|
||||
|
@ -144,7 +139,7 @@ func (client AvailabilitySetsClient) DeletePreparer(resourceGroupName string, av
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -178,8 +173,7 @@ func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (resul
|
|||
|
||||
// Get retrieves information about an availability set.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is
|
||||
// the name of the availability set.
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set.
|
||||
func (client AvailabilitySetsClient) Get(resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, availabilitySetName)
|
||||
if err != nil {
|
||||
|
@ -210,7 +204,7 @@ func (client AvailabilitySetsClient) GetPreparer(resourceGroupName string, avail
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -274,7 +268,7 @@ func (client AvailabilitySetsClient) ListPreparer(resourceGroupName string) (*ht
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -306,11 +300,10 @@ func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// ListAvailableSizes lists all available virtual machine sizes that can be
|
||||
// used to create a new virtual machine in an existing availability set.
|
||||
// ListAvailableSizes lists all available virtual machine sizes that can be used to create a new virtual machine in an
|
||||
// existing availability set.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is
|
||||
// the name of the availability set.
|
||||
// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set.
|
||||
func (client AvailabilitySetsClient) ListAvailableSizes(resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) {
|
||||
req, err := client.ListAvailableSizesPreparer(resourceGroupName, availabilitySetName)
|
||||
if err != nil {
|
||||
|
@ -341,7 +334,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(resourceGroupNam
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
|
10
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go
generated
vendored
10
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go
generated
vendored
|
@ -1,7 +1,6 @@
|
|||
// Package compute implements the Azure ARM Compute service API version
|
||||
// 2016-04-30-preview.
|
||||
// Package compute implements the Azure ARM Compute service API version .
|
||||
//
|
||||
// The Compute Management Client.
|
||||
// Compute Client
|
||||
package compute
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
|
@ -18,9 +17,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
|
579
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go
generated
vendored
Normal file
579
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go
generated
vendored
Normal file
|
@ -0,0 +1,579 @@
|
|||
package compute
|
||||
|
||||
// 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.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ContainerServicesClient is the compute Client
|
||||
type ContainerServicesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewContainerServicesClient creates an instance of the ContainerServicesClient client.
|
||||
func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
|
||||
return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client.
|
||||
func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
|
||||
return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and
|
||||
// agents. 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. containerServiceName is the name of the container service in
|
||||
// the specified subscription and resource group. parameters is parameters supplied to the Create or Update a Container
|
||||
// Service operation.
|
||||
func (client ContainerServicesClient) CreateOrUpdate(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) {
|
||||
resultChan := make(chan ContainerService, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: parameters,
|
||||
Constraints: []validation.Constraint{{Target: "parameters.ContainerServiceProperties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.Secret", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}},
|
||||
{Target: "parameters.ContainerServiceProperties.MasterProfile", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
{Target: "parameters.ContainerServiceProperties.AgentPoolProfiles", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "parameters.ContainerServiceProperties.WindowsProfile", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}},
|
||||
{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Pattern, Rule: `^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$`, Chain: nil}}},
|
||||
}},
|
||||
{Target: "parameters.ContainerServiceProperties.LinuxProfile", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-z][a-z0-9_-]*$`, Chain: nil}}},
|
||||
{Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
}},
|
||||
{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
}},
|
||||
}}}}}); err != nil {
|
||||
errChan <- validation.NewErrorWithValidationError(err, "compute.ContainerServicesClient", "CreateOrUpdate")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
go func() {
|
||||
var err error
|
||||
var result ContainerService
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, containerServiceName, parameters, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.CreateOrUpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.CreateOrUpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
|
||||
func (client ContainerServicesClient) CreateOrUpdatePreparer(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"containerServiceName": autorest.Encode("path", containerServiceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-31"
|
||||
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.ContainerService/containerServices/{containerServiceName}", pathParameters),
|
||||
autorest.WithJSON(parameters),
|
||||
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 ContainerServicesClient) 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 ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Delete deletes the specified container service in the specified subscription and resource group. The operation does
|
||||
// not delete other resources created as part of creating a container service, including storage accounts, VMs, and
|
||||
// availability sets. All the other resources created with the container service are part of the same resource group
|
||||
// and can be deleted individually. 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. containerServiceName is the name of the container service in
|
||||
// the specified subscription and resource group.
|
||||
func (client ContainerServicesClient) Delete(resourceGroupName string, containerServiceName 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, containerServiceName, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.DeleteSender(req)
|
||||
if err != nil {
|
||||
result.Response = resp
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.DeleteResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// DeletePreparer prepares the Delete request.
|
||||
func (client ContainerServicesClient) DeletePreparer(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"containerServiceName": autorest.Encode("path", containerServiceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-31"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsDelete(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) 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 gets the properties of the specified container service in the specified subscription and resource group. The
|
||||
// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters
|
||||
// and agents.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in
|
||||
// the specified subscription and resource group.
|
||||
func (client ContainerServicesClient) Get(resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, containerServiceName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client ContainerServicesClient) GetPreparer(resourceGroupName string, containerServiceName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"containerServiceName": autorest.Encode("path", containerServiceName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-31"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", 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 ContainerServicesClient) 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 ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, 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 gets a list of container services in the specified subscription. The operation returns properties of each
|
||||
// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
|
||||
func (client ContainerServicesClient) List() (result ContainerServiceListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client ContainerServicesClient) ListPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-31"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListResponder(resp *http.Response) (result ContainerServiceListResult, 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 ContainerServicesClient) ListNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
|
||||
req, err := lastResults.ContainerServiceListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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, "compute.ContainerServicesClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ContainerServicesClient) ListComplete(cancel <-chan struct{}) (<-chan ContainerService, <-chan error) {
|
||||
resultChan := make(chan ContainerService)
|
||||
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 gets a list of container services in the specified subscription and resource group. The
|
||||
// operation returns properties of each container service including state, orchestrator, number of masters and agents,
|
||||
// and FQDNs of masters and agents.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
func (client ContainerServicesClient) ListByResourceGroup(resourceGroupName string) (result ContainerServiceListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByResourceGroupSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
|
||||
func (client ContainerServicesClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-01-31"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", 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 ContainerServicesClient) 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 ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerServiceListResult, 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 ContainerServicesClient) ListByResourceGroupNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
|
||||
req, err := lastResults.ContainerServiceListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "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, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ContainerServicesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) {
|
||||
resultChan := make(chan ContainerService)
|
||||
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
|
||||
}
|
818
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go
generated
vendored
Normal file
818
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go
generated
vendored
Normal file
|
@ -0,0 +1,818 @@
|
|||
package compute
|
||||
|
||||
// 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.
|
||||
// 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"
|
||||
)
|
||||
|
||||
// DisksClient is the compute Client
|
||||
type DisksClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewDisksClient creates an instance of the DisksClient client.
|
||||
func NewDisksClient(subscriptionID string) DisksClient {
|
||||
return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewDisksClientWithBaseURI creates an instance of the DisksClient client.
|
||||
func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient {
|
||||
return DisksClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate creates or updates a disk. 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. diskName is the name of the disk within the given subscription
|
||||
// and resource group. disk is disk object supplied in the body of the Put disk operation.
|
||||
func (client DisksClient) CreateOrUpdate(resourceGroupName string, diskName string, disk Disk, cancel <-chan struct{}) (<-chan Disk, <-chan error) {
|
||||
resultChan := make(chan Disk, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: disk,
|
||||
Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
|
||||
}},
|
||||
{Target: "disk.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}},
|
||||
{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}},
|
||||
}},
|
||||
}}}}}); err != nil {
|
||||
errChan <- validation.NewErrorWithValidationError(err, "compute.DisksClient", "CreateOrUpdate")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
go func() {
|
||||
var err error
|
||||
var result Disk
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.CreateOrUpdatePreparer(resourceGroupName, diskName, disk, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.CreateOrUpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.CreateOrUpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
|
||||
func (client DisksClient) CreateOrUpdatePreparer(resourceGroupName string, diskName string, disk Disk, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
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.Compute/disks/{diskName}", pathParameters),
|
||||
autorest.WithJSON(disk),
|
||||
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 DisksClient) 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 DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Delete deletes a disk. 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. diskName is the name of the disk within the given subscription
|
||||
// and resource group.
|
||||
func (client DisksClient) Delete(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
|
||||
resultChan := make(chan OperationStatusResponse, 1)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
var err error
|
||||
var result OperationStatusResponse
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.DeletePreparer(resourceGroupName, diskName, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.DeleteSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.DeleteResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// DeletePreparer prepares the Delete request.
|
||||
func (client DisksClient) DeletePreparer(resourceGroupName string, diskName string, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsDelete(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", 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 DisksClient) 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 DisksClient) DeleteResponder(resp *http.Response) (result OperationStatusResponse, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Get gets information about a disk.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription
|
||||
// and resource group.
|
||||
func (client DisksClient) Get(resourceGroupName string, diskName string) (result Disk, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, diskName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GetSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GetResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPreparer prepares the Get request.
|
||||
func (client DisksClient) GetPreparer(resourceGroupName string, diskName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", 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 DisksClient) 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 DisksClient) GetResponder(resp *http.Response) (result Disk, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// GrantAccess grants access to a disk. 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. diskName is the name of the disk within the given subscription
|
||||
// and resource group. grantAccessData is access data object supplied in the body of the get disk access operation.
|
||||
func (client DisksClient) GrantAccess(resourceGroupName string, diskName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (<-chan AccessURI, <-chan error) {
|
||||
resultChan := make(chan AccessURI, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: grantAccessData,
|
||||
Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
|
||||
errChan <- validation.NewErrorWithValidationError(err, "compute.DisksClient", "GrantAccess")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
go func() {
|
||||
var err error
|
||||
var result AccessURI
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.GrantAccessPreparer(resourceGroupName, diskName, grantAccessData, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.GrantAccessSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.GrantAccessResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// GrantAccessPreparer prepares the GrantAccess request.
|
||||
func (client DisksClient) GrantAccessPreparer(resourceGroupName string, diskName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
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.Compute/disks/{diskName}/beginGetAccess", pathParameters),
|
||||
autorest.WithJSON(grantAccessData),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// GrantAccessSender sends the GrantAccess request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client DisksClient) GrantAccessSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// GrantAccessResponder handles the response to the GrantAccess request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client DisksClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// List lists all the disks under a subscription.
|
||||
func (client DisksClient) List() (result DiskList, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client DisksClient) ListPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", 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 DisksClient) 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 DisksClient) ListResponder(resp *http.Response) (result DiskList, 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 DisksClient) ListNextResults(lastResults DiskList) (result DiskList, err error) {
|
||||
req, err := lastResults.DiskListPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "compute.DisksClient", "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, "compute.DisksClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client DisksClient) ListComplete(cancel <-chan struct{}) (<-chan Disk, <-chan error) {
|
||||
resultChan := make(chan Disk)
|
||||
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 lists all the disks under a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
func (client DisksClient) ListByResourceGroup(resourceGroupName string) (result DiskList, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListByResourceGroupSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
|
||||
func (client DisksClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", 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 DisksClient) 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 DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, 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 DisksClient) ListByResourceGroupNextResults(lastResults DiskList) (result DiskList, err error) {
|
||||
req, err := lastResults.DiskListPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "compute.DisksClient", "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, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListByResourceGroupResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client DisksClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Disk, <-chan error) {
|
||||
resultChan := make(chan Disk)
|
||||
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
|
||||
}
|
||||
|
||||
// RevokeAccess revokes access to a disk. 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. diskName is the name of the disk within the given subscription
|
||||
// and resource group.
|
||||
func (client DisksClient) RevokeAccess(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
|
||||
resultChan := make(chan OperationStatusResponse, 1)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
var err error
|
||||
var result OperationStatusResponse
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.RevokeAccessPreparer(resourceGroupName, diskName, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.RevokeAccessSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.RevokeAccessResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// RevokeAccessPreparer prepares the RevokeAccess request.
|
||||
func (client DisksClient) RevokeAccessPreparer(resourceGroupName string, diskName string, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// RevokeAccessSender sends the RevokeAccess request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client DisksClient) RevokeAccessSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result OperationStatusResponse, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates (patches) a disk. 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. diskName is the name of the disk within the given subscription
|
||||
// and resource group. disk is disk object supplied in the body of the Patch disk operation.
|
||||
func (client DisksClient) Update(resourceGroupName string, diskName string, disk DiskUpdate, cancel <-chan struct{}) (<-chan Disk, <-chan error) {
|
||||
resultChan := make(chan Disk, 1)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
var err error
|
||||
var result Disk
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.UpdatePreparer(resourceGroupName, diskName, disk, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.UpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.UpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// UpdatePreparer prepares the Update request.
|
||||
func (client DisksClient) UpdatePreparer(resourceGroupName string, diskName string, disk DiskUpdate, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"diskName": autorest.Encode("path", diskName),
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsJSON(),
|
||||
autorest.AsPatch(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
|
||||
autorest.WithJSON(disk),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// UpdateSender sends the Update request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client DisksClient) UpdateSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// UpdateResponder handles the response to the Update request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
143
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go
generated
vendored
143
vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go
generated
vendored
|
@ -14,9 +14,8 @@ 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.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.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
@ -25,7 +24,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// ImagesClient is the the Compute Management Client.
|
||||
// ImagesClient is the compute Client
|
||||
type ImagesClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
@ -40,14 +39,11 @@ func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesCli
|
|||
return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update an image. 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.
|
||||
// CreateOrUpdate create or update an image. 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. imageName is the name
|
||||
// of the image. parameters is parameters supplied to the Create Image
|
||||
// operation.
|
||||
// resourceGroupName is the name of the resource group. imageName is the name of the image. parameters is parameters
|
||||
// supplied to the Create Image operation.
|
||||
func (client ImagesClient) CreateOrUpdate(resourceGroupName string, imageName string, parameters Image, cancel <-chan struct{}) (<-chan Image, <-chan error) {
|
||||
resultChan := make(chan Image, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -67,8 +63,10 @@ func (client ImagesClient) CreateOrUpdate(resourceGroupName string, imageName st
|
|||
var err error
|
||||
var result Image
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -101,7 +99,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(resourceGroupName string, imag
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -137,12 +135,10 @@ func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result
|
|||
return
|
||||
}
|
||||
|
||||
// Delete deletes an Image. 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.
|
||||
// Delete deletes an Image. 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. imageName is the name
|
||||
// of the image.
|
||||
// resourceGroupName is the name of the resource group. imageName is the name of the image.
|
||||
func (client ImagesClient) Delete(resourceGroupName string, imageName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) {
|
||||
resultChan := make(chan OperationStatusResponse, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
@ -150,8 +146,10 @@ func (client ImagesClient) Delete(resourceGroupName string, imageName string, ca
|
|||
var err error
|
||||
var result OperationStatusResponse
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
|
@ -184,7 +182,7 @@ func (client ImagesClient) DeletePreparer(resourceGroupName string, imageName st
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -220,8 +218,8 @@ func (client ImagesClient) DeleteResponder(resp *http.Response) (result Operatio
|
|||
|
||||
// Get gets an image.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group. imageName is the name
|
||||
// of the image. expand is the expand expression to apply on the operation.
|
||||
// resourceGroupName is the name of the resource group. imageName is the name of the image. expand is the expand
|
||||
// expression to apply on the operation.
|
||||
func (client ImagesClient) Get(resourceGroupName string, imageName string, expand string) (result Image, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, imageName, expand)
|
||||
if err != nil {
|
||||
|
@ -252,7 +250,7 @@ func (client ImagesClient) GetPreparer(resourceGroupName string, imageName strin
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -287,9 +285,8 @@ func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err
|
|||
return
|
||||
}
|
||||
|
||||
// List gets the list of Images in the subscription. Use nextLink property in
|
||||
// the response to get the next page of Images. Do this till nextLink is not
|
||||
// null to fetch all the Images.
|
||||
// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of
|
||||
// Images. Do this till nextLink is not null to fetch all the Images.
|
||||
func (client ImagesClient) List() (result ImageListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
|
@ -318,7 +315,7 @@ func (client ImagesClient) ListPreparer() (*http.Request, error) {
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -374,6 +371,51 @@ func (client ImagesClient) ListNextResults(lastResults ImageListResult) (result
|
|||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client ImagesClient) ListComplete(cancel <-chan struct{}) (<-chan Image, <-chan error) {
|
||||
resultChan := make(chan Image)
|
||||
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 gets the list of images under a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group.
|
||||
|
@ -406,7 +448,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(resourceGroupName string)
|
|||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-04-30-preview"
|
||||
const APIVersion = "2017-03-30"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
@ -461,3 +503,48 @@ func (client ImagesClient) ListByResourceGroupNextResults(lastResults ImageListR
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ImagesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Image, <-chan error) {
|
||||
resultChan := make(chan Image)
|
||||
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
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue