diff --git a/profiles/preview/compute/mgmt/compute/models.go b/profiles/preview/compute/mgmt/compute/models.go
index 755a7865edf6..d579d3e566cb 100644
--- a/profiles/preview/compute/mgmt/compute/models.go
+++ b/profiles/preview/compute/mgmt/compute/models.go
@@ -584,6 +584,7 @@ type APIEntityReference = original.APIEntityReference
type APIError = original.APIError
type APIErrorBase = original.APIErrorBase
type AutomaticOSUpgradePolicy = original.AutomaticOSUpgradePolicy
+type AutomaticOSUpgradeProperties = original.AutomaticOSUpgradeProperties
type AvailabilitySet = original.AvailabilitySet
type AvailabilitySetListResult = original.AvailabilitySetListResult
type AvailabilitySetListResultIterator = original.AvailabilitySetListResultIterator
diff --git a/services/compute/mgmt/2015-06-15/compute/models.go b/services/compute/mgmt/2015-06-15/compute/models.go
index cc82e6996401..34bcc70c8d9f 100644
--- a/services/compute/mgmt/2015-06-15/compute/models.go
+++ b/services/compute/mgmt/2015-06-15/compute/models.go
@@ -581,9 +581,8 @@ type AvailabilitySetProperties struct {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -625,7 +624,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -1924,7 +1923,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -3291,7 +3290,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
index 9eb03a66949a..b6eaa19d37e2 100644
--- a/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2015-06-15/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -316,10 +308,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachines.go b/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
index 22d818240e9c..41ffadbefeae 100644
--- a/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
+++ b/services/compute/mgmt/2015-06-15/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -199,10 +195,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -271,10 +263,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -342,10 +330,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -804,10 +788,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -875,10 +855,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -946,10 +922,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1017,10 +989,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
index aacbeca5dc6e..75b5f75a6bc1 100644
--- a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesets.go
@@ -106,10 +106,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,10 +180,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -255,10 +247,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,10 +323,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -828,10 +812,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -899,10 +879,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -976,10 +952,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1053,10 +1025,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1133,10 +1101,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
index e6d22730374e..0b971aff6d44 100644
--- a/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2015-06-15/compute/virtualmachinescalesetvms.go
@@ -93,10 +93,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,10 +477,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -558,10 +546,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -631,10 +615,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -704,10 +684,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
diff --git a/services/compute/mgmt/2016-03-30/compute/models.go b/services/compute/mgmt/2016-03-30/compute/models.go
index 5aa08604fe54..68fd2c07d9cf 100644
--- a/services/compute/mgmt/2016-03-30/compute/models.go
+++ b/services/compute/mgmt/2016-03-30/compute/models.go
@@ -616,9 +616,8 @@ type AvailabilitySetProperties struct {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -660,7 +659,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -1990,7 +1989,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -3385,7 +3384,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
index 1fa2bde7316e..d6aa61151e20 100644
--- a/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2016-03-30/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -316,10 +308,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachines.go b/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
index 959f1d41b049..3745d749ad9b 100644
--- a/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
+++ b/services/compute/mgmt/2016-03-30/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -199,10 +195,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -271,10 +263,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -342,10 +330,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -875,10 +859,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -946,10 +926,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1017,10 +993,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1088,10 +1060,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
index 64fc56c9909c..e725c94e375a 100644
--- a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesets.go
@@ -106,10 +106,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -184,10 +180,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -255,10 +247,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,10 +323,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -828,10 +812,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -899,10 +879,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -976,10 +952,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1053,10 +1025,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1133,10 +1101,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
index d9f4c743afbc..35a1905cbad0 100644
--- a/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2016-03-30/compute/virtualmachinescalesetvms.go
@@ -93,10 +93,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,10 +477,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -558,10 +546,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -631,10 +615,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -704,10 +684,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/disks.go b/services/compute/mgmt/2017-03-30/compute/disks.go
index 5063cb96b237..d805817a2da4 100644
--- a/services/compute/mgmt/2017-03-30/compute/disks.go
+++ b/services/compute/mgmt/2017-03-30/compute/disks.go
@@ -116,10 +116,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
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
}
@@ -189,10 +185,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,10 +332,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
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
}
@@ -596,10 +584,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
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
}
@@ -672,10 +656,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/images.go b/services/compute/mgmt/2017-03-30/compute/images.go
index 9ce8f99daf14..7332a198e68a 100644
--- a/services/compute/mgmt/2017-03-30/compute/images.go
+++ b/services/compute/mgmt/2017-03-30/compute/images.go
@@ -102,10 +102,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,10 +169,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-03-30/compute/models.go b/services/compute/mgmt/2017-03-30/compute/models.go
index 4d9c23e2f011..2113146763c9 100644
--- a/services/compute/mgmt/2017-03-30/compute/models.go
+++ b/services/compute/mgmt/2017-03-30/compute/models.go
@@ -964,9 +964,8 @@ type AvailabilitySetProperties struct {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1024,7 +1023,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -1693,7 +1692,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -4355,7 +4354,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -6573,7 +6572,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2017-03-30/compute/snapshots.go b/services/compute/mgmt/2017-03-30/compute/snapshots.go
index fb6a1dd4d17b..720cf9bce6de 100644
--- a/services/compute/mgmt/2017-03-30/compute/snapshots.go
+++ b/services/compute/mgmt/2017-03-30/compute/snapshots.go
@@ -115,10 +115,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
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
}
@@ -187,10 +183,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -336,10 +328,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
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
}
@@ -591,10 +579,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
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
}
@@ -666,10 +650,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
index 706fa9d669cb..206a10b44ffa 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -316,10 +308,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachines.go b/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
index 12e8541217b1..7c19d55c6f27 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -269,10 +261,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -341,10 +329,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -412,10 +396,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -961,6 +941,105 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-30"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -1011,10 +1090,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
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
}
@@ -1083,10 +1158,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1154,10 +1225,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1225,10 +1292,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1305,10 +1368,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
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
}
@@ -1376,10 +1435,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
index f6008c53ca70..3a27276a1425 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
index 2345784e9df6..c806a15c0cbc 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
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
}
@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
index 6db4ac8bd132..57a39513c1af 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
@@ -116,10 +116,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,10 +190,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -265,10 +257,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -345,10 +333,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -838,10 +822,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -915,10 +895,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -993,10 +969,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1070,10 +1042,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1147,10 +1115,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1221,10 +1185,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1301,10 +1261,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
index 85ed4920fc05..0a3ec1568edc 100644
--- a/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
@@ -93,10 +93,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,10 +477,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -558,10 +546,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -632,10 +616,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -705,10 +685,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -778,10 +754,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
diff --git a/services/compute/mgmt/2017-12-01/compute/images.go b/services/compute/mgmt/2017-12-01/compute/images.go
index d50a784b7da0..ae57535f59d9 100644
--- a/services/compute/mgmt/2017-12-01/compute/images.go
+++ b/services/compute/mgmt/2017-12-01/compute/images.go
@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -492,10 +484,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-12-01/compute/loganalytics.go b/services/compute/mgmt/2017-12-01/compute/loganalytics.go
index a309e61abec1..7d55c9ee3bdb 100644
--- a/services/compute/mgmt/2017-12-01/compute/loganalytics.go
+++ b/services/compute/mgmt/2017-12-01/compute/loganalytics.go
@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
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
}
@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
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
}
diff --git a/services/compute/mgmt/2017-12-01/compute/models.go b/services/compute/mgmt/2017-12-01/compute/models.go
index 0d812a6bd76b..e9fd9ef8ede9 100644
--- a/services/compute/mgmt/2017-12-01/compute/models.go
+++ b/services/compute/mgmt/2017-12-01/compute/models.go
@@ -1100,9 +1100,8 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1148,7 +1147,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -3669,7 +3668,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -6067,7 +6066,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go
index 8c5d964fe4d3..cfe51608a76b 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -316,10 +308,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachines.go b/services/compute/mgmt/2017-12-01/compute/virtualmachines.go
index ab823432117a..af8c138e772c 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachines.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -269,10 +261,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -341,10 +329,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -412,10 +396,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -961,6 +941,105 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -1011,10 +1090,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
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
}
@@ -1083,10 +1158,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1154,10 +1225,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1225,10 +1292,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1305,10 +1368,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
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
}
@@ -1376,10 +1435,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
@@ -1450,10 +1505,6 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go
index 4ebd68c00fef..8983f5ed40c8 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetextensions.go
@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go
index aa23ddb933e2..e4030d589e2e 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
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
}
@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
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
}
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go
index 1fd7bd6d079d..5115ba4c9dbc 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesets.go
@@ -116,10 +116,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,10 +190,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -265,10 +257,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -345,10 +333,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -1004,10 +988,6 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
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
}
@@ -1082,10 +1062,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -1159,10 +1135,6 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
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
}
@@ -1236,10 +1208,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -1314,10 +1282,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1391,10 +1355,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1468,10 +1428,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1542,10 +1498,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1622,10 +1574,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go
index e8ec06789100..5507b9e382bf 100644
--- a/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2017-12-01/compute/virtualmachinescalesetvms.go
@@ -94,10 +94,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -167,10 +163,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,10 +477,6 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
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
}
@@ -559,10 +547,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -632,10 +616,6 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
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
}
@@ -705,10 +685,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -779,10 +755,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -852,10 +824,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -925,10 +893,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
@@ -1022,10 +986,6 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/disks.go b/services/compute/mgmt/2018-04-01/compute/disks.go
index cdc570377d01..bf081faabec0 100644
--- a/services/compute/mgmt/2018-04-01/compute/disks.go
+++ b/services/compute/mgmt/2018-04-01/compute/disks.go
@@ -116,10 +116,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
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
}
@@ -189,10 +185,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -339,10 +331,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
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
}
@@ -595,10 +583,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
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
}
@@ -670,10 +654,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/images.go b/services/compute/mgmt/2018-04-01/compute/images.go
index f468d6fd0c3f..7f9f9cafcdf8 100644
--- a/services/compute/mgmt/2018-04-01/compute/images.go
+++ b/services/compute/mgmt/2018-04-01/compute/images.go
@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-04-01/compute/loganalytics.go b/services/compute/mgmt/2018-04-01/compute/loganalytics.go
index e958f84b1003..55fa5d147bfa 100644
--- a/services/compute/mgmt/2018-04-01/compute/loganalytics.go
+++ b/services/compute/mgmt/2018-04-01/compute/loganalytics.go
@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
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
}
@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/models.go b/services/compute/mgmt/2018-04-01/compute/models.go
index cc4bc867323b..6dcab6ace67f 100644
--- a/services/compute/mgmt/2018-04-01/compute/models.go
+++ b/services/compute/mgmt/2018-04-01/compute/models.go
@@ -1164,9 +1164,8 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1180,6 +1179,8 @@ type BootDiagnosticsInstanceView struct {
ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
// SerialConsoleLogBlobURI - The Linux serial console log blob Uri.
SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
}
// CreationData data used when creating a disk.
@@ -1226,7 +1227,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -1883,7 +1884,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -4522,7 +4523,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -6864,7 +6865,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2018-04-01/compute/snapshots.go b/services/compute/mgmt/2018-04-01/compute/snapshots.go
index b87359354942..310b1631912a 100644
--- a/services/compute/mgmt/2018-04-01/compute/snapshots.go
+++ b/services/compute/mgmt/2018-04-01/compute/snapshots.go
@@ -115,10 +115,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
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
}
@@ -187,10 +183,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,10 +327,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
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
}
@@ -590,10 +578,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
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
}
@@ -664,10 +648,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
index 06673a73d63e..d9f65c8972f2 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -386,10 +378,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachines.go b/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
index 40a6166a1f34..039375021238 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -268,10 +260,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,10 +328,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -410,10 +394,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -886,6 +866,105 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -936,10 +1015,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
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
}
@@ -1007,10 +1082,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1077,10 +1148,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1147,10 +1214,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1226,10 +1289,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
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
}
@@ -1297,10 +1356,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
@@ -1370,10 +1425,6 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
index c2f1187f8596..e46c17de78d2 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetextensions.go
@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
index 381cb0cb6327..28e301cc0e79 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
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
}
@@ -229,10 +225,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
index ef73c1417756..ef1516f45fed 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesets.go
@@ -116,10 +116,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,10 +190,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -264,10 +256,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -343,10 +331,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -1001,10 +985,6 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
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
}
@@ -1078,10 +1058,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -1154,10 +1130,6 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
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
}
@@ -1230,10 +1202,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -1307,10 +1275,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1383,10 +1347,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1459,10 +1419,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1532,10 +1488,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1612,10 +1564,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
index a068ec453f0e..df7f0991765f 100644
--- a/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2018-04-01/compute/virtualmachinescalesetvms.go
@@ -94,10 +94,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -483,10 +475,6 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
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
}
@@ -556,10 +544,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -628,10 +612,6 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
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
}
@@ -700,10 +680,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -773,10 +749,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -845,10 +817,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -926,10 +894,6 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
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
}
@@ -999,10 +963,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
@@ -1095,10 +1055,6 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/containerservices.go b/services/compute/mgmt/2018-06-01/compute/containerservices.go
index b16788bfa558..f29e552d6653 100644
--- a/services/compute/mgmt/2018-06-01/compute/containerservices.go
+++ b/services/compute/mgmt/2018-06-01/compute/containerservices.go
@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/disks.go b/services/compute/mgmt/2018-06-01/compute/disks.go
index 9cbbd79fd6fc..1e49f6d9c0f1 100644
--- a/services/compute/mgmt/2018-06-01/compute/disks.go
+++ b/services/compute/mgmt/2018-06-01/compute/disks.go
@@ -116,10 +116,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
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
}
@@ -189,10 +185,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -339,10 +331,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
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
}
@@ -595,10 +583,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
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
}
@@ -670,10 +654,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/galleries.go b/services/compute/mgmt/2018-06-01/compute/galleries.go
index bc550686859f..9ecd3185b6ee 100644
--- a/services/compute/mgmt/2018-06-01/compute/galleries.go
+++ b/services/compute/mgmt/2018-06-01/compute/galleries.go
@@ -93,10 +93,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -164,10 +160,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/galleryimages.go b/services/compute/mgmt/2018-06-01/compute/galleryimages.go
index 670ea7ee29a3..93aeb4d15d86 100644
--- a/services/compute/mgmt/2018-06-01/compute/galleryimages.go
+++ b/services/compute/mgmt/2018-06-01/compute/galleryimages.go
@@ -109,10 +109,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,10 +178,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go b/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
index d179443ade51..46e918683733 100644
--- a/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
+++ b/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
@@ -106,10 +106,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,10 +177,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/images.go b/services/compute/mgmt/2018-06-01/compute/images.go
index 9284cace06c0..fc8c7f9dde6a 100644
--- a/services/compute/mgmt/2018-06-01/compute/images.go
+++ b/services/compute/mgmt/2018-06-01/compute/images.go
@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/loganalytics.go b/services/compute/mgmt/2018-06-01/compute/loganalytics.go
index 6d41e89c385e..9ac3eb6a7470 100644
--- a/services/compute/mgmt/2018-06-01/compute/loganalytics.go
+++ b/services/compute/mgmt/2018-06-01/compute/loganalytics.go
@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
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
}
@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/models.go b/services/compute/mgmt/2018-06-01/compute/models.go
index 8050ddc95949..4de180ff2940 100644
--- a/services/compute/mgmt/2018-06-01/compute/models.go
+++ b/services/compute/mgmt/2018-06-01/compute/models.go
@@ -1527,9 +1527,8 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1543,6 +1542,8 @@ type BootDiagnosticsInstanceView struct {
ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
// SerialConsoleLogBlobURI - The Linux serial console log blob Uri.
SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
}
// CloudError an error response from the Gallery service.
@@ -1966,7 +1967,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -3549,7 +3550,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -6136,6 +6137,8 @@ type VirtualMachineExtensionProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
// InstanceView - The virtual machine extension instance view.
InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
@@ -6294,6 +6297,8 @@ type VirtualMachineExtensionUpdateProperties struct {
Settings interface{} `json:"settings,omitempty"`
// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineHealthStatus the health status of the VM.
@@ -6495,7 +6500,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -7006,6 +7011,8 @@ type VirtualMachineScaleSetExtensionProperties struct {
ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
@@ -8896,7 +8903,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2018-06-01/compute/snapshots.go b/services/compute/mgmt/2018-06-01/compute/snapshots.go
index 89e57104c4f3..63f7f867aa44 100644
--- a/services/compute/mgmt/2018-06-01/compute/snapshots.go
+++ b/services/compute/mgmt/2018-06-01/compute/snapshots.go
@@ -115,10 +115,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
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
}
@@ -187,10 +183,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,10 +327,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
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
}
@@ -590,10 +578,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
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
}
@@ -664,10 +648,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
index 1e3dfc07e628..256c87902615 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -386,10 +378,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachines.go b/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
index 80c60d89cb72..0ae67b8f6f0e 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -268,10 +260,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,10 +328,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -410,10 +394,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -886,6 +866,105 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -936,10 +1015,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
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
}
@@ -1007,10 +1082,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1077,10 +1148,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1147,10 +1214,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1226,10 +1289,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
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
}
@@ -1297,10 +1356,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
@@ -1370,10 +1425,6 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
index e2cd495962e5..9189718c405c 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
index c1d1b626f90c..e91135cda63c 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
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
}
@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
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
}
@@ -301,10 +293,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
index 69a16b80c756..36cfd3000a24 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
@@ -116,10 +116,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,10 +190,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -264,10 +256,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -343,10 +331,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -1001,10 +985,6 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
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
}
@@ -1078,10 +1058,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -1154,10 +1130,6 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
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
}
@@ -1230,10 +1202,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -1307,10 +1275,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1383,10 +1347,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1459,10 +1419,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1532,10 +1488,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1612,10 +1564,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
index 1b8d1d58ddb9..946d801ede54 100644
--- a/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
@@ -94,10 +94,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -483,10 +475,6 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
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
}
@@ -556,10 +544,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -628,10 +612,6 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
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
}
@@ -700,10 +680,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -773,10 +749,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -845,10 +817,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -926,10 +894,6 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
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
}
@@ -999,10 +963,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
@@ -1095,10 +1055,6 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/containerservices.go b/services/compute/mgmt/2018-10-01/compute/containerservices.go
index b16788bfa558..f29e552d6653 100644
--- a/services/compute/mgmt/2018-10-01/compute/containerservices.go
+++ b/services/compute/mgmt/2018-10-01/compute/containerservices.go
@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/disks.go b/services/compute/mgmt/2018-10-01/compute/disks.go
index 9cbbd79fd6fc..1e49f6d9c0f1 100644
--- a/services/compute/mgmt/2018-10-01/compute/disks.go
+++ b/services/compute/mgmt/2018-10-01/compute/disks.go
@@ -116,10 +116,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
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
}
@@ -189,10 +185,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -339,10 +331,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
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
}
@@ -595,10 +583,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
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
}
@@ -670,10 +654,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/galleries.go b/services/compute/mgmt/2018-10-01/compute/galleries.go
index bc550686859f..9ecd3185b6ee 100644
--- a/services/compute/mgmt/2018-10-01/compute/galleries.go
+++ b/services/compute/mgmt/2018-10-01/compute/galleries.go
@@ -93,10 +93,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -164,10 +160,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/galleryimages.go b/services/compute/mgmt/2018-10-01/compute/galleryimages.go
index 670ea7ee29a3..93aeb4d15d86 100644
--- a/services/compute/mgmt/2018-10-01/compute/galleryimages.go
+++ b/services/compute/mgmt/2018-10-01/compute/galleryimages.go
@@ -109,10 +109,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,10 +178,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go b/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
index d179443ade51..46e918683733 100644
--- a/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
+++ b/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
@@ -106,10 +106,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -181,10 +177,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/images.go b/services/compute/mgmt/2018-10-01/compute/images.go
index 2afe53551f0b..d0184639fb85 100644
--- a/services/compute/mgmt/2018-10-01/compute/images.go
+++ b/services/compute/mgmt/2018-10-01/compute/images.go
@@ -92,10 +92,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -163,10 +159,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -491,10 +483,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/loganalytics.go b/services/compute/mgmt/2018-10-01/compute/loganalytics.go
index f72c02202e3c..746bf860c6fd 100644
--- a/services/compute/mgmt/2018-10-01/compute/loganalytics.go
+++ b/services/compute/mgmt/2018-10-01/compute/loganalytics.go
@@ -98,10 +98,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
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
}
@@ -177,10 +173,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/models.go b/services/compute/mgmt/2018-10-01/compute/models.go
index 6499e4d052a3..df7769718ece 100644
--- a/services/compute/mgmt/2018-10-01/compute/models.go
+++ b/services/compute/mgmt/2018-10-01/compute/models.go
@@ -1217,6 +1217,12 @@ type AutomaticOSUpgradePolicy struct {
DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
}
+// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
+type AutomaticOSUpgradeProperties struct {
+ // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
+ AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
+}
+
// AvailabilitySet specifies information about the availability set that the virtual machine should be assigned to.
// Virtual machines specified in the same availability set are allocated to different nodes to maximize
// availability. For more information about availability sets, see [Manage the availability of virtual
@@ -1529,9 +1535,8 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1545,6 +1550,8 @@ type BootDiagnosticsInstanceView struct {
ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
// SerialConsoleLogBlobURI - The Linux serial console log blob Uri.
SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
}
// CloudError an error response from the Gallery service.
@@ -1968,7 +1975,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -3551,7 +3558,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -6136,6 +6143,8 @@ type VirtualMachineExtensionProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
// InstanceView - The virtual machine extension instance view.
InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
@@ -6294,6 +6303,8 @@ type VirtualMachineExtensionUpdateProperties struct {
Settings interface{} `json:"settings,omitempty"`
// ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineHealthStatus the health status of the VM.
@@ -6437,9 +6448,10 @@ func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
type VirtualMachineImageProperties struct {
- Plan *PurchasePlan `json:"plan,omitempty"`
- OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"`
- DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"`
+ Plan *PurchasePlan `json:"plan,omitempty"`
+ OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"`
+ DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"`
+ AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
}
// VirtualMachineImageResource virtual machine image resource information.
@@ -6495,7 +6507,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -7006,6 +7018,8 @@ type VirtualMachineScaleSetExtensionProperties struct {
ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
@@ -8896,7 +8910,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/compute/mgmt/2018-10-01/compute/snapshots.go b/services/compute/mgmt/2018-10-01/compute/snapshots.go
index 89e57104c4f3..63f7f867aa44 100644
--- a/services/compute/mgmt/2018-10-01/compute/snapshots.go
+++ b/services/compute/mgmt/2018-10-01/compute/snapshots.go
@@ -115,10 +115,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
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
}
@@ -187,10 +183,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -335,10 +327,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
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
}
@@ -590,10 +578,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
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
}
@@ -664,10 +648,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
index 6bfd80ac3a17..a4718e702016 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -386,10 +378,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachines.go b/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
index e8149617e6e9..c48a8c71f14d 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -268,10 +260,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,10 +328,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -410,10 +394,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -886,6 +866,105 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer()
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -936,10 +1015,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
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
}
@@ -1007,10 +1082,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1077,10 +1148,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1147,10 +1214,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1226,10 +1289,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
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
}
@@ -1297,10 +1356,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
@@ -1370,10 +1425,6 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
index 43e443249b7e..21ec86186f9e 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
@@ -95,10 +95,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -168,10 +164,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
index ca98956cfd04..458a9251621b 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -91,10 +91,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
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
}
@@ -230,10 +226,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
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
}
@@ -301,10 +293,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
index f78d824fdfef..6486ff151d02 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
@@ -116,10 +116,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,10 +190,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -264,10 +256,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -343,10 +331,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -1001,10 +985,6 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
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
}
@@ -1078,10 +1058,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -1154,10 +1130,6 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
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
}
@@ -1230,10 +1202,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -1307,10 +1275,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1383,10 +1347,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1459,10 +1419,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1532,10 +1488,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1612,10 +1564,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
index 2742fe91126e..1304afcaab37 100644
--- a/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
+++ b/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
@@ -94,10 +94,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -483,10 +475,6 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
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
}
@@ -556,10 +544,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -628,10 +612,6 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
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
}
@@ -700,10 +680,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -773,10 +749,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -845,10 +817,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -926,10 +894,6 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
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
}
@@ -999,10 +963,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
@@ -1095,10 +1055,6 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
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
}
diff --git a/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go b/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
index f536f0a74648..31dba555f4c0 100644
--- a/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
+++ b/services/containerservice/mgmt/2016-03-30/containerservice/containerservices.go
@@ -117,10 +117,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -191,10 +187,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go b/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
index 9c85974cf374..0eda5265272e 100644
--- a/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
+++ b/services/containerservice/mgmt/2016-09-30/containerservice/containerservices.go
@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go b/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
index 88d0e3c8533f..b4b48cc7f0dc 100644
--- a/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
+++ b/services/containerservice/mgmt/2017-01-31/containerservice/containerservices.go
@@ -125,10 +125,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -199,10 +195,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
index 786631ccefc9..7eafe929e981 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/disks.go
@@ -116,10 +116,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
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
}
@@ -189,10 +185,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -340,10 +332,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
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
}
@@ -596,10 +584,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
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
}
@@ -672,10 +656,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
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
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
index dd9b89989476..e0cf1322f329 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/images.go
@@ -102,10 +102,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -173,10 +169,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
index 1b8102bfc334..a9c9f7791f02 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/models.go
@@ -785,9 +785,8 @@ type AvailabilitySetProperties struct {
}
// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// to diagnose VM status.
You can easily view the output of your console log.
Azure also enables
+// you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -845,7 +844,7 @@ type DataDiskImage struct {
// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
@@ -1456,7 +1455,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -3420,7 +3419,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -4886,7 +4885,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
index 1d8e0c573a77..671ba41e6783 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/snapshots.go
@@ -114,10 +114,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
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
}
@@ -185,10 +181,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -332,10 +324,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
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
}
@@ -586,10 +574,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
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
}
@@ -660,10 +644,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
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
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
index 4c890b8e46b5..a22f2eba6966 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachineextensions.go
@@ -94,10 +94,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -167,10 +163,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -316,10 +308,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
index 35a73d10760d..3ec7c806ccb5 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachines.go
@@ -102,10 +102,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
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
}
@@ -174,10 +170,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
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
}
@@ -269,10 +261,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -341,10 +329,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
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
}
@@ -412,10 +396,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -945,10 +925,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
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
}
@@ -1016,10 +992,6 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
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
}
@@ -1087,10 +1059,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
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
}
@@ -1158,10 +1126,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
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
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
index 5cd584500224..d470efa30842 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesets.go
@@ -93,10 +93,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -171,10 +167,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
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
}
@@ -242,10 +234,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -322,10 +310,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
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
}
@@ -815,10 +799,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
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
}
@@ -886,10 +866,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
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
}
@@ -958,10 +934,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
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
}
@@ -1035,10 +1007,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
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
}
@@ -1112,10 +1080,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
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
}
@@ -1192,10 +1156,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
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
}
diff --git a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
index 8992cd0770d9..31fb014bdb30 100644
--- a/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
+++ b/services/preview/compute/mgmt/2016-04-30-preview/compute/virtualmachinescalesetvms.go
@@ -93,10 +93,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
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
}
@@ -166,10 +162,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -485,10 +477,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
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
}
@@ -558,10 +546,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
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
}
@@ -632,10 +616,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
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
}
@@ -705,10 +685,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
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
}
@@ -778,10 +754,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
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
}
diff --git a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
index 29d7a799b71b..446e6ff2466c 100644
--- a/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
+++ b/services/preview/containerservice/mgmt/2015-11-01-preview/containerservice/containerservice.go
@@ -111,10 +111,6 @@ func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -182,10 +178,6 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}