Commit d210b4bc authored by andyzhangx's avatar andyzhangx

upgrade azure sdk to support ultra ssd

update Godeps.json update azure sdk for ultrassd support update bazel fix build failure
parent b53edbc6
...@@ -35,34 +35,34 @@ ...@@ -35,34 +35,34 @@
"Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821" "Rev": "3b1ae45394a234c385be014e9a488f2bb6eef821"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute", "ImportPath": "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry", "ImportPath": "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network", "ImportPath": "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage", "ImportPath": "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/storage", "ImportPath": "github.com/Azure/azure-sdk-for-go/storage",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/azure-sdk-for-go/version", "ImportPath": "github.com/Azure/azure-sdk-for-go/version",
"Comment": "v21.1.0", "Comment": "v21.3.0",
"Rev": "6d20bdbae88c06c36d72eb512295417693bfdf4e" "Rev": "da91af54816b4cf72949c225a2d0980f51fab01b"
}, },
{ {
"ImportPath": "github.com/Azure/go-ansiterm", "ImportPath": "github.com/Azure/go-ansiterm",
...@@ -74,43 +74,43 @@ ...@@ -74,43 +74,43 @@
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest", "ImportPath": "github.com/Azure/go-autorest/autorest",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest/adal", "ImportPath": "github.com/Azure/go-autorest/autorest/adal",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest/azure", "ImportPath": "github.com/Azure/go-autorest/autorest/azure",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest/date", "ImportPath": "github.com/Azure/go-autorest/autorest/date",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest/to", "ImportPath": "github.com/Azure/go-autorest/autorest/to",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/autorest/validation", "ImportPath": "github.com/Azure/go-autorest/autorest/validation",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/logger", "ImportPath": "github.com/Azure/go-autorest/logger",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/Azure/go-autorest/version", "ImportPath": "github.com/Azure/go-autorest/version",
"Comment": "v10.15.4", "Comment": "v11.1.0",
"Rev": "a88c19ef2016e095f0b6c3b451074b4663f53bed" "Rev": "ea233b6412b0421a65dc6160e16c893364664a95"
}, },
{ {
"ImportPath": "github.com/GeertJohan/go.rice", "ImportPath": "github.com/GeertJohan/go.rice",
......
...@@ -58,7 +58,7 @@ go_library( ...@@ -58,7 +58,7 @@ go_library(
"//staging/src/k8s.io/client-go/tools/record:go_default_library", "//staging/src/k8s.io/client-go/tools/record:go_default_library",
"//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library", "//staging/src/k8s.io/client-go/util/flowcontrol:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library",
...@@ -101,7 +101,7 @@ go_test( ...@@ -101,7 +101,7 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/golang/glog" "github.com/golang/glog"
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
cloudprovider "k8s.io/cloud-provider" cloudprovider "k8s.io/cloud-provider"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
......
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
) )
......
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/golang/glog" "github.com/golang/glog"
...@@ -92,7 +92,7 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) ( ...@@ -92,7 +92,7 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (
Tags: newTags, Tags: newTags,
Zones: createZones, Zones: createZones,
Sku: &compute.DiskSku{ Sku: &compute.DiskSku{
Name: compute.StorageAccountTypes(options.StorageAccountType), Name: compute.DiskStorageAccountTypes(options.StorageAccountType),
}, },
DiskProperties: &compute.DiskProperties{ DiskProperties: &compute.DiskProperties{
DiskSizeGB: &diskSizeGB, DiskSizeGB: &diskSizeGB,
......
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
cloudprovider "k8s.io/cloud-provider" cloudprovider "k8s.io/cloud-provider"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/golang/glog" "github.com/golang/glog"
......
...@@ -34,7 +34,7 @@ import ( ...@@ -34,7 +34,7 @@ import (
"k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth" "k8s.io/kubernetes/pkg/cloudprovider/providers/azure/auth"
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -17,7 +17,7 @@ limitations under the License. ...@@ -17,7 +17,7 @@ limitations under the License.
package azure package azure
import ( import (
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
......
...@@ -24,7 +24,7 @@ import ( ...@@ -24,7 +24,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/golang/glog" "github.com/golang/glog"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -23,7 +23,7 @@ import ( ...@@ -23,7 +23,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network" "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network"
"github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest"
"github.com/golang/glog" "github.com/golang/glog"
......
...@@ -39,7 +39,7 @@ go_library( ...@@ -39,7 +39,7 @@ go_library(
"//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library", "//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library", "//staging/src/k8s.io/cloud-provider:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/golang/glog:go_default_library", "//vendor/github.com/golang/glog:go_default_library",
], ],
...@@ -75,7 +75,7 @@ go_test( ...@@ -75,7 +75,7 @@ go_test(
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/types:go_default_library",
"//staging/src/k8s.io/client-go/util/testing:go_default_library", "//staging/src/k8s.io/client-go/util/testing:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:go_default_library",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library",
......
...@@ -25,7 +25,7 @@ import ( ...@@ -25,7 +25,7 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"
"github.com/golang/glog" "github.com/golang/glog"
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
"os" "os"
"testing" "testing"
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute" "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -17,6 +17,7 @@ limitations under the License. ...@@ -17,6 +17,7 @@ limitations under the License.
package azure package azure
import ( import (
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"net/http" "net/http"
...@@ -243,9 +244,9 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) { ...@@ -243,9 +244,9 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) {
token: adal.Token{ token: adal.Token{
AccessToken: accessToken, AccessToken: accessToken,
RefreshToken: refreshToken, RefreshToken: refreshToken,
ExpiresIn: expiresIn, ExpiresIn: json.Number(expiresIn),
ExpiresOn: expiresOn, ExpiresOn: json.Number(expiresOn),
NotBefore: expiresOn, NotBefore: json.Number(expiresOn),
Resource: fmt.Sprintf("spn:%s", apiserverID), Resource: fmt.Sprintf("spn:%s", apiserverID),
Type: tokenType, Type: tokenType,
}, },
...@@ -262,8 +263,8 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error { ...@@ -262,8 +263,8 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error {
newCfg[cfgClientID] = token.clientID newCfg[cfgClientID] = token.clientID
newCfg[cfgTenantID] = token.tenantID newCfg[cfgTenantID] = token.tenantID
newCfg[cfgApiserverID] = token.apiserverID newCfg[cfgApiserverID] = token.apiserverID
newCfg[cfgExpiresIn] = token.token.ExpiresIn newCfg[cfgExpiresIn] = string(token.token.ExpiresIn)
newCfg[cfgExpiresOn] = token.token.ExpiresOn newCfg[cfgExpiresOn] = string(token.token.ExpiresOn)
err := ts.persister.Persist(newCfg) err := ts.persister.Persist(newCfg)
if err != nil { if err != nil {
......
...@@ -16,6 +16,7 @@ filegroup( ...@@ -16,6 +16,7 @@ filegroup(
"//vendor/cloud.google.com/go/compute/metadata:all-srcs", "//vendor/cloud.google.com/go/compute/metadata:all-srcs",
"//vendor/cloud.google.com/go/internal:all-srcs", "//vendor/cloud.google.com/go/internal:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network:all-srcs",
"//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:all-srcs",
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"availabilitysets.go",
"client.go",
"disks.go",
"images.go",
"loganalytics.go",
"models.go",
"operations.go",
"snapshots.go",
"usage.go",
"version.go",
"virtualmachineextensionimages.go",
"virtualmachineextensions.go",
"virtualmachineimages.go",
"virtualmachineruncommands.go",
"virtualmachines.go",
"virtualmachinescalesetextensions.go",
"virtualmachinescalesetrollingupgrades.go",
"virtualmachinescalesets.go",
"virtualmachinescalesetvms.go",
"virtualmachinesizes.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute",
importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-04-01/compute",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/date:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/validation:go_default_library",
],
)
filegroup( filegroup(
name = "package-srcs", name = "package-srcs",
srcs = glob(["**"]), srcs = glob(["**"]),
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"availabilitysets.go",
"client.go",
"containerservices.go",
"disks.go",
"galleries.go",
"galleryimages.go",
"galleryimageversions.go",
"images.go",
"loganalytics.go",
"models.go",
"operations.go",
"resourceskus.go",
"snapshots.go",
"usage.go",
"version.go",
"virtualmachineextensionimages.go",
"virtualmachineextensions.go",
"virtualmachineimages.go",
"virtualmachineruncommands.go",
"virtualmachines.go",
"virtualmachinescalesetextensions.go",
"virtualmachinescalesetrollingupgrades.go",
"virtualmachinescalesets.go",
"virtualmachinescalesetvms.go",
"virtualmachinesizes.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute",
importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/date:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library",
"//vendor/github.com/Azure/go-autorest/autorest/validation:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
...@@ -74,7 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, ...@@ -74,7 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -143,7 +143,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc ...@@ -143,7 +143,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -209,7 +209,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr ...@@ -209,7 +209,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -275,7 +275,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG ...@@ -275,7 +275,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -370,7 +370,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont ...@@ -370,7 +370,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -433,7 +433,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont ...@@ -433,7 +433,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -528,7 +528,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc ...@@ -528,7 +528,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
// Package compute implements the Azure ARM Compute service API version 2018-04-01. // Package compute implements the Azure ARM Compute service API version .
// //
// Compute Client // Compute Client
package compute package compute
......
...@@ -92,7 +92,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr ...@@ -92,7 +92,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -167,7 +167,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -167,7 +167,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -245,7 +245,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str ...@@ -245,7 +245,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -315,7 +315,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup ...@@ -315,7 +315,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -390,7 +390,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro ...@@ -390,7 +390,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 = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -483,7 +483,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou ...@@ -483,7 +483,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -573,7 +573,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou ...@@ -573,7 +573,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -646,7 +646,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -646,7 +646,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -68,7 +68,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG ...@@ -68,7 +68,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -141,7 +141,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName ...@@ -141,7 +141,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -218,7 +218,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st ...@@ -218,7 +218,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -285,7 +285,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err ...@@ -285,7 +285,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 = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -378,7 +378,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso ...@@ -378,7 +378,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -467,7 +467,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName ...@@ -467,7 +467,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -74,7 +74,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context ...@@ -74,7 +74,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -153,7 +153,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con ...@@ -153,7 +153,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -64,7 +64,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe ...@@ -64,7 +64,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 = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
package compute
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
// ResourceSkusClient is the compute Client
type ResourceSkusClient struct {
BaseClient
}
// NewResourceSkusClient creates an instance of the ResourceSkusClient client.
func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client.
func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List gets the list of Microsoft.Compute SKUs available for your Subscription.
func (client ResourceSkusClient) List(ctx context.Context) (result ResourceSkusResultPage, err error) {
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
result.rsr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request")
return
}
result.rsr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request")
}
return
}
// ListPreparer prepares the List request.
func (client ResourceSkusClient) ListPreparer(ctx context.Context) (*http.Request, error) {
pathParameters := map[string]interface{}{
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", pathParameters),
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 ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
azure.DoRetryWithRegistration(client.Client))
}
// ListResponder handles the response to the List request. The method always
// closes the http.Response Body.
func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listNextResults retrieves the next set of results, if any.
func (client ResourceSkusClient) listNextResults(lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
req, err := lastResults.resourceSkusResultPreparer()
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure sending next results request")
}
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request")
}
return
}
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ResourceSkusClient) ListComplete(ctx context.Context) (result ResourceSkusResultIterator, err error) {
result.page, err = client.List(ctx)
return
}
...@@ -49,19 +49,19 @@ func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) Snapsh ...@@ -49,19 +49,19 @@ func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) Snapsh
func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) { func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) {
if err := validation.Validate([]validation.Validation{ if err := validation.Validate([]validation.Validation{
{TargetValue: snapshot, {TargetValue: snapshot,
Constraints: []validation.Constraint{{Target: "snapshot.DiskProperties", Name: validation.Null, Rule: false, Constraints: []validation.Constraint{{Target: "snapshot.SnapshotProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.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.DiskProperties.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.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false, {Target: "snapshot.SnapshotProperties.EncryptionSettings", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, {Target: "snapshot.SnapshotProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
}}, }},
{Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, {Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
{Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, {Target: "snapshot.SnapshotProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
}}, }},
}}, }},
}}}}}); err != nil { }}}}}); err != nil {
...@@ -91,7 +91,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour ...@@ -91,7 +91,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -165,7 +165,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN ...@@ -165,7 +165,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -242,7 +242,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName ...@@ -242,7 +242,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -311,7 +311,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG ...@@ -311,7 +311,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -386,7 +386,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, ...@@ -386,7 +386,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -479,7 +479,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r ...@@ -479,7 +479,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -568,7 +568,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource ...@@ -568,7 +568,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -640,7 +640,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN ...@@ -640,7 +640,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-06-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -80,7 +80,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h ...@@ -80,7 +80,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 = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -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/2018-04-01" return "Azure-SDK-For-Go/" + version.Number + " compute/2018-10-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.
......
...@@ -75,7 +75,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex ...@@ -75,7 +75,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -141,7 +141,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. ...@@ -141,7 +141,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -209,7 +209,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte ...@@ -209,7 +209,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte
"type": autorest.Encode("path", typeParameter), "type": autorest.Encode("path", typeParameter),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -70,7 +70,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. ...@@ -70,7 +70,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -145,7 +145,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, ...@@ -145,7 +145,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -224,7 +224,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re ...@@ -224,7 +224,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -295,7 +295,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r ...@@ -295,7 +295,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -362,7 +362,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, ...@@ -362,7 +362,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -79,7 +79,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati ...@@ -79,7 +79,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati
"version": autorest.Encode("path", version), "version": autorest.Encode("path", version),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -151,7 +151,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat ...@@ -151,7 +151,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -227,7 +227,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, ...@@ -227,7 +227,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -292,7 +292,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont ...@@ -292,7 +292,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -361,7 +361,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l ...@@ -361,7 +361,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -80,7 +80,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l ...@@ -80,7 +80,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -152,7 +152,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, ...@@ -152,7 +152,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -78,7 +78,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc ...@@ -78,7 +78,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -152,7 +152,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co ...@@ -152,7 +152,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -244,7 +244,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, ...@@ -244,7 +244,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -318,7 +318,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso ...@@ -318,7 +318,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -388,7 +388,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource ...@@ -388,7 +388,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -464,7 +464,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso ...@@ -464,7 +464,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -531,7 +531,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro ...@@ -531,7 +531,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -601,7 +601,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re ...@@ -601,7 +601,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -668,7 +668,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr ...@@ -668,7 +668,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -759,7 +759,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context) (*http. ...@@ -759,7 +759,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context) (*http.
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -853,7 +853,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte ...@@ -853,7 +853,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -914,7 +914,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte ...@@ -914,7 +914,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -985,7 +985,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour ...@@ -985,7 +985,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1055,7 +1055,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour ...@@ -1055,7 +1055,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1125,7 +1125,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc ...@@ -1125,7 +1125,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1202,7 +1202,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso ...@@ -1202,7 +1202,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1275,7 +1275,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG ...@@ -1275,7 +1275,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1346,7 +1346,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource ...@@ -1346,7 +1346,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
"vmName": autorest.Encode("path", VMName), "vmName": autorest.Encode("path", VMName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -71,7 +71,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx ...@@ -71,7 +71,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -146,7 +146,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. ...@@ -146,7 +146,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -225,7 +225,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con ...@@ -225,7 +225,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con
"vmssExtensionName": autorest.Encode("path", vmssExtensionName), "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -296,7 +296,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co ...@@ -296,7 +296,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con ...@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -145,7 +145,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx ...@@ -145,7 +145,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -178,6 +178,78 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(res ...@@ -178,6 +178,78 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(res
return return
} }
// StartExtensionUpgrade starts a rolling upgrade to move all extensions for all virtual machine scale set instances to
// the latest available extension version. Instances which are already running the latest extension versions are not
// affected.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request")
return
}
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
return
}
return
}
// StartExtensionUpgradePreparer prepares the StartExtensionUpgrade request.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
"vmScaleSetName": autorest.Encode("path", VMScaleSetName),
}
const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
var resp *http.Response
resp, err = autorest.SendWithSender(client, req,
azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
// StartExtensionUpgradeResponder handles the response to the StartExtensionUpgrade request. The method always
// closes the http.Response Body.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByClosing())
result.Response = resp
return
}
// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available // StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available
// Platform Image OS version. Instances which are already running the latest available OS version are not affected. // Platform Image OS version. Instances which are already running the latest available OS version are not affected.
// Parameters: // Parameters:
...@@ -207,7 +279,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer ...@@ -207,7 +279,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -92,7 +92,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C ...@@ -92,7 +92,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -167,7 +167,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte ...@@ -167,7 +167,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -242,7 +242,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, ...@@ -242,7 +242,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -319,7 +319,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context. ...@@ -319,7 +319,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -399,7 +399,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp ...@@ -399,7 +399,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
"platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain),
...@@ -467,7 +467,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res ...@@ -467,7 +467,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -534,7 +534,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context. ...@@ -534,7 +534,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context.
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -602,7 +602,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont ...@@ -602,7 +602,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -695,7 +695,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re ...@@ -695,7 +695,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -787,7 +787,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) ...@@ -787,7 +787,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context)
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -883,7 +883,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context ...@@ -883,7 +883,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -974,7 +974,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte ...@@ -974,7 +974,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1051,7 +1051,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context ...@@ -1051,7 +1051,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1127,7 +1127,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context ...@@ -1127,7 +1127,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1203,7 +1203,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, ...@@ -1203,7 +1203,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1280,7 +1280,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte ...@@ -1280,7 +1280,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1356,7 +1356,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, ...@@ -1356,7 +1356,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1432,7 +1432,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r ...@@ -1432,7 +1432,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1508,7 +1508,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, ...@@ -1508,7 +1508,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1588,7 +1588,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context. ...@@ -1588,7 +1588,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -72,7 +72,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con ...@@ -72,7 +72,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -144,7 +144,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context ...@@ -144,7 +144,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -222,7 +222,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r ...@@ -222,7 +222,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -291,7 +291,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex ...@@ -291,7 +291,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -362,7 +362,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, ...@@ -362,7 +362,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context,
"virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -461,7 +461,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con ...@@ -461,7 +461,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -534,7 +534,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte ...@@ -534,7 +534,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -606,7 +606,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte ...@@ -606,7 +606,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -678,7 +678,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex ...@@ -678,7 +678,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -751,7 +751,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con ...@@ -751,7 +751,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -823,7 +823,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex ...@@ -823,7 +823,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -902,7 +902,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con ...@@ -902,7 +902,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -977,7 +977,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, ...@@ -977,7 +977,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
...@@ -1071,7 +1071,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context ...@@ -1071,7 +1071,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
"vmScaleSetName": autorest.Encode("path", VMScaleSetName), "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -40,7 +40,8 @@ func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID stri ...@@ -40,7 +40,8 @@ func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID stri
return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)}
} }
// List lists all available virtual machine sizes for a subscription in a location. // List this API is deprecated. Use [Resources
// Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
// Parameters: // Parameters:
// location - the location upon which virtual-machine-sizes is queried. // location - the location upon which virtual-machine-sizes is queried.
func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) { func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) {
...@@ -78,7 +79,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati ...@@ -78,7 +79,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati
"subscriptionId": autorest.Encode("path", client.SubscriptionID), "subscriptionId": autorest.Encode("path", client.SubscriptionID),
} }
const APIVersion = "2018-04-01" const APIVersion = "2018-10-01"
queryParameters := map[string]interface{}{ queryParameters := map[string]interface{}{
"api-version": APIVersion, "api-version": APIVersion,
} }
......
...@@ -443,8 +443,10 @@ type ImportImageParameters struct { ...@@ -443,8 +443,10 @@ type ImportImageParameters struct {
type ImportSource struct { type ImportSource struct {
// ResourceID - The resource identifier of the source Azure Container Registry. // ResourceID - The resource identifier of the source Azure Container Registry.
ResourceID *string `json:"resourceId,omitempty"` ResourceID *string `json:"resourceId,omitempty"`
// RegistryURI - The address of the source registry. // RegistryURI - The address of the source registry (e.g. 'mcr.microsoft.com').
RegistryURI *string `json:"registryUri,omitempty"` RegistryURI *string `json:"registryUri,omitempty"`
// Credentials - Credentials used when importing from a registry uri.
Credentials *ImportSourceCredentials `json:"credentials,omitempty"`
// SourceImage - Repository name of the source image. // SourceImage - Repository name of the source image.
// Specify an image by repository ('hello-world'). This will use the 'latest' tag. // Specify an image by repository ('hello-world'). This will use the 'latest' tag.
// Specify an image by tag ('hello-world:latest'). // Specify an image by tag ('hello-world:latest').
...@@ -452,6 +454,14 @@ type ImportSource struct { ...@@ -452,6 +454,14 @@ type ImportSource struct {
SourceImage *string `json:"sourceImage,omitempty"` SourceImage *string `json:"sourceImage,omitempty"`
} }
// ImportSourceCredentials ...
type ImportSourceCredentials struct {
// Username - The username to authenticate with the source registry.
Username *string `json:"username,omitempty"`
// Password - The password used to authenticate with the source registry.
Password *string `json:"password,omitempty"`
}
// OperationDefinition the definition of a container registry operation. // OperationDefinition the definition of a container registry operation.
type OperationDefinition struct { type OperationDefinition struct {
// Origin - The origin information of the container registry operation. // Origin - The origin information of the container registry operation.
...@@ -822,6 +832,8 @@ type Registry struct { ...@@ -822,6 +832,8 @@ type Registry struct {
autorest.Response `json:"-"` autorest.Response `json:"-"`
// Sku - The SKU of the container registry. // Sku - The SKU of the container registry.
Sku *Sku `json:"sku,omitempty"` Sku *Sku `json:"sku,omitempty"`
// Identity - The identity of the container registry.
Identity *RegistryIdentity `json:"identity,omitempty"`
// RegistryProperties - The properties of the container registry. // RegistryProperties - The properties of the container registry.
*RegistryProperties `json:"properties,omitempty"` *RegistryProperties `json:"properties,omitempty"`
// ID - The resource ID. // ID - The resource ID.
...@@ -842,6 +854,9 @@ func (r Registry) MarshalJSON() ([]byte, error) { ...@@ -842,6 +854,9 @@ func (r Registry) MarshalJSON() ([]byte, error) {
if r.Sku != nil { if r.Sku != nil {
objectMap["sku"] = r.Sku objectMap["sku"] = r.Sku
} }
if r.Identity != nil {
objectMap["identity"] = r.Identity
}
if r.RegistryProperties != nil { if r.RegistryProperties != nil {
objectMap["properties"] = r.RegistryProperties objectMap["properties"] = r.RegistryProperties
} }
...@@ -881,6 +896,15 @@ func (r *Registry) UnmarshalJSON(body []byte) error { ...@@ -881,6 +896,15 @@ func (r *Registry) UnmarshalJSON(body []byte) error {
} }
r.Sku = &sku r.Sku = &sku
} }
case "identity":
if v != nil {
var identity RegistryIdentity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
r.Identity = &identity
}
case "properties": case "properties":
if v != nil { if v != nil {
var registryProperties RegistryProperties var registryProperties RegistryProperties
...@@ -941,6 +965,16 @@ func (r *Registry) UnmarshalJSON(body []byte) error { ...@@ -941,6 +965,16 @@ func (r *Registry) UnmarshalJSON(body []byte) error {
return nil return nil
} }
// RegistryIdentity the identity of the container registry.
type RegistryIdentity struct {
// Type - The type of identity used for the registry.
Type *string `json:"type,omitempty"`
// PrincipalID - The principal ID of registry identity.
PrincipalID *string `json:"principalId,omitempty"`
// TenantID - The tenant ID associated with the registry.
TenantID *string `json:"tenantId,omitempty"`
}
// RegistryListCredentialsResult the response from the ListCredentials operation. // RegistryListCredentialsResult the response from the ListCredentials operation.
type RegistryListCredentialsResult struct { type RegistryListCredentialsResult struct {
autorest.Response `json:"-"` autorest.Response `json:"-"`
...@@ -1118,6 +1152,8 @@ type RegistryUpdateParameters struct { ...@@ -1118,6 +1152,8 @@ type RegistryUpdateParameters struct {
Tags map[string]*string `json:"tags"` Tags map[string]*string `json:"tags"`
// Sku - The SKU of the container registry. // Sku - The SKU of the container registry.
Sku *Sku `json:"sku,omitempty"` Sku *Sku `json:"sku,omitempty"`
// Identity - The identity of the container registry.
Identity *RegistryIdentity `json:"identity,omitempty"`
// RegistryPropertiesUpdateParameters - The properties that the container registry will be updated with. // RegistryPropertiesUpdateParameters - The properties that the container registry will be updated with.
*RegistryPropertiesUpdateParameters `json:"properties,omitempty"` *RegistryPropertiesUpdateParameters `json:"properties,omitempty"`
} }
...@@ -1131,6 +1167,9 @@ func (rup RegistryUpdateParameters) MarshalJSON() ([]byte, error) { ...@@ -1131,6 +1167,9 @@ func (rup RegistryUpdateParameters) MarshalJSON() ([]byte, error) {
if rup.Sku != nil { if rup.Sku != nil {
objectMap["sku"] = rup.Sku objectMap["sku"] = rup.Sku
} }
if rup.Identity != nil {
objectMap["identity"] = rup.Identity
}
if rup.RegistryPropertiesUpdateParameters != nil { if rup.RegistryPropertiesUpdateParameters != nil {
objectMap["properties"] = rup.RegistryPropertiesUpdateParameters objectMap["properties"] = rup.RegistryPropertiesUpdateParameters
} }
...@@ -1164,6 +1203,15 @@ func (rup *RegistryUpdateParameters) UnmarshalJSON(body []byte) error { ...@@ -1164,6 +1203,15 @@ func (rup *RegistryUpdateParameters) UnmarshalJSON(body []byte) error {
} }
rup.Sku = &sku rup.Sku = &sku
} }
case "identity":
if v != nil {
var identity RegistryIdentity
err = json.Unmarshal(*v, &identity)
if err != nil {
return err
}
rup.Identity = &identity
}
case "properties": case "properties":
if v != nil { if v != nil {
var registryPropertiesUpdateParameters RegistryPropertiesUpdateParameters var registryPropertiesUpdateParameters RegistryPropertiesUpdateParameters
......
...@@ -372,7 +372,10 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam ...@@ -372,7 +372,10 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam
{Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}},
{TargetValue: parameters, {TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { Chain: []validation.Constraint{{Target: "parameters.Source.Credentials", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Source.Credentials.Password", Name: validation.Null, Rule: true, Chain: nil}}},
{Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil},
}}}}}); err != nil {
return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error()) return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error())
} }
......
...@@ -94,10 +94,6 @@ func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) ( ...@@ -94,10 +94,6 @@ func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -180,10 +176,6 @@ func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) ...@@ -180,10 +176,6 @@ func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -251,10 +243,6 @@ func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ...@@ -251,10 +243,6 @@ func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -850,10 +838,6 @@ func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future A ...@@ -850,10 +838,6 @@ func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future A
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -920,10 +904,6 @@ func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future Ap ...@@ -920,10 +904,6 @@ func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future Ap
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -993,10 +973,6 @@ func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (fut ...@@ -993,10 +973,6 @@ func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (fut
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Req ...@@ -92,10 +92,6 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Req
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (f ...@@ -163,10 +159,6 @@ func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (f
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -97,10 +97,6 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req * ...@@ -97,10 +97,6 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -170,10 +166,6 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Req ...@@ -170,10 +166,6 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Req
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -94,10 +94,6 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.R ...@@ -94,10 +94,6 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.R
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -167,10 +163,6 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) ...@@ -167,10 +163,6 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) ...@@ -92,10 +92,6 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ...@@ -163,10 +159,6 @@ func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -623,10 +615,6 @@ func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) ( ...@@ -623,10 +615,6 @@ func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -699,10 +687,6 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request ...@@ -699,10 +687,6 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -775,10 +759,6 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http. ...@@ -775,10 +759,6 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -849,10 +829,6 @@ func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (fu ...@@ -849,10 +829,6 @@ func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -114,10 +114,6 @@ func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (fut ...@@ -114,10 +114,6 @@ func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -187,10 +183,6 @@ func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future Inbo ...@@ -187,10 +183,6 @@ func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future Inbo
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future I ...@@ -92,10 +92,6 @@ func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future I
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client InterfacesClient) DeleteSender(req *http.Request) (future Interface ...@@ -163,10 +159,6 @@ func (client InterfacesClient) DeleteSender(req *http.Request) (future Interface
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -304,10 +296,6 @@ func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) ( ...@@ -304,10 +296,6 @@ func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -711,10 +699,6 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *htt ...@@ -711,10 +699,6 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *htt
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -1082,10 +1066,6 @@ func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future Inter ...@@ -1082,10 +1066,6 @@ func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future Inter
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (futur ...@@ -92,10 +92,6 @@ func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBa ...@@ -163,10 +159,6 @@ func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBa
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -490,10 +482,6 @@ func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future Lo ...@@ -490,10 +482,6 @@ func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future Lo
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -101,10 +101,6 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) ...@@ -101,10 +101,6 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -178,10 +174,6 @@ func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future ...@@ -178,10 +174,6 @@ func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -423,10 +415,6 @@ func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (fu ...@@ -423,10 +415,6 @@ func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -104,10 +104,6 @@ func (client PacketCapturesClient) CreateSender(req *http.Request) (future Packe ...@@ -104,10 +104,6 @@ func (client PacketCapturesClient) CreateSender(req *http.Request) (future Packe
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -177,10 +173,6 @@ func (client PacketCapturesClient) DeleteSender(req *http.Request) (future Packe ...@@ -177,10 +173,6 @@ func (client PacketCapturesClient) DeleteSender(req *http.Request) (future Packe
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -318,10 +310,6 @@ func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future Pa ...@@ -318,10 +310,6 @@ func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future Pa
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -458,10 +446,6 @@ func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketC ...@@ -458,10 +446,6 @@ func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketC
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -104,10 +104,6 @@ func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (f ...@@ -104,10 +104,6 @@ func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -175,10 +171,6 @@ func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future Pu ...@@ -175,10 +171,6 @@ func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future Pu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -779,10 +771,6 @@ func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (futur ...@@ -779,10 +771,6 @@ func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (futur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -104,10 +104,6 @@ func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (fu ...@@ -104,10 +104,6 @@ func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -177,10 +173,6 @@ func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future Rou ...@@ -177,10 +173,6 @@ func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future Rou
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -416,10 +408,6 @@ func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future Rou ...@@ -416,10 +408,6 @@ func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future Rou
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future ...@@ -92,10 +92,6 @@ func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFi ...@@ -163,10 +159,6 @@ func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFi
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -490,10 +482,6 @@ func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFi ...@@ -490,10 +482,6 @@ func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFi
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -94,10 +94,6 @@ func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future Route ...@@ -94,10 +94,6 @@ func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future Route
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -167,10 +163,6 @@ func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteF ...@@ -167,10 +163,6 @@ func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteF
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future ...@@ -92,10 +92,6 @@ func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTab ...@@ -163,10 +159,6 @@ func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTab
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -490,10 +482,6 @@ func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future Rout ...@@ -490,10 +482,6 @@ func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future Rout
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -92,10 +92,6 @@ func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (futu ...@@ -92,10 +92,6 @@ func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -163,10 +159,6 @@ func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future Secur ...@@ -163,10 +159,6 @@ func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future Secur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -490,10 +482,6 @@ func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future S ...@@ -490,10 +482,6 @@ func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future S
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -94,10 +94,6 @@ func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (futur ...@@ -94,10 +94,6 @@ func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -167,10 +163,6 @@ func (client SecurityRulesClient) DeleteSender(req *http.Request) (future Securi ...@@ -167,10 +163,6 @@ func (client SecurityRulesClient) DeleteSender(req *http.Request) (future Securi
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -94,10 +94,6 @@ func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future Subn ...@@ -94,10 +94,6 @@ func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future Subn
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -167,10 +163,6 @@ func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDelet ...@@ -167,10 +163,6 @@ func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDelet
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -107,10 +107,6 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *h ...@@ -107,10 +107,6 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *h
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -178,10 +174,6 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Requ ...@@ -178,10 +174,6 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Requ
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -492,10 +484,6 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *h ...@@ -492,10 +484,6 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *h
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -575,10 +563,6 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *htt ...@@ -575,10 +563,6 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *htt
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -649,10 +633,6 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http. ...@@ -649,10 +633,6 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -99,10 +99,6 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Reques ...@@ -99,10 +99,6 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Reques
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -170,10 +166,6 @@ func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (futu ...@@ -170,10 +166,6 @@ func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (futu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -244,10 +236,6 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *h ...@@ -244,10 +236,6 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *h
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -319,10 +307,6 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Re ...@@ -319,10 +307,6 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Re
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -460,10 +444,6 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.R ...@@ -460,10 +444,6 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.R
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -535,10 +515,6 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Requ ...@@ -535,10 +515,6 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Requ
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -607,10 +583,6 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Requ ...@@ -607,10 +583,6 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Requ
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -679,10 +651,6 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *ht ...@@ -679,10 +651,6 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *ht
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -943,10 +911,6 @@ func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (futur ...@@ -943,10 +911,6 @@ func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (futur
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -1084,10 +1048,6 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) ( ...@@ -1084,10 +1048,6 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -95,10 +95,6 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Reques ...@@ -95,10 +95,6 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Reques
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -168,10 +164,6 @@ func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (futu ...@@ -168,10 +164,6 @@ func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (futu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -163,10 +163,6 @@ func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (fut ...@@ -163,10 +163,6 @@ func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -234,10 +230,6 @@ func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future Virt ...@@ -234,10 +230,6 @@ func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future Virt
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -656,10 +648,6 @@ func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future ...@@ -656,10 +648,6 @@ func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -102,10 +102,6 @@ func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future ...@@ -102,10 +102,6 @@ func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -243,10 +239,6 @@ func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDel ...@@ -243,10 +239,6 @@ func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDel
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -393,10 +385,6 @@ func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) ...@@ -393,10 +385,6 @@ func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request)
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -473,10 +461,6 @@ func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future W ...@@ -473,10 +461,6 @@ func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future W
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -555,10 +539,6 @@ func (client WatchersClient) GetNextHopSender(req *http.Request) (future Watcher ...@@ -555,10 +539,6 @@ func (client WatchersClient) GetNextHopSender(req *http.Request) (future Watcher
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -715,10 +695,6 @@ func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future ...@@ -715,10 +695,6 @@ func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -795,10 +771,6 @@ func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) ( ...@@ -795,10 +771,6 @@ func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -875,10 +847,6 @@ func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future ...@@ -875,10 +847,6 @@ func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -1076,10 +1044,6 @@ func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (fu ...@@ -1076,10 +1044,6 @@ func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (fu
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -1160,10 +1124,6 @@ func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (f ...@@ -1160,10 +1124,6 @@ func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (f
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
...@@ -1314,10 +1274,6 @@ func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future Watch ...@@ -1314,10 +1274,6 @@ func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future Watch
if err != nil { if err != nil {
return return
} }
err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
if err != nil {
return
}
future.Future, err = azure.NewFutureFromResponse(resp) future.Future, err = azure.NewFutureFromResponse(resp)
return return
} }
......
...@@ -169,7 +169,7 @@ func (q *Queue) GetMetadata(options *QueueServiceOptions) error { ...@@ -169,7 +169,7 @@ func (q *Queue) GetMetadata(options *QueueServiceOptions) error {
params = addTimeout(params, options.Timeout) params = addTimeout(params, options.Timeout)
headers = mergeHeaders(headers, headersFromStruct(*options)) headers = mergeHeaders(headers, headersFromStruct(*options))
} }
uri := q.qsc.client.getEndpoint(queueServiceName, q.buildPath(), url.Values{"comp": {"metadata"}}) uri := q.qsc.client.getEndpoint(queueServiceName, q.buildPath(), params)
resp, err := q.qsc.client.exec(http.MethodGet, uri, headers, nil, q.qsc.auth) resp, err := q.qsc.client.exec(http.MethodGet, uri, headers, nil, q.qsc.auth)
if err != nil { if err != nil {
......
...@@ -18,4 +18,4 @@ package version ...@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK. // Number contains the semantic version of this SDK.
const Number = "v21.1.0" const Number = "v21.3.0"
...@@ -19,10 +19,6 @@ import ( ...@@ -19,10 +19,6 @@ import (
"net/url" "net/url"
) )
const (
activeDirectoryAPIVersion = "1.0"
)
// OAuthConfig represents the endpoints needed // OAuthConfig represents the endpoints needed
// in OAuth operations // in OAuth operations
type OAuthConfig struct { type OAuthConfig struct {
...@@ -46,11 +42,25 @@ func validateStringParam(param, name string) error { ...@@ -46,11 +42,25 @@ func validateStringParam(param, name string) error {
// NewOAuthConfig returns an OAuthConfig with tenant specific urls // NewOAuthConfig returns an OAuthConfig with tenant specific urls
func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, error) { func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, error) {
apiVer := "1.0"
return NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID, &apiVer)
}
// NewOAuthConfigWithAPIVersion returns an OAuthConfig with tenant specific urls.
// If apiVersion is not nil the "api-version" query parameter will be appended to the endpoint URLs with the specified value.
func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiVersion *string) (*OAuthConfig, error) {
if err := validateStringParam(activeDirectoryEndpoint, "activeDirectoryEndpoint"); err != nil { if err := validateStringParam(activeDirectoryEndpoint, "activeDirectoryEndpoint"); err != nil {
return nil, err return nil, err
} }
api := ""
// it's legal for tenantID to be empty so don't validate it // it's legal for tenantID to be empty so don't validate it
const activeDirectoryEndpointTemplate = "%s/oauth2/%s?api-version=%s" if apiVersion != nil {
if err := validateStringParam(*apiVersion, "apiVersion"); err != nil {
return nil, err
}
api = fmt.Sprintf("?api-version=%s", *apiVersion)
}
const activeDirectoryEndpointTemplate = "%s/oauth2/%s%s"
u, err := url.Parse(activeDirectoryEndpoint) u, err := url.Parse(activeDirectoryEndpoint)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -59,15 +69,15 @@ func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, err ...@@ -59,15 +69,15 @@ func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, err
if err != nil { if err != nil {
return nil, err return nil, err
} }
authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", activeDirectoryAPIVersion)) authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", api))
if err != nil { if err != nil {
return nil, err return nil, err
} }
tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", activeDirectoryAPIVersion)) tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", api))
if err != nil { if err != nil {
return nil, err return nil, err
} }
deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", activeDirectoryAPIVersion)) deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", api))
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -38,7 +38,7 @@ func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) { ...@@ -38,7 +38,7 @@ func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) {
return sf(r) return sf(r)
} }
// SendDecorator takes and possibily decorates, by wrapping, a Sender. Decorators may affect the // SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the
// http.Request and pass it along or, first, pass the http.Request along then react to the // http.Request and pass it along or, first, pass the http.Request along then react to the
// http.Response result. // http.Response result.
type SendDecorator func(Sender) Sender type SendDecorator func(Sender) Sender
......
...@@ -29,7 +29,6 @@ import ( ...@@ -29,7 +29,6 @@ import (
"net" "net"
"net/http" "net/http"
"net/url" "net/url"
"strconv"
"strings" "strings"
"sync" "sync"
"time" "time"
...@@ -97,18 +96,27 @@ type RefresherWithContext interface { ...@@ -97,18 +96,27 @@ type RefresherWithContext interface {
type TokenRefreshCallback func(Token) error type TokenRefreshCallback func(Token) error
// Token encapsulates the access token used to authorize Azure requests. // Token encapsulates the access token used to authorize Azure requests.
// https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response
type Token struct { type Token struct {
AccessToken string `json:"access_token"` AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"` RefreshToken string `json:"refresh_token"`
ExpiresIn string `json:"expires_in"` ExpiresIn json.Number `json:"expires_in"`
ExpiresOn string `json:"expires_on"` ExpiresOn json.Number `json:"expires_on"`
NotBefore string `json:"not_before"` NotBefore json.Number `json:"not_before"`
Resource string `json:"resource"` Resource string `json:"resource"`
Type string `json:"token_type"` Type string `json:"token_type"`
} }
func newToken() Token {
return Token{
ExpiresIn: "0",
ExpiresOn: "0",
NotBefore: "0",
}
}
// IsZero returns true if the token object is zero-initialized. // IsZero returns true if the token object is zero-initialized.
func (t Token) IsZero() bool { func (t Token) IsZero() bool {
return t == Token{} return t == Token{}
...@@ -116,12 +124,12 @@ func (t Token) IsZero() bool { ...@@ -116,12 +124,12 @@ func (t Token) IsZero() bool {
// Expires returns the time.Time when the Token expires. // Expires returns the time.Time when the Token expires.
func (t Token) Expires() time.Time { func (t Token) Expires() time.Time {
s, err := strconv.Atoi(t.ExpiresOn) s, err := t.ExpiresOn.Float64()
if err != nil { if err != nil {
s = -3600 s = -3600
} }
expiration := date.NewUnixTimeFromSeconds(float64(s)) expiration := date.NewUnixTimeFromSeconds(s)
return time.Time(expiration).UTC() return time.Time(expiration).UTC()
} }
...@@ -218,6 +226,8 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo ...@@ -218,6 +226,8 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo
token := jwt.New(jwt.SigningMethodRS256) token := jwt.New(jwt.SigningMethodRS256)
token.Header["x5t"] = thumbprint token.Header["x5t"] = thumbprint
x5c := []string{base64.StdEncoding.EncodeToString(secret.Certificate.Raw)}
token.Header["x5c"] = x5c
token.Claims = jwt.MapClaims{ token.Claims = jwt.MapClaims{
"aud": spt.inner.OauthConfig.TokenEndpoint.String(), "aud": spt.inner.OauthConfig.TokenEndpoint.String(),
"iss": spt.inner.ClientID, "iss": spt.inner.ClientID,
...@@ -414,6 +424,7 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso ...@@ -414,6 +424,7 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso
} }
spt := &ServicePrincipalToken{ spt := &ServicePrincipalToken{
inner: servicePrincipalToken{ inner: servicePrincipalToken{
Token: newToken(),
OauthConfig: oauthConfig, OauthConfig: oauthConfig,
Secret: secret, Secret: secret,
ClientID: id, ClientID: id,
...@@ -653,6 +664,7 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI ...@@ -653,6 +664,7 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
spt := &ServicePrincipalToken{ spt := &ServicePrincipalToken{
inner: servicePrincipalToken{ inner: servicePrincipalToken{
Token: newToken(),
OauthConfig: OAuthConfig{ OauthConfig: OAuthConfig{
TokenEndpoint: *msiEndpointURL, TokenEndpoint: *msiEndpointURL,
}, },
......
...@@ -168,8 +168,12 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e ...@@ -168,8 +168,12 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e
// polling duration has been exceeded. It will retry failed polling attempts based on // polling duration has been exceeded. It will retry failed polling attempts based on
// the retry value defined in the client up to the maximum retry attempts. // the retry value defined in the client up to the maximum retry attempts.
func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error { func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error {
ctx, cancel := context.WithTimeout(ctx, client.PollingDuration) if d := client.PollingDuration; d != 0 {
defer cancel() var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, d)
defer cancel()
}
done, err := f.Done(client) done, err := f.Done(client)
for attempts := 0; !done; done, err = f.Done(client) { for attempts := 0; !done; done, err = f.Done(client) {
if attempts >= client.RetryAttempts { if attempts >= client.RetryAttempts {
......
...@@ -140,8 +140,8 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError ...@@ -140,8 +140,8 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError
} }
// poll for registered provisioning state // poll for registered provisioning state
now := time.Now() registrationStartTime := time.Now()
for err == nil && time.Since(now) < client.PollingDuration { for err == nil && (client.PollingDuration == 0 || (client.PollingDuration != 0 && time.Since(registrationStartTime) < client.PollingDuration)) {
// taken from the resources SDK // taken from the resources SDK
// https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L45 // https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L45
preparer := autorest.CreatePreparer( preparer := autorest.CreatePreparer(
...@@ -183,7 +183,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError ...@@ -183,7 +183,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError
return originalReq.Context().Err() return originalReq.Context().Err()
} }
} }
if !(time.Since(now) < client.PollingDuration) { if client.PollingDuration != 0 && !(time.Since(registrationStartTime) < client.PollingDuration) {
return errors.New("polling for resource provider registration has exceeded the polling duration") return errors.New("polling for resource provider registration has exceeded the polling duration")
} }
return err return err
......
...@@ -147,6 +147,7 @@ type Client struct { ...@@ -147,6 +147,7 @@ type Client struct {
PollingDelay time.Duration PollingDelay time.Duration
// PollingDuration sets the maximum polling time after which an error is returned. // PollingDuration sets the maximum polling time after which an error is returned.
// Setting this to zero will use the provided context to control the duration.
PollingDuration time.Duration PollingDuration time.Duration
// RetryAttempts sets the default number of retry attempts for client. // RetryAttempts sets the default number of retry attempts for client.
......
...@@ -234,7 +234,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se ...@@ -234,7 +234,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se
} }
delayed := DelayWithRetryAfter(resp, r.Context().Done()) delayed := DelayWithRetryAfter(resp, r.Context().Done())
if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) { if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) {
return nil, r.Context().Err() return resp, r.Context().Err()
} }
// don't count a 429 against the number of attempts // don't count a 429 against the number of attempts
// so that we continue to retry until it succeeds // so that we continue to retry until it succeeds
......
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
) )
// Number contains the semantic version of this SDK. // Number contains the semantic version of this SDK.
const Number = "v10.15.4" const Number = "v11.1.0"
var ( var (
userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s",
......
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