Unverified Commit 447097a5 authored by Erik Wilson's avatar Erik Wilson Committed by GitHub

Merge pull request #2098 from erikwilson/k8s-1.19

Update to k8s 1.19
parents 866dc94c c5dc0915

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

FROM golang:1.13.15-alpine3.12 FROM golang:1.15.0-alpine3.12
ARG http_proxy=$http_proxy ARG http_proxy=$http_proxy
ARG https_proxy=$https_proxy ARG https_proxy=$https_proxy
...@@ -19,7 +19,7 @@ ARG DAPPER_HOST_ARCH ...@@ -19,7 +19,7 @@ ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH ENV ARCH $DAPPER_HOST_ARCH
RUN if [ "${ARCH}" = 'amd64' ]; then \ RUN if [ "${ARCH}" = 'amd64' ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \ curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.30.0; \
fi fi
ARG SELINUX=true ARG SELINUX=true
......
FROM golang:1.13.15-alpine3.12 FROM golang:1.15.0-alpine3.12
COPY --from=plugins/manifest:1.2.3 /bin/* /bin/ COPY --from=plugins/manifest:1.2.3 /bin/* /bin/
......
FROM golang:1.13.15-alpine3.12 FROM golang:1.15.0-alpine3.12
RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python2 openssl RUN apk -U --no-cache add bash git gcc musl-dev docker curl jq coreutils python2 openssl
......
...@@ -2,7 +2,7 @@ TARGETS := $(shell ls scripts | grep -v \\.sh) ...@@ -2,7 +2,7 @@ TARGETS := $(shell ls scripts | grep -v \\.sh)
.dapper: .dapper:
@echo Downloading dapper @echo Downloading dapper
@curl -sL https://releases.rancher.com/dapper/v0.4.2/dapper-$$(uname -s)-$$(uname -m) > .dapper.tmp @curl -sL https://releases.rancher.com/dapper/v0.5.1/dapper-$$(uname -s)-$$(uname -m) > .dapper.tmp
@@chmod +x .dapper.tmp @@chmod +x .dapper.tmp
@./.dapper.tmp -v @./.dapper.tmp -v
@mv .dapper.tmp .dapper @mv .dapper.tmp .dapper
......
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
func main() { func main() {
app := cmds.NewApp() app := cmds.NewApp()
app.Commands = []cli.Command{ app.Commands = []*cli.Command{
cmds.NewAgentCommand(agent.Run), cmds.NewAgentCommand(agent.Run),
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,6 @@ package loadbalancer ...@@ -2,7 +2,6 @@ package loadbalancer
import ( import (
"bufio" "bufio"
"context"
"errors" "errors"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
...@@ -106,7 +105,7 @@ func TestFailOver(t *testing.T) { ...@@ -106,7 +105,7 @@ func TestFailOver(t *testing.T) {
DataDir: tmpDir, DataDir: tmpDir,
} }
lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
if err != nil { if err != nil {
assertEqual(t, err, nil) assertEqual(t, err, nil)
} }
...@@ -157,7 +156,7 @@ func TestFailFast(t *testing.T) { ...@@ -157,7 +156,7 @@ func TestFailFast(t *testing.T) {
DataDir: tmpDir, DataDir: tmpDir,
} }
lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL)
if err != nil { if err != nil {
assertEqual(t, err, nil) assertEqual(t, err, nil)
} }
......
...@@ -20,16 +20,17 @@ import ( ...@@ -20,16 +20,17 @@ import (
"errors" "errors"
"net/http" "net/http"
localAuthenticator "github.com/rancher/k3s/pkg/authenticator"
"k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/authenticator"
) )
// Authenticator authenticates requests using basic auth // Authenticator authenticates requests using basic auth
type Authenticator struct { type Authenticator struct {
auth authenticator.Password auth localAuthenticator.Password
} }
// New returns a request authenticator that validates credentials using the provided password authenticator // New returns a request authenticator that validates credentials using the provided password authenticator
func New(auth authenticator.Password) *Authenticator { func New(auth localAuthenticator.Password) *Authenticator {
return &Authenticator{auth} return &Authenticator{auth}
} }
......
/*
Copyright 2014 The Kubernetes Authors.
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.
*/
package basicauth
import (
"context"
"errors"
"net/http"
"testing"
"k8s.io/apiserver/pkg/authentication/authenticator"
"k8s.io/apiserver/pkg/authentication/user"
)
type testPassword struct {
Username string
Password string
Called bool
User user.Info
OK bool
Err error
}
func (t *testPassword) AuthenticatePassword(ctx context.Context, user, password string) (*authenticator.Response, bool, error) {
t.Called = true
t.Username = user
t.Password = password
return &authenticator.Response{User: t.User}, t.OK, t.Err
}
func TestBasicAuth(t *testing.T) {
testCases := map[string]struct {
Header string
Password testPassword
ExpectedCalled bool
ExpectedUsername string
ExpectedPassword string
ExpectedUser string
ExpectedOK bool
ExpectedErr bool
}{
"no auth": {},
"empty password basic header": {
ExpectedCalled: true,
ExpectedUsername: "user_with_empty_password",
ExpectedPassword: "",
ExpectedErr: true,
},
"valid basic header": {
ExpectedCalled: true,
ExpectedUsername: "myuser",
ExpectedPassword: "mypassword:withcolon",
ExpectedErr: true,
},
"password auth returned user": {
Password: testPassword{User: &user.DefaultInfo{Name: "returneduser"}, OK: true},
ExpectedCalled: true,
ExpectedUsername: "myuser",
ExpectedPassword: "mypw",
ExpectedUser: "returneduser",
ExpectedOK: true,
},
"password auth returned error": {
Password: testPassword{Err: errors.New("auth error")},
ExpectedCalled: true,
ExpectedUsername: "myuser",
ExpectedPassword: "mypw",
ExpectedErr: true,
},
}
for k, testCase := range testCases {
password := testCase.Password
auth := authenticator.Request(New(&password))
req, _ := http.NewRequest("GET", "/", nil)
if testCase.ExpectedUsername != "" || testCase.ExpectedPassword != "" {
req.SetBasicAuth(testCase.ExpectedUsername, testCase.ExpectedPassword)
}
resp, ok, err := auth.AuthenticateRequest(req)
if testCase.ExpectedCalled != password.Called {
t.Errorf("%s: Expected called=%v, got %v", k, testCase.ExpectedCalled, password.Called)
continue
}
if testCase.ExpectedUsername != password.Username {
t.Errorf("%s: Expected called with username=%v, got %v", k, testCase.ExpectedUsername, password.Username)
continue
}
if testCase.ExpectedPassword != password.Password {
t.Errorf("%s: Expected called with password=%v, got %v", k, testCase.ExpectedPassword, password.Password)
continue
}
if testCase.ExpectedErr != (err != nil) {
t.Errorf("%s: Expected err=%v, got err=%v", k, testCase.ExpectedErr, err)
continue
}
if testCase.ExpectedOK != ok {
t.Errorf("%s: Expected ok=%v, got ok=%v", k, testCase.ExpectedOK, ok)
continue
}
if testCase.ExpectedUser != "" && testCase.ExpectedUser != resp.User.GetName() {
t.Errorf("%s: Expected user.GetName()=%v, got %v", k, testCase.ExpectedUser, resp.User.GetName())
continue
}
}
}
/*
Copyright 2014 The Kubernetes Authors.
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.
*/
package authenticator
import (
"context"
"k8s.io/apiserver/pkg/authentication/authenticator"
)
// Password checks a username and password against a backing authentication
// store and returns a Response or an error if the password could not be
// checked.
type Password interface {
AuthenticatePassword(ctx context.Context, user, password string) (*authenticator.Response, bool, error)
}
/*
Copyright 2015 The Kubernetes Authors.
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.
*/
package passwordfile
import (
"context"
"crypto/subtle"
"encoding/csv"
"fmt"
"io"
"os"
"strings"
"k8s.io/klog"
"k8s.io/apiserver/pkg/authentication/authenticator"
"k8s.io/apiserver/pkg/authentication/user"
)
// PasswordAuthenticator authenticates users by password
type PasswordAuthenticator struct {
users map[string]*userPasswordInfo
}
type userPasswordInfo struct {
info *user.DefaultInfo
password string
}
// NewCSV returns a PasswordAuthenticator, populated from a CSV file.
// The CSV file must contain records in the format "password,username,useruid"
func NewCSV(path string) (*PasswordAuthenticator, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
recordNum := 0
users := make(map[string]*userPasswordInfo)
reader := csv.NewReader(file)
reader.FieldsPerRecord = -1
for {
record, err := reader.Read()
if err == io.EOF {
break
}
if err != nil {
return nil, err
}
if len(record) < 3 {
return nil, fmt.Errorf("password file '%s' must have at least 3 columns (password, user name, user uid), found %d", path, len(record))
}
obj := &userPasswordInfo{
info: &user.DefaultInfo{Name: record[1], UID: record[2]},
password: record[0],
}
if len(record) >= 4 {
obj.info.Groups = strings.Split(record[3], ",")
}
recordNum++
if _, exist := users[obj.info.Name]; exist {
klog.Warningf("duplicate username '%s' has been found in password file '%s', record number '%d'", obj.info.Name, path, recordNum)
}
users[obj.info.Name] = obj
}
return &PasswordAuthenticator{users}, nil
}
// AuthenticatePassword returns user info if authentication is successful, nil otherwise
func (a *PasswordAuthenticator) AuthenticatePassword(ctx context.Context, username, password string) (*authenticator.Response, bool, error) {
user, ok := a.users[username]
if !ok {
return nil, false, nil
}
if subtle.ConstantTimeCompare([]byte(user.password), []byte(password)) == 0 {
return nil, false, nil
}
return &authenticator.Response{User: user.info}, true, nil
}
/*
Copyright 2015 The Kubernetes Authors.
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.
*/
package passwordfile
import (
"context"
"io/ioutil"
"os"
"reflect"
"testing"
"k8s.io/apiserver/pkg/authentication/user"
)
func TestPasswordFile(t *testing.T) {
auth, err := newWithContents(t, `
password1,user1,uid1
password2,user2,uid2
password3,user3,uid3,"group1,group2"
password4,user4,uid4,"group2"
password5,user5,uid5,group5
password6,user6,uid6,group5,otherdata
password7,user7,uid7,"group1,group2",otherdata
`)
if err != nil {
t.Fatalf("unable to read passwordfile: %v", err)
}
testCases := []struct {
Username string
Password string
User *user.DefaultInfo
Ok bool
Err bool
}{
{
Username: "user1",
Password: "password1",
User: &user.DefaultInfo{Name: "user1", UID: "uid1"},
Ok: true,
},
{
Username: "user2",
Password: "password2",
User: &user.DefaultInfo{Name: "user2", UID: "uid2"},
Ok: true,
},
{
Username: "user1",
Password: "password2",
},
{
Username: "user2",
Password: "password1",
},
{
Username: "user3",
Password: "password3",
User: &user.DefaultInfo{Name: "user3", UID: "uid3", Groups: []string{"group1", "group2"}},
Ok: true,
},
{
Username: "user4",
Password: "password4",
User: &user.DefaultInfo{Name: "user4", UID: "uid4", Groups: []string{"group2"}},
Ok: true,
},
{
Username: "user5",
Password: "password5",
User: &user.DefaultInfo{Name: "user5", UID: "uid5", Groups: []string{"group5"}},
Ok: true,
},
{
Username: "user6",
Password: "password6",
User: &user.DefaultInfo{Name: "user6", UID: "uid6", Groups: []string{"group5"}},
Ok: true,
},
{
Username: "user7",
Password: "password7",
User: &user.DefaultInfo{Name: "user7", UID: "uid7", Groups: []string{"group1", "group2"}},
Ok: true,
},
{
Username: "user7",
Password: "passwordbad",
},
{
Username: "userbad",
Password: "password7",
},
{
Username: "user8",
Password: "password8",
},
}
for i, testCase := range testCases {
resp, ok, err := auth.AuthenticatePassword(context.Background(), testCase.Username, testCase.Password)
if err != nil {
t.Errorf("%d: unexpected error: %v", i, err)
}
if testCase.User == nil {
if resp != nil {
t.Errorf("%d: unexpected non-nil user %#v", i, resp.User)
}
} else if !reflect.DeepEqual(testCase.User, resp.User) {
t.Errorf("%d: expected user %#v, got %#v", i, testCase.User, resp.User)
}
if testCase.Ok != ok {
t.Errorf("%d: expected auth %v, got %v", i, testCase.Ok, ok)
}
}
}
func TestBadPasswordFile(t *testing.T) {
if _, err := newWithContents(t, `
password1,user1,uid1
password2,user2,uid2
password3,user3
password4
`); err == nil {
t.Fatalf("unexpected non error")
}
}
func TestInsufficientColumnsPasswordFile(t *testing.T) {
if _, err := newWithContents(t, "password4\n"); err == nil {
t.Fatalf("unexpected non error")
}
}
func newWithContents(t *testing.T, contents string) (auth *PasswordAuthenticator, err error) {
f, err := ioutil.TempFile("", "passwordfile_test")
if err != nil {
t.Fatalf("unexpected error creating passwordfile: %v", err)
}
f.Close()
defer os.Remove(f.Name())
if err := ioutil.WriteFile(f.Name(), []byte(contents), 0700); err != nil {
t.Fatalf("unexpected error writing passwordfile: %v", err)
}
return NewCSV(f.Name())
}
...@@ -33,6 +33,10 @@ func (k *k3s) Instances() (cloudprovider.Instances, bool) { ...@@ -33,6 +33,10 @@ func (k *k3s) Instances() (cloudprovider.Instances, bool) {
return k, true return k, true
} }
func (k *k3s) InstancesV2() (cloudprovider.InstancesV2, bool) {
return nil, false
}
func (k *k3s) LoadBalancer() (cloudprovider.LoadBalancer, bool) { func (k *k3s) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
return nil, false return nil, false
} }
......
package control
import (
"github.com/rancher/k3s/pkg/authenticator/basicauth"
"github.com/rancher/k3s/pkg/authenticator/passwordfile"
"k8s.io/apiserver/pkg/authentication/authenticator"
"k8s.io/apiserver/pkg/authentication/group"
"k8s.io/apiserver/pkg/authentication/request/union"
)
func basicAuthenticator(basicAuthFile string) (authenticator.Request, error) {
if basicAuthFile == "" {
return nil, nil
}
basicAuthenticator, err := passwordfile.NewCSV(basicAuthFile)
if err != nil {
return nil, err
}
return basicauth.New(basicAuthenticator), nil
}
func combineAuthenticators(auths ...authenticator.Request) authenticator.Request {
var authenticators []authenticator.Request
for _, auth := range auths {
if auth != nil {
authenticators = append(authenticators, auth)
}
}
return group.NewAuthenticatedGroupAdder(union.New(authenticators...))
}
...@@ -102,8 +102,13 @@ func Server(ctx context.Context, cfg *config.Control) error { ...@@ -102,8 +102,13 @@ func Server(ctx context.Context, cfg *config.Control) error {
return err return err
} }
basicAuth, err := basicAuthenticator(runtime.PasswdFile)
if err != nil {
return err
}
runtime.Authenticator = combineAuthenticators(basicAuth, auth)
runtime.Handler = handler runtime.Handler = handler
runtime.Authenticator = auth
if !cfg.NoScheduler { if !cfg.NoScheduler {
if err := scheduler(cfg, runtime); err != nil { if err := scheduler(cfg, runtime); err != nil {
...@@ -195,7 +200,6 @@ func apiServer(ctx context.Context, cfg *config.Control, runtime *config.Control ...@@ -195,7 +200,6 @@ func apiServer(ctx context.Context, cfg *config.Control, runtime *config.Control
argsMap["service-account-key-file"] = runtime.ServiceKey argsMap["service-account-key-file"] = runtime.ServiceKey
argsMap["service-account-issuer"] = version.Program argsMap["service-account-issuer"] = version.Program
argsMap["api-audiences"] = "unknown" argsMap["api-audiences"] = "unknown"
argsMap["basic-auth-file"] = runtime.PasswdFile
argsMap["kubelet-certificate-authority"] = runtime.ServerCA argsMap["kubelet-certificate-authority"] = runtime.ServerCA
argsMap["kubelet-client-certificate"] = runtime.ClientKubeAPICert argsMap["kubelet-client-certificate"] = runtime.ClientKubeAPICert
argsMap["kubelet-client-key"] = runtime.ClientKubeAPIKey argsMap["kubelet-client-key"] = runtime.ClientKubeAPIKey
......
...@@ -24,7 +24,7 @@ func init() { ...@@ -24,7 +24,7 @@ func init() {
type Embedded struct{} type Embedded struct{}
func (Embedded) Kubelet(args []string) error { func (Embedded) Kubelet(args []string) error {
command := kubelet.NewKubeletCommand(context.Background().Done()) command := kubelet.NewKubeletCommand(context.Background())
command.SetArgs(args) command.SetArgs(args)
go func() { go func() {
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
var scheme = runtime.NewScheme() var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme) var codecs = serializer.NewCodecFactory(scheme)
var parameterCodec = runtime.NewParameterCodec(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{ var localSchemeBuilder = runtime.SchemeBuilder{
k3sv1.AddToScheme, k3sv1.AddToScheme,
} }
......
...@@ -26,8 +26,10 @@ import ( ...@@ -26,8 +26,10 @@ import (
) )
// AddonLister helps list Addons. // AddonLister helps list Addons.
// All objects returned here must be treated as read-only.
type AddonLister interface { type AddonLister interface {
// List lists all Addons in the indexer. // List lists all Addons in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Addon, err error) List(selector labels.Selector) (ret []*v1.Addon, err error)
// Addons returns an object that can list and get Addons. // Addons returns an object that can list and get Addons.
Addons(namespace string) AddonNamespaceLister Addons(namespace string) AddonNamespaceLister
...@@ -58,10 +60,13 @@ func (s *addonLister) Addons(namespace string) AddonNamespaceLister { ...@@ -58,10 +60,13 @@ func (s *addonLister) Addons(namespace string) AddonNamespaceLister {
} }
// AddonNamespaceLister helps list and get Addons. // AddonNamespaceLister helps list and get Addons.
// All objects returned here must be treated as read-only.
type AddonNamespaceLister interface { type AddonNamespaceLister interface {
// List lists all Addons in the indexer for a given namespace. // List lists all Addons in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Addon, err error) List(selector labels.Selector) (ret []*v1.Addon, err error)
// Get retrieves the Addon from the indexer for a given namespace and name. // Get retrieves the Addon from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Addon, error) Get(name string) (*v1.Addon, error)
AddonNamespaceListerExpansion AddonNamespaceListerExpansion
} }
......
...@@ -103,7 +103,7 @@ func startWrangler(ctx context.Context, config *Config) error { ...@@ -103,7 +103,7 @@ func startWrangler(ctx context.Context, config *Config) error {
return return
case <-config.ControlConfig.Runtime.APIServerReady: case <-config.ControlConfig.Runtime.APIServerReady:
if err := runControllers(ctx, config); err != nil { if err := runControllers(ctx, config); err != nil {
logrus.Fatal("failed to start controllers: %v", err) logrus.Fatalf("failed to start controllers: %v", err)
} }
} }
}() }()
...@@ -433,7 +433,7 @@ func setMasterRoleLabel(ctx context.Context, nodes v1.NodeClient) error { ...@@ -433,7 +433,7 @@ func setMasterRoleLabel(ctx context.Context, nodes v1.NodeClient) error {
node.Labels[MasterRoleLabelKey] = "true" node.Labels[MasterRoleLabelKey] = "true"
_, err = nodes.Update(node) _, err = nodes.Update(node)
if err == nil { if err == nil {
logrus.Infof("master role label has been set succesfully on node: %s", nodeName) logrus.Infof("master role label has been set successfully on node: %s", nodeName)
break break
} }
select { select {
......
...@@ -4,6 +4,9 @@ set -ve ...@@ -4,6 +4,9 @@ set -ve
apk add -q -f curl libc6-compat tzdata apk add -q -f curl libc6-compat tzdata
download_go download_go
# --- # ---
rc-update add cgroups default
/etc/init.d/cgroups start
# ---
cat <<EOF >/etc/profile.d/build.sh cat <<EOF >/etc/profile.d/build.sh
export SELINUX=true export SELINUX=true
export STATIC_BUILD=true export STATIC_BUILD=true
......
{
"name": "metadata",
"name_pretty": "Google Compute Engine Metadata API",
"product_documentation": "https://cloud.google.com/compute/docs/storing-retrieving-metadata",
"client_documentation": "https://godoc.org/cloud.google.com/go/compute/metadata",
"release_level": "ga",
"language": "go",
"repo": "googleapis/google-cloud-go",
"distribution_name": "cloud.google.com/go/compute/metadata",
"api_id": "compute:metadata",
"requires_billing": false
}
...@@ -227,6 +227,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() } ...@@ -227,6 +227,9 @@ func InternalIP() (string, error) { return defaultClient.InternalIP() }
// ExternalIP returns the instance's primary external (public) IP address. // ExternalIP returns the instance's primary external (public) IP address.
func ExternalIP() (string, error) { return defaultClient.ExternalIP() } func ExternalIP() (string, error) { return defaultClient.ExternalIP() }
// Email calls Client.Email on the default client.
func Email(serviceAccount string) (string, error) { return defaultClient.Email(serviceAccount) }
// Hostname returns the instance's hostname. This will be of the form // Hostname returns the instance's hostname. This will be of the form
// "<instanceID>.c.<projID>.internal". // "<instanceID>.c.<projID>.internal".
func Hostname() (string, error) { return defaultClient.Hostname() } func Hostname() (string, error) { return defaultClient.Hostname() }
...@@ -301,7 +304,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { ...@@ -301,7 +304,10 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) {
host = metadataIP host = metadataIP
} }
u := "http://" + host + "/computeMetadata/v1/" + suffix u := "http://" + host + "/computeMetadata/v1/" + suffix
req, _ := http.NewRequest("GET", u, nil) req, err := http.NewRequest("GET", u, nil)
if err != nil {
return "", "", err
}
req.Header.Set("Metadata-Flavor", "Google") req.Header.Set("Metadata-Flavor", "Google")
req.Header.Set("User-Agent", userAgent) req.Header.Set("User-Agent", userAgent)
res, err := c.hc.Do(req) res, err := c.hc.Do(req)
...@@ -367,6 +373,16 @@ func (c *Client) InternalIP() (string, error) { ...@@ -367,6 +373,16 @@ func (c *Client) InternalIP() (string, error) {
return c.getTrimmed("instance/network-interfaces/0/ip") return c.getTrimmed("instance/network-interfaces/0/ip")
} }
// Email returns the email address associated with the service account.
// The account may be empty or the string "default" to use the instance's
// main account.
func (c *Client) Email(serviceAccount string) (string, error) {
if serviceAccount == "" {
serviceAccount = "default"
}
return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email")
}
// ExternalIP returns the instance's primary external (public) IP address. // ExternalIP returns the instance's primary external (public) IP address.
func (c *Client) ExternalIP() (string, error) { func (c *Client) ExternalIP() (string, error) {
return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip")
...@@ -394,11 +410,7 @@ func (c *Client) InstanceTags() ([]string, error) { ...@@ -394,11 +410,7 @@ func (c *Client) InstanceTags() ([]string, error) {
// InstanceName returns the current VM's instance ID string. // InstanceName returns the current VM's instance ID string.
func (c *Client) InstanceName() (string, error) { func (c *Client) InstanceName() (string, error) {
host, err := c.Hostname() return c.getTrimmed("instance/name")
if err != nil {
return "", err
}
return strings.Split(host, ".")[0], nil
} }
// Zone returns the current VM's zone, such as "us-central1-b". // Zone returns the current VM's zone, such as "us-central1-b".
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier same "printed page" as the copyright notice for easier
identification within third-party archives. identification within third-party archives.
Copyright 2016 Microsoft Corporation Copyright 2020 Microsoft Corporation
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
......
...@@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { ...@@ -35,7 +35,9 @@ func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient {
return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. // NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient { func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient {
return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -85,7 +87,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, ...@@ -85,7 +87,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -103,8 +105,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, ...@@ -103,8 +105,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
...@@ -164,7 +165,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc ...@@ -164,7 +165,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -180,8 +181,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc ...@@ -180,8 +181,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// DeleteResponder handles the response to the Delete request. The method always // DeleteResponder handles the response to the Delete request. The method always
...@@ -240,7 +240,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr ...@@ -240,7 +240,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -256,8 +256,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr ...@@ -256,8 +256,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) GetSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -316,7 +315,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG ...@@ -316,7 +315,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -332,8 +331,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG ...@@ -332,8 +331,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) ListSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -431,7 +429,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont ...@@ -431,7 +429,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -447,8 +445,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont ...@@ -447,8 +445,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the // ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always // ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always
...@@ -506,7 +503,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont ...@@ -506,7 +503,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -525,8 +522,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont ...@@ -525,8 +522,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the // ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
...@@ -624,7 +620,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc ...@@ -624,7 +620,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -642,8 +638,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc ...@@ -642,8 +638,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) { func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// UpdateResponder handles the response to the Update request. The method always // UpdateResponder handles the response to the Update request. The method always
......
...@@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { ...@@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID) return NewWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewWithBaseURI creates an instance of the BaseClient client. // NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return BaseClient{ return BaseClient{
Client: autorest.NewClientWithUserAgent(UserAgent()), Client: autorest.NewClientWithUserAgent(UserAgent()),
......
...@@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { ...@@ -36,7 +36,9 @@ func NewContainerServicesClient(subscriptionID string) ContainerServicesClient {
return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. // NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient {
return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -130,9 +132,8 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context ...@@ -130,9 +132,8 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) { func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -210,9 +211,8 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour ...@@ -210,9 +211,8 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) { func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -294,8 +294,7 @@ func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceG ...@@ -294,8 +294,7 @@ func (client ContainerServicesClient) GetPreparer(ctx context.Context, resourceG
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -368,8 +367,7 @@ func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.R ...@@ -368,8 +367,7 @@ func (client ContainerServicesClient) ListPreparer(ctx context.Context) (*http.R
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -483,8 +481,7 @@ func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Co ...@@ -483,8 +481,7 @@ func (client ContainerServicesClient) ListByResourceGroupPreparer(ctx context.Co
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
......
...@@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie ...@@ -36,7 +36,9 @@ func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClie
return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client. // NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient { func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient {
return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -63,7 +65,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso ...@@ -63,7 +65,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso
Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil},
{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}}, }},
}}}}}); err != nil { }}}}}); err != nil {
return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error())
...@@ -98,7 +100,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte ...@@ -98,7 +100,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -116,8 +118,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte ...@@ -116,8 +118,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
...@@ -177,7 +178,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso ...@@ -177,7 +178,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -193,8 +194,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso ...@@ -193,8 +194,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// DeleteResponder handles the response to the Delete request. The method always // DeleteResponder handles the response to the Delete request. The method always
...@@ -253,7 +253,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc ...@@ -253,7 +253,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -269,8 +269,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc ...@@ -269,8 +269,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -330,7 +329,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. ...@@ -330,7 +329,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -346,8 +345,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. ...@@ -346,8 +345,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -441,7 +439,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C ...@@ -441,7 +439,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -457,8 +455,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C ...@@ -457,8 +455,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the // ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
...@@ -556,7 +553,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso ...@@ -556,7 +553,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -574,8 +571,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso ...@@ -574,8 +571,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// UpdateResponder handles the response to the Update request. The method always // UpdateResponder handles the response to the Update request. The method always
......
...@@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient { ...@@ -36,7 +36,8 @@ func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient {
return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client. // NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint.
// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient { func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient {
return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)} return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -63,7 +64,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG ...@@ -63,7 +64,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil},
{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
}}, }},
}}, }},
{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
...@@ -94,7 +95,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r ...@@ -94,7 +95,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -112,9 +113,8 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r ...@@ -112,9 +113,8 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) { func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,7 +175,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG ...@@ -175,7 +175,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -191,9 +191,8 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG ...@@ -191,9 +191,8 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) { func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -260,7 +259,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou ...@@ -260,7 +259,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -279,8 +278,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou ...@@ -279,8 +278,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -342,7 +340,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, ...@@ -342,7 +340,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -358,8 +356,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, ...@@ -358,8 +356,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context,
// ListByHostGroupSender sends the ListByHostGroup request. The method will close the // ListByHostGroupSender sends the ListByHostGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) { func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always // ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always
...@@ -453,7 +450,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG ...@@ -453,7 +450,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -471,9 +468,8 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG ...@@ -471,9 +468,8 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) { func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -36,7 +36,9 @@ func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient ...@@ -36,7 +36,9 @@ func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient
return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client. // NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient { func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient {
return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)} return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -94,7 +96,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex ...@@ -94,7 +96,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -112,9 +114,8 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex ...@@ -112,9 +114,8 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) { func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,7 +176,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou ...@@ -175,7 +176,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -191,9 +192,8 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou ...@@ -191,9 +192,8 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) { func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -259,7 +259,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource ...@@ -259,7 +259,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -275,8 +275,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource ...@@ -275,8 +275,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) { func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -332,7 +331,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. ...@@ -332,7 +331,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -348,8 +347,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. ...@@ -348,8 +347,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) { func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -445,7 +443,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C ...@@ -445,7 +443,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -461,8 +459,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C ...@@ -461,8 +459,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -557,7 +554,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou ...@@ -557,7 +554,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -575,9 +572,8 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou ...@@ -575,9 +572,8 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) { func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient { ...@@ -36,7 +36,8 @@ func NewDisksClient(subscriptionID string) DisksClient {
return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDisksClientWithBaseURI creates an instance of the DisksClient client. // NewDisksClientWithBaseURI creates an instance of the DisksClient client using a custom endpoint. Use this when
// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient { func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient {
return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} return DisksClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -65,6 +66,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName ...@@ -65,6 +66,8 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, 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", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
{Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
}}, }},
{Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
...@@ -95,12 +98,13 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr ...@@ -95,12 +98,13 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
disk.ManagedBy = nil disk.ManagedBy = nil
disk.ManagedByExtended = nil
preparer := autorest.CreatePreparer( preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"), autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(), autorest.AsPut(),
...@@ -114,9 +118,8 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr ...@@ -114,9 +118,8 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) { func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -177,7 +180,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -177,7 +180,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -193,9 +196,8 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -193,9 +196,8 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) { func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -261,7 +263,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str ...@@ -261,7 +263,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -277,8 +279,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str ...@@ -277,8 +279,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) { func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -341,7 +342,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup ...@@ -341,7 +342,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -359,9 +360,8 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup ...@@ -359,9 +360,8 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// GrantAccessSender sends the GrantAccess request. The method will close the // GrantAccessSender sends the GrantAccess request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) { func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -422,7 +422,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro ...@@ -422,7 +422,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -438,8 +438,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro ...@@ -438,8 +438,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) { func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -535,7 +534,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou ...@@ -535,7 +534,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -551,8 +550,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou ...@@ -551,8 +550,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -645,7 +643,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou ...@@ -645,7 +643,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -661,9 +659,8 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou ...@@ -661,9 +659,8 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// RevokeAccessSender sends the RevokeAccess request. The method will close the // RevokeAccessSender sends the RevokeAccess request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) { func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -724,7 +721,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -724,7 +721,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -742,9 +739,8 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -742,9 +739,8 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) { func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient { ...@@ -35,7 +35,8 @@ func NewGalleriesClient(subscriptionID string) GalleriesClient {
return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client. // NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this
// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient { func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient {
return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -80,7 +81,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -80,7 +81,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -98,9 +99,8 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -98,9 +99,8 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) { func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -159,7 +159,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -159,7 +159,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -175,9 +175,8 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -175,9 +175,8 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) { func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -241,7 +240,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -241,7 +240,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -257,8 +256,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -257,8 +256,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) { func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -314,7 +312,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -314,7 +312,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -330,8 +328,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -330,8 +328,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) { func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -427,7 +424,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -427,7 +424,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -443,8 +440,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -443,8 +440,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -496,3 +492,83 @@ func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, r ...@@ -496,3 +492,83 @@ func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, r
result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
return return
} }
// Update update a Shared Image Gallery.
// Parameters:
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
// dots and periods allowed in the middle. The maximum length is 80 characters.
// gallery - parameters supplied to the update Shared Image Gallery operation.
func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) {
pathParameters := map[string]interface{}{
"galleryName": autorest.Encode("path", galleryName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
autorest.WithJSON(gallery),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
...@@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie ...@@ -35,7 +35,9 @@ func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClie
return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client. // NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient { func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient {
return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -84,7 +86,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte ...@@ -84,7 +86,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -102,9 +104,8 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte ...@@ -102,9 +104,8 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) { func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -166,7 +167,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso ...@@ -166,7 +167,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -182,9 +183,8 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso ...@@ -182,9 +183,8 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) { func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -251,7 +251,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc ...@@ -251,7 +251,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -267,8 +267,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc ...@@ -267,8 +267,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) { func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -330,7 +329,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex ...@@ -330,7 +329,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -346,8 +345,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex ...@@ -346,8 +345,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex
// ListByGallerySender sends the ListByGallery request. The method will close the // ListByGallerySender sends the ListByGallery request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) { func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByGalleryResponder handles the response to the ListByGallery request. The method always // ListByGalleryResponder handles the response to the ListByGallery request. The method always
...@@ -399,3 +397,87 @@ func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Contex ...@@ -399,3 +397,87 @@ func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Contex
result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
return return
} }
// Update update a gallery Application Definition.
// Parameters:
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
// updated.
// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed
// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum
// length is 80 characters.
// galleryApplication - parameters supplied to the update gallery Application operation.
func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) {
pathParameters := map[string]interface{}{
"galleryApplicationName": autorest.Encode("path", galleryApplicationName),
"galleryName": autorest.Encode("path", galleryName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
autorest.WithJSON(galleryApplication),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
...@@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati ...@@ -36,7 +36,9 @@ func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicati
return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client. // NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client
// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient { func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient {
return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -101,7 +103,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex ...@@ -101,7 +103,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -119,9 +121,8 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex ...@@ -119,9 +121,8 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) { func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -185,7 +186,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex ...@@ -185,7 +186,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -201,9 +202,8 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex ...@@ -201,9 +202,8 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) { func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -273,7 +273,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, ...@@ -273,7 +273,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -292,8 +292,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, ...@@ -292,8 +292,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) { func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -357,7 +356,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( ...@@ -357,7 +356,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -373,8 +372,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( ...@@ -373,8 +372,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(
// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the // ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) { func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always // ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always
...@@ -426,3 +424,89 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete( ...@@ -426,3 +424,89 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(
result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName) result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName)
return return
} }
// Update update a gallery Application Version.
// Parameters:
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
// to be updated.
// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow
// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
// of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>
// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation.
func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) {
pathParameters := map[string]interface{}{
"galleryApplicationName": autorest.Encode("path", galleryApplicationName),
"galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
"galleryName": autorest.Encode("path", galleryName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
autorest.WithJSON(galleryApplicationVersion),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
...@@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { ...@@ -36,7 +36,8 @@ func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient {
return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. // NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint.
// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient { func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient {
return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -96,7 +97,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re ...@@ -96,7 +97,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -114,9 +115,8 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re ...@@ -114,9 +115,8 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) { func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -177,7 +177,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr ...@@ -177,7 +177,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -193,9 +193,8 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr ...@@ -193,9 +193,8 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) { func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -261,7 +260,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup ...@@ -261,7 +260,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -277,8 +276,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup ...@@ -277,8 +276,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) { func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -339,7 +337,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res ...@@ -339,7 +337,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -355,8 +353,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res ...@@ -355,8 +353,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res
// ListByGallerySender sends the ListByGallery request. The method will close the // ListByGallerySender sends the ListByGallery request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) { func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByGalleryResponder handles the response to the ListByGallery request. The method always // ListByGalleryResponder handles the response to the ListByGallery request. The method always
...@@ -408,3 +405,86 @@ func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, res ...@@ -408,3 +405,86 @@ func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, res
result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName) result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
return return
} }
// Update update a gallery Image Definition.
// Parameters:
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated.
// galleryImageName - the name of the gallery Image Definition to be updated. The allowed characters are
// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
// characters.
// galleryImage - parameters supplied to the update gallery image operation.
func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) {
pathParameters := map[string]interface{}{
"galleryImageName": autorest.Encode("path", galleryImageName),
"galleryName": autorest.Encode("path", galleryName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
autorest.WithJSON(galleryImage),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
...@@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient { ...@@ -35,7 +35,8 @@ func NewImagesClient(subscriptionID string) ImagesClient {
return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewImagesClientWithBaseURI creates an instance of the ImagesClient client. // NewImagesClientWithBaseURI creates an instance of the ImagesClient client using a custom endpoint. Use this when
// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient { func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient {
return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)} return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -79,7 +80,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG ...@@ -79,7 +80,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -97,9 +98,8 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG ...@@ -97,9 +98,8 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) { func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -158,7 +158,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -158,7 +158,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -174,9 +174,8 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -174,9 +174,8 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) { func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -241,7 +240,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st ...@@ -241,7 +240,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -260,8 +259,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st ...@@ -260,8 +259,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) GetSender(req *http.Request) (*http.Response, error) { func (client ImagesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -318,7 +316,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err ...@@ -318,7 +316,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -334,8 +332,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err ...@@ -334,8 +332,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error) { func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -431,7 +428,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso ...@@ -431,7 +428,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -447,8 +444,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso ...@@ -447,8 +444,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -540,7 +536,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -540,7 +536,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -558,9 +554,8 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -558,9 +554,8 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) { func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient { ...@@ -36,7 +36,8 @@ func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient {
return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client. // NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use
// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient { func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient {
return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)} return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -85,7 +86,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context ...@@ -85,7 +86,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -103,9 +104,8 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context ...@@ -103,9 +104,8 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the // ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) { func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -170,7 +170,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con ...@@ -170,7 +170,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -188,9 +188,8 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con ...@@ -188,9 +188,8 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the // ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) { func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { ...@@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. // NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this
// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -75,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe ...@@ -75,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
// ListPreparer prepares the List request. // ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement ...@@ -35,7 +35,9 @@ func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacement
return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client. // NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using
// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient { func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient {
return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -85,7 +87,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. ...@@ -85,7 +87,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -103,8 +105,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. ...@@ -103,8 +105,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
...@@ -164,7 +165,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, ...@@ -164,7 +165,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -180,8 +181,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, ...@@ -180,8 +181,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// DeleteResponder handles the response to the Delete request. The method always // DeleteResponder handles the response to the Delete request. The method always
...@@ -200,7 +200,9 @@ func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response ...@@ -200,7 +200,9 @@ func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response
// Parameters: // Parameters:
// resourceGroupName - the name of the resource group. // resourceGroupName - the name of the resource group.
// proximityPlacementGroupName - the name of the proximity placement group. // proximityPlacementGroupName - the name of the proximity placement group.
func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result ProximityPlacementGroup, err error) { // includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the
// resources in the proximity placement group.
func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) {
if tracing.IsEnabled() { if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get") ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get")
defer func() { defer func() {
...@@ -211,7 +213,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr ...@@ -211,7 +213,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
tracing.EndSpan(ctx, sc, err) tracing.EndSpan(ctx, sc, err)
}() }()
} }
req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName) req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus)
if err != nil { if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request") err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request")
return return
...@@ -233,17 +235,20 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr ...@@ -233,17 +235,20 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
} }
// GetPreparer prepares the Get request. // GetPreparer prepares the Get request.
func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) { func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) {
pathParameters := map[string]interface{}{ pathParameters := map[string]interface{}{
"proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName), "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
"resourceGroupName": autorest.Encode("path", resourceGroupName), "resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
if len(includeColocationStatus) > 0 {
queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus)
}
preparer := autorest.CreatePreparer( preparer := autorest.CreatePreparer(
autorest.AsGet(), autorest.AsGet(),
...@@ -256,8 +261,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re ...@@ -256,8 +261,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -316,7 +320,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con ...@@ -316,7 +320,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -332,8 +336,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con ...@@ -332,8 +336,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -426,7 +429,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont ...@@ -426,7 +429,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -442,8 +445,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont ...@@ -442,8 +445,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont
// ListBySubscriptionSender sends the ListBySubscription request. The method will close the // ListBySubscriptionSender sends the ListBySubscription request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
...@@ -541,7 +543,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, ...@@ -541,7 +543,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -559,8 +561,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, ...@@ -559,8 +561,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// UpdateResponder handles the response to the Update request. The method always // UpdateResponder handles the response to the Update request. The method always
......
...@@ -35,14 +35,15 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { ...@@ -35,14 +35,15 @@ func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. // NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use
// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient { func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
// List gets the list of Microsoft.Compute SKUs available for your Subscription. // List gets the list of Microsoft.Compute SKUs available for your Subscription.
// Parameters: // Parameters:
// filter - the filter to apply on the operation. // filter - the filter to apply on the operation. Only **location** filter is supported currently.
func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) { func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) {
if tracing.IsEnabled() { if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
...@@ -101,8 +102,7 @@ func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string ...@@ -101,8 +102,7 @@ func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) { func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient { ...@@ -36,7 +36,8 @@ func NewSnapshotsClient(subscriptionID string) SnapshotsClient {
return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. // NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this
// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient {
return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -64,6 +65,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN ...@@ -64,6 +65,8 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
}}, }},
{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false, {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
...@@ -94,7 +97,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -94,7 +97,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -113,9 +116,8 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -113,9 +116,8 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) { func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,7 +177,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -175,7 +177,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -191,9 +193,8 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -191,9 +193,8 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) { func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -258,7 +259,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -258,7 +259,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -274,8 +275,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -274,8 +275,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) { func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -337,7 +337,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG ...@@ -337,7 +337,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -355,9 +355,8 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG ...@@ -355,9 +355,8 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// GrantAccessSender sends the GrantAccess request. The method will close the // GrantAccessSender sends the GrantAccess request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) { func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -418,7 +417,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -418,7 +417,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -434,8 +433,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -434,8 +433,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) { func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -531,7 +529,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -531,7 +529,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -547,8 +545,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -547,8 +545,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -640,7 +637,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource ...@@ -640,7 +637,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -656,9 +653,8 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource ...@@ -656,9 +653,8 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// RevokeAccessSender sends the RevokeAccess request. The method will close the // RevokeAccessSender sends the RevokeAccess request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) { func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -718,7 +714,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN ...@@ -718,7 +714,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-11-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -736,9 +732,8 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN ...@@ -736,9 +732,8 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) { func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient { ...@@ -36,7 +36,8 @@ func NewUsageClient(subscriptionID string) UsageClient {
return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewUsageClientWithBaseURI creates an instance of the UsageClient client. // NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when
// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient {
return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} return UsageClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -91,7 +92,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h ...@@ -91,7 +92,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -107,8 +108,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h ...@@ -107,8 +108,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) { func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" ...@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests. // UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string { func UserAgent() string {
return "Azure-SDK-For-Go/" + version.Number + " compute/2019-07-01" return "Azure-SDK-For-Go/" + Version() + " compute/2019-12-01"
} }
// Version returns the semantic version (see http://semver.org) of the client. // Version returns the semantic version (see http://semver.org) of the client.
......
...@@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin ...@@ -36,7 +36,8 @@ func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachin
} }
// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient // NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient
// client. // client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
// (sovereign clouds, Azure stack).
func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient {
return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -86,7 +87,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex ...@@ -86,7 +87,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -102,8 +103,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex ...@@ -102,8 +103,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -162,7 +162,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. ...@@ -162,7 +162,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -178,8 +178,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. ...@@ -178,8 +178,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.
// ListTypesSender sends the ListTypes request. The method will close the // ListTypesSender sends the ListTypes request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListTypesResponder handles the response to the ListTypes request. The method always // ListTypesResponder handles the response to the ListTypes request. The method always
...@@ -240,7 +239,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte ...@@ -240,7 +239,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte
"type": autorest.Encode("path", typeParameter), "type": autorest.Encode("path", typeParameter),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -265,8 +264,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte ...@@ -265,8 +264,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte
// ListVersionsSender sends the ListVersions request. The method will close the // ListVersionsSender sends the ListVersions request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListVersionsResponder handles the response to the ListVersions request. The method always // ListVersionsResponder handles the response to the ListVersions request. The method always
......
...@@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte ...@@ -35,7 +35,9 @@ func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExte
return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. // NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client using
// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient { func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient {
return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -81,7 +83,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. ...@@ -81,7 +83,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -99,9 +101,8 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. ...@@ -99,9 +101,8 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) { func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -162,7 +163,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, ...@@ -162,7 +163,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -178,9 +179,8 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, ...@@ -178,9 +179,8 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) { func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -247,7 +247,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re ...@@ -247,7 +247,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -266,8 +266,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re ...@@ -266,8 +266,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -328,7 +327,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r ...@@ -328,7 +327,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -347,8 +346,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r ...@@ -347,8 +346,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -405,7 +403,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, ...@@ -405,7 +403,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -423,9 +421,8 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, ...@@ -423,9 +421,8 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) { func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl ...@@ -35,7 +35,9 @@ func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesCl
return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. // NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient { func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient {
return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -90,7 +92,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati ...@@ -90,7 +92,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -106,8 +108,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati ...@@ -106,8 +108,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -129,8 +130,8 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu ...@@ -129,8 +130,8 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu
// publisherName - a valid image publisher. // publisherName - a valid image publisher.
// offer - a valid image publisher offer. // offer - a valid image publisher offer.
// skus - a valid image SKU. // skus - a valid image SKU.
// filter - the filter to apply on the operation. // expand - the expand expression to apply on the operation.
func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) {
if tracing.IsEnabled() { if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List") ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List")
defer func() { defer func() {
...@@ -141,7 +142,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri ...@@ -141,7 +142,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
tracing.EndSpan(ctx, sc, err) tracing.EndSpan(ctx, sc, err)
}() }()
} }
req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, filter, top, orderby) req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, expand, top, orderby)
if err != nil { if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request") err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request")
return return
...@@ -163,7 +164,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri ...@@ -163,7 +164,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
} }
// ListPreparer prepares the List request. // ListPreparer prepares the List request.
func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (*http.Request, error) { func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) {
pathParameters := map[string]interface{}{ pathParameters := map[string]interface{}{
"location": autorest.Encode("path", location), "location": autorest.Encode("path", location),
"offer": autorest.Encode("path", offer), "offer": autorest.Encode("path", offer),
...@@ -172,12 +173,12 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat ...@@ -172,12 +173,12 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
if len(filter) > 0 { if len(expand) > 0 {
queryParameters["$filter"] = autorest.Encode("query", filter) queryParameters["$expand"] = autorest.Encode("query", expand)
} }
if top != nil { if top != nil {
queryParameters["$top"] = autorest.Encode("query", *top) queryParameters["$top"] = autorest.Encode("query", *top)
...@@ -197,8 +198,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat ...@@ -197,8 +198,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -258,7 +258,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, ...@@ -258,7 +258,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -274,8 +274,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, ...@@ -274,8 +274,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context,
// ListOffersSender sends the ListOffers request. The method will close the // ListOffersSender sends the ListOffers request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListOffersResponder handles the response to the ListOffers request. The method always // ListOffersResponder handles the response to the ListOffers request. The method always
...@@ -333,7 +332,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont ...@@ -333,7 +332,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -349,8 +348,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont ...@@ -349,8 +348,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont
// ListPublishersSender sends the ListPublishers request. The method will close the // ListPublishersSender sends the ListPublishers request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListPublishersResponder handles the response to the ListPublishers request. The method always // ListPublishersResponder handles the response to the ListPublishers request. The method always
...@@ -412,7 +410,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l ...@@ -412,7 +410,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -428,8 +426,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l ...@@ -428,8 +426,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l
// ListSkusSender sends the ListSkus request. The method will close the // ListSkusSender sends the ListSkus request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListSkusResponder handles the response to the ListSkus request. The method always // ListSkusResponder handles the response to the ListSkus request. The method always
......
...@@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun ...@@ -36,7 +36,9 @@ func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRun
return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. // NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client
// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient {
return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -91,7 +93,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l ...@@ -91,7 +93,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -107,8 +109,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l ...@@ -107,8 +109,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -173,7 +174,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, ...@@ -173,7 +174,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -189,8 +190,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, ...@@ -189,8 +190,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac ...@@ -36,7 +36,8 @@ func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMac
} }
// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the // NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the
// VirtualMachineScaleSetExtensionsClient client. // VirtualMachineScaleSetExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient { func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient {
return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -82,11 +83,12 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx ...@@ -82,11 +83,12 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
extensionParameters.Type = nil
preparer := autorest.CreatePreparer( preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"), autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(), autorest.AsPut(),
...@@ -100,9 +102,8 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx ...@@ -100,9 +102,8 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) { func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -163,7 +164,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. ...@@ -163,7 +164,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -179,9 +180,8 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. ...@@ -179,9 +180,8 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) { func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -248,7 +248,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con ...@@ -248,7 +248,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -267,8 +267,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con ...@@ -267,8 +267,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -329,7 +328,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co ...@@ -329,7 +328,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -345,8 +344,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co ...@@ -345,8 +344,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -398,3 +396,86 @@ func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Co ...@@ -398,3 +396,86 @@ func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Co
result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName) result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName)
return return
} }
// Update the operation to update an extension.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set where the extension should be updated.
// vmssExtensionName - the name of the VM scale set extension.
// extensionParameters - parameters supplied to the Update VM scale set Extension operation.
func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update")
defer func() {
sc := -1
if result.Response() != nil {
sc = result.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
"vmssExtensionName": autorest.Encode("path", vmssExtensionName),
}
const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
extensionParameters.Name = nil
extensionParameters.Type = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
autorest.WithJSON(extensionParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
var resp *http.Response
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
...@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu ...@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) Virtu
} }
// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the // NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the
// VirtualMachineScaleSetRollingUpgradesClient client. // VirtualMachineScaleSetRollingUpgradesClient client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient {
return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -80,7 +81,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con ...@@ -80,7 +81,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -96,9 +97,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con ...@@ -96,9 +97,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// CancelSender sends the Cancel request. The method will close the // CancelSender sends the Cancel request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) { func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx ...@@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -178,8 +178,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx ...@@ -178,8 +178,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx
// GetLatestSender sends the GetLatest request. The method will close the // GetLatestSender sends the GetLatest request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetLatestResponder handles the response to the GetLatest request. The method always // GetLatestResponder handles the response to the GetLatest request. The method always
...@@ -235,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP ...@@ -235,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -251,9 +250,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP ...@@ -251,9 +250,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the // StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) { func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -312,7 +310,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer ...@@ -312,7 +310,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -328,9 +326,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer ...@@ -328,9 +326,8 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the // StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) { func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualM ...@@ -37,7 +37,8 @@ func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualM
} }
// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the // NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the
// VirtualMachineScaleSetVMExtensionsClient client. // VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient { func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -85,7 +86,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct ...@@ -85,7 +86,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -103,9 +104,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct ...@@ -103,9 +104,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) { func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -168,7 +168,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex ...@@ -168,7 +168,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -184,9 +184,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex ...@@ -184,9 +184,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) { func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -255,7 +254,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C ...@@ -255,7 +254,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -274,8 +273,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C ...@@ -274,8 +273,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -338,7 +336,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. ...@@ -338,7 +336,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -357,8 +355,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. ...@@ -357,8 +355,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -417,7 +414,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex ...@@ -417,7 +414,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -435,9 +432,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex ...@@ -435,9 +432,8 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
// UpdateSender sends the Update request. The method will close the // UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) { func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie ...@@ -36,7 +36,9 @@ func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClie
return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. // NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient { func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient {
return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -90,7 +92,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati ...@@ -90,7 +92,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2019-07-01" const APIVersion = "2019-12-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -106,8 +108,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati ...@@ -106,8 +108,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) { func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
// Package containerservice implements the Azure ARM Containerservice service API version .
//
// The Container Service Client.
package containerservice
// 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"
)
const (
// DefaultBaseURI is the default URI used for the service Containerservice
DefaultBaseURI = "https://management.azure.com"
)
// BaseClient is the base client for Containerservice.
type BaseClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the BaseClient client.
func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return BaseClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}
package containerservice
// 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 (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// OperationsClient is the the Container Service Client.
type OperationsClient struct {
BaseClient
}
// 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 using a custom endpoint. Use this
// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List gets a list of compute operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.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, "containerservice.OperationsClient", "List", resp, "Failure sending request")
return
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
const APIVersion = "2020-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/providers/Microsoft.ContainerService/operations"),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// 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 client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
// 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
}
package containerservice
import "github.com/Azure/azure-sdk-for-go/version"
// 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.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/" + Version() + " containerservice/2020-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return version.Number
}
...@@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri ...@@ -35,7 +35,9 @@ func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecuri
return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. // NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client
// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient { func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient {
return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -98,9 +100,8 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context ...@@ -98,9 +100,8 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) { func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,9 +176,8 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context ...@@ -175,9 +176,8 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) { func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -257,8 +257,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r ...@@ -257,8 +257,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -333,8 +332,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context, ...@@ -333,8 +332,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -443,8 +441,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex ...@@ -443,8 +441,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex
// ListAllSender sends the ListAll request. The method will close the // ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListAllResponder handles the response to the ListAll request. The method always // ListAllResponder handles the response to the ListAll request. The method always
...@@ -554,9 +551,8 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con ...@@ -554,9 +551,8 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) { func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl ...@@ -35,7 +35,9 @@ func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsCl
return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client. // NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient { func NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient {
return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -99,8 +101,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat ...@@ -99,8 +101,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailableDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { func (client AvailableDelegationsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint ...@@ -35,7 +35,9 @@ func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpoint
return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. // NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client
// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient { func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient {
return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)} return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -99,8 +101,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context, ...@@ -99,8 +101,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context,
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) { func (client AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv ...@@ -36,7 +36,8 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePriv
} }
// NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient // NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient
// client. // client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
// (sovereign clouds, Azure stack).
func NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { func NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient {
return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -100,8 +101,7 @@ func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Conte ...@@ -100,8 +101,7 @@ func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Conte
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) { func (client AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -216,8 +216,7 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ct ...@@ -216,8 +216,7 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ct
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
......
...@@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available ...@@ -37,7 +37,8 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string) Available
} }
// NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the // NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the
// AvailableResourceGroupDelegationsClient client. // AvailableResourceGroupDelegationsClient client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient { func NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient {
return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)} return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -103,8 +104,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C ...@@ -103,8 +104,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AvailableResourceGroupDelegationsClient) ListSender(req *http.Request) (*http.Response, error) { func (client AvailableResourceGroupDelegationsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags ...@@ -35,7 +35,9 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTags
return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client. // NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient client using a
// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
// Azure stack).
func NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient { func NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient {
return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)} return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -96,8 +98,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) ( ...@@ -96,8 +98,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) (
// ListAllSender sends the ListAll request. The method will close the // ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallFqdnTagsClient) ListAllSender(req *http.Request) (*http.Response, error) { func (client AzureFirewallFqdnTagsClient) ListAllSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListAllResponder handles the response to the ListAll request. The method always // ListAllResponder handles the response to the ListAll request. The method always
......
...@@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient { ...@@ -35,7 +35,8 @@ func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient {
return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client. // NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient client using a custom endpoint.
// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient { func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient {
return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)} return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -98,9 +99,8 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r ...@@ -98,9 +99,8 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) { func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,9 +175,8 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG ...@@ -175,9 +175,8 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) { func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -257,8 +256,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou ...@@ -257,8 +256,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) GetSender(req *http.Request) (*http.Response, error) { func (client AzureFirewallsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -333,8 +331,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro ...@@ -333,8 +331,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) ListSender(req *http.Request) (*http.Response, error) { func (client AzureFirewallsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -443,8 +440,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R ...@@ -443,8 +440,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R
// ListAllSender sends the ListAll request. The method will close the // ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) { func (client AzureFirewallsClient) ListAllSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListAllResponder handles the response to the ListAll request. The method always // ListAllResponder handles the response to the ListAll request. The method always
...@@ -561,8 +557,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou ...@@ -561,8 +557,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// UpdateTagsResponder handles the response to the UpdateTags request. The method always // UpdateTagsResponder handles the response to the UpdateTags request. The method always
......
...@@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient { ...@@ -35,7 +35,8 @@ func NewBastionHostsClient(subscriptionID string) BastionHostsClient {
return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. // NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client using a custom endpoint. Use
// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient {
return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)} return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -98,9 +99,8 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res ...@@ -98,9 +99,8 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) { func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,9 +175,8 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro ...@@ -175,9 +175,8 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) { func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -257,8 +256,7 @@ func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupN ...@@ -257,8 +256,7 @@ func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupN
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) { func (client BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -330,8 +328,7 @@ func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Reques ...@@ -330,8 +328,7 @@ func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Reques
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) { func (client BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -443,8 +440,7 @@ func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context ...@@ -443,8 +440,7 @@ func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -554,9 +550,8 @@ func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourc ...@@ -554,9 +550,8 @@ func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourc
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) { func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities ...@@ -35,7 +35,9 @@ func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunities
return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. // NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client using a
// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
// Azure stack).
func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient { func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient {
return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)} return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -96,8 +98,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht ...@@ -96,8 +98,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) { func (client BgpServiceCommunitiesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient { ...@@ -45,7 +45,8 @@ func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID) return NewWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewWithBaseURI creates an instance of the BaseClient client. // NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return BaseClient{ return BaseClient{
Client: autorest.NewClientWithUserAgent(UserAgent()), Client: autorest.NewClientWithUserAgent(UserAgent()),
...@@ -115,8 +116,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l ...@@ -115,8 +116,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l
// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the // CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) { func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always // CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always
...@@ -192,8 +192,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, ...@@ -192,8 +192,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context,
// SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the // SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) { func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always // SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always
......
...@@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient ...@@ -36,7 +36,9 @@ func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient
return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewConnectionMonitorsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client. // NewConnectionMonitorsClientWithBaseURI creates an instance of the ConnectionMonitorsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient { func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient {
return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)} return ConnectionMonitorsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -110,9 +112,8 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex ...@@ -110,9 +112,8 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) { func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -189,9 +190,8 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou ...@@ -189,9 +190,8 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) { func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -273,8 +273,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource ...@@ -273,8 +273,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ConnectionMonitorsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -350,8 +349,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc ...@@ -350,8 +349,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ConnectionMonitorsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -423,9 +421,8 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour ...@@ -423,9 +421,8 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// QuerySender sends the Query request. The method will close the // QuerySender sends the Query request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) { func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -502,9 +499,8 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour ...@@ -502,9 +499,8 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// StartSender sends the Start request. The method will close the // StartSender sends the Start request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) { func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -580,9 +576,8 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc ...@@ -580,9 +576,8 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// StopSender sends the Stop request. The method will close the // StopSender sends the Stop request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) { func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -667,8 +662,7 @@ func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, r ...@@ -667,8 +662,7 @@ func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, r
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { func (client ConnectionMonitorsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// UpdateTagsResponder handles the response to the UpdateTags request. The method always // UpdateTagsResponder handles the response to the UpdateTags request. The method always
......
...@@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient ...@@ -35,7 +35,9 @@ func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient
return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. // NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient { func NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient {
return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -98,9 +100,8 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex ...@@ -98,9 +100,8 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) { func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,9 +176,8 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou ...@@ -175,9 +176,8 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) { func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -257,8 +257,7 @@ func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resource ...@@ -257,8 +257,7 @@ func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resource
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { func (client DdosCustomPoliciesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -331,9 +330,8 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r ...@@ -331,9 +330,8 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) { func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie ...@@ -35,7 +35,9 @@ func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClie
return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client. // NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient { func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient {
return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)} return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -101,9 +103,8 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte ...@@ -101,9 +103,8 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) { func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -178,9 +179,8 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso ...@@ -178,9 +179,8 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) { func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -260,8 +260,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc ...@@ -260,8 +260,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) GetSender(req *http.Request) (*http.Response, error) { func (client DdosProtectionPlansClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -333,8 +332,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http ...@@ -333,8 +332,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) ListSender(req *http.Request) (*http.Response, error) { func (client DdosProtectionPlansClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -446,8 +444,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context. ...@@ -446,8 +444,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context.
// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { func (client DdosProtectionPlansClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
...@@ -557,9 +554,8 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, ...@@ -557,9 +554,8 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) { func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
...@@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl ...@@ -35,7 +35,9 @@ func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesCl
return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. // NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient { func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient {
return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -102,8 +104,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour ...@@ -102,8 +104,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { func (client DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -180,8 +181,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou ...@@ -180,8 +181,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { func (client DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo ...@@ -37,7 +37,8 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRo
} }
// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the // NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the
// ExpressRouteCircuitAuthorizationsClient client. // ExpressRouteCircuitAuthorizationsClient client using a custom endpoint. Use this when interacting with an Azure
// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient { func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient {
return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -104,9 +105,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx ...@@ -104,9 +105,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) { func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -183,9 +183,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context ...@@ -183,9 +183,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) { func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -267,8 +266,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co ...@@ -267,8 +266,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -345,8 +343,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C ...@@ -345,8 +343,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute ...@@ -36,7 +36,8 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRoute
} }
// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient // NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient
// client. // client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
// (sovereign clouds, Azure stack).
func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient { func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient {
return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -105,9 +106,8 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co ...@@ -105,9 +106,8 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) { func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -186,9 +186,8 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co ...@@ -186,9 +186,8 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) { func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -272,8 +271,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte ...@@ -272,8 +271,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -352,8 +350,7 @@ func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Cont ...@@ -352,8 +350,7 @@ func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Cont
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir ...@@ -36,7 +36,9 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCir
return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. // NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client
// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
// clouds, Azure stack).
func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient { func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient {
return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -63,7 +65,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte ...@@ -63,7 +65,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false, Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil},
{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, {Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
}}, }},
}}}}}); err != nil { }}}}}); err != nil {
return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error()) return result, validation.NewError("network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", err.Error())
...@@ -113,9 +115,8 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte ...@@ -113,9 +115,8 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) { func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -192,9 +193,8 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte ...@@ -192,9 +193,8 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) { func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -276,8 +276,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, ...@@ -276,8 +276,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context,
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitPeeringsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -354,8 +353,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context ...@@ -354,8 +353,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitPeeringsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
......
...@@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl ...@@ -35,7 +35,9 @@ func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsCl
return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID)
} }
// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. // NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient { func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient {
return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
...@@ -98,9 +100,8 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont ...@@ -98,9 +100,8 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) { func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -175,9 +176,8 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res ...@@ -175,9 +176,8 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// DeleteSender sends the Delete request. The method will close the // DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) { func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -257,8 +257,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour ...@@ -257,8 +257,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour
// GetSender sends the Get request. The method will close the // GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitsClient) GetSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetResponder handles the response to the Get request. The method always // GetResponder handles the response to the Get request. The method always
...@@ -336,8 +335,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con ...@@ -336,8 +335,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con
// GetPeeringStatsSender sends the GetPeeringStats request. The method will close the // GetPeeringStatsSender sends the GetPeeringStats request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitsClient) GetPeeringStatsSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always // GetPeeringStatsResponder handles the response to the GetPeeringStats request. The method always
...@@ -413,8 +411,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r ...@@ -413,8 +411,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r
// GetStatsSender sends the GetStats request. The method will close the // GetStatsSender sends the GetStats request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitsClient) GetStatsSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// GetStatsResponder handles the response to the GetStats request. The method always // GetStatsResponder handles the response to the GetStats request. The method always
...@@ -489,8 +486,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou ...@@ -489,8 +486,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou
// ListSender sends the List request. The method will close the // ListSender sends the List request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitsClient) ListSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListResponder handles the response to the List request. The method always // ListResponder handles the response to the List request. The method always
...@@ -599,8 +595,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (* ...@@ -599,8 +595,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*
// ListAllSender sends the ListAll request. The method will close the // ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) { func (client ExpressRouteCircuitsClient) ListAllSender(req *http.Request) (*http.Response, error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) return client.Send(req, azure.DoRetryWithRegistration(client.Client))
return autorest.SendWithSender(client, req, sd...)
} }
// ListAllResponder handles the response to the ListAll request. The method always // ListAllResponder handles the response to the ListAll request. The method always
...@@ -711,9 +706,8 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex ...@@ -711,9 +706,8 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// ListArpTableSender sends the ListArpTable request. The method will close the // ListArpTableSender sends the ListArpTable request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) { func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -793,9 +787,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con ...@@ -793,9 +787,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// ListRoutesTableSender sends the ListRoutesTable request. The method will close the // ListRoutesTableSender sends the ListRoutesTable request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) { func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -875,9 +868,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont ...@@ -875,9 +868,8 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the // ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) { func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
...@@ -955,9 +947,8 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, ...@@ -955,9 +947,8 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// UpdateTagsSender sends the UpdateTags request. The method will close the // UpdateTagsSender sends the UpdateTags request. The method will close the
// http.Response Body if it receives an error. // http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) { func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client))
var resp *http.Response var resp *http.Response
resp, err = autorest.SendWithSender(client, req, sd...) resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil { if err != nil {
return return
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment