From 1b4d803429e310d3b5e709e983cda34d3a0a7e33 Mon Sep 17 00:00:00 2001 From: yupwei68 Date: Sun, 27 Sep 2020 10:13:13 +0800 Subject: [PATCH] upgrade sdk --- go.mod | 2 +- go.sum | 4 +- .../2020-06-01/compute/dedicatedhostgroups.go | 4 +- .../mgmt/2020-06-01/compute/dedicatedhosts.go | 4 +- .../compute/mgmt/2020-06-01/compute/enums.go | 21 ++++ .../compute/mgmt/2020-06-01/compute/models.go | 66 +++++++++++- .../2020-06-01/compute/virtualmachines.go | 3 +- .../compute/virtualmachinescalesetvms.go | 3 +- .../mgmt/2019-06-01-preview/synapse/enums.go | 6 +- .../synapse/integrationruntimes.go | 56 +++++----- .../mgmt/2019-06-01-preview/synapse/models.go | 100 ++++++++++++++---- .../Azure/azure-sdk-for-go/version/version.go | 2 +- vendor/modules.txt | 2 +- 13 files changed, 207 insertions(+), 66 deletions(-) diff --git a/go.mod b/go.mod index 2e3ab1827518..0a7306e25b91 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-azurerm require ( - github.com/Azure/azure-sdk-for-go v46.1.0+incompatible + github.com/Azure/azure-sdk-for-go v46.4.0+incompatible github.com/Azure/go-autorest/autorest v0.10.0 github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 // indirect github.com/Azure/go-autorest/autorest/date v0.2.0 diff --git a/go.sum b/go.sum index 7bdd3b2fff5c..67e9c8f0d4fb 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,8 @@ github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.1.0+incompatible h1:ZNliGuvGKIHedRdz8W9BTMSrxBv9Nzz5BjeobotQTAI= github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v46.1.0+incompatible h1:e9xxveqrMFRJgj44gychg6jYGfZbwwKhW4wGq9LEG8Q= -github.com/Azure/azure-sdk-for-go v46.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v46.4.0+incompatible h1:fCN6Pi+tEiEwFa8RSmtVlFHRXEZ+DJm9gfx/MKqYWw4= +github.com/Azure/azure-sdk-for-go v46.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go index e93444346414..a0a205bcdee5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhostgroups.go @@ -64,9 +64,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMaximum, Rule: int64(3), Chain: nil}, - {Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error()) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go index 12ccd33f85a4..6a2146a7b8bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/dedicatedhosts.go @@ -63,9 +63,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMaximum, Rule: int64(2), Chain: nil}, - {Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error()) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/enums.go index 3f698a23cbc0..558aade42519 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/enums.go @@ -843,6 +843,27 @@ func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType { return []ProximityPlacementGroupType{Standard, Ultra} } +// RebootStatus enumerates the values for reboot status. +type RebootStatus string + +const ( + // RebootStatusCompleted ... + RebootStatusCompleted RebootStatus = "Completed" + // RebootStatusFailed ... + RebootStatusFailed RebootStatus = "Failed" + // RebootStatusNotNeeded ... + RebootStatusNotNeeded RebootStatus = "NotNeeded" + // RebootStatusRequired ... + RebootStatusRequired RebootStatus = "Required" + // RebootStatusStarted ... + RebootStatusStarted RebootStatus = "Started" +) + +// PossibleRebootStatusValues returns an array of possible values for the RebootStatus const type. +func PossibleRebootStatusValues() []RebootStatus { + return []RebootStatus{RebootStatusCompleted, RebootStatusFailed, RebootStatusNotNeeded, RebootStatusRequired, RebootStatusStarted} +} + // ReplicationState enumerates the values for replication state. type ReplicationState string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go index c29150164bf0..4047da39acda 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/models.go @@ -487,6 +487,27 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error { return nil } +// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch +// summary. +type AvailablePatchSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + AssessmentActivityID *string `json:"assessmentActivityId,omitempty"` + // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + RebootPending *bool `json:"rebootPending,omitempty"` + // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed. + CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"` + // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security. + OtherPatchCount *int32 `json:"otherPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + // BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.

Minimum // api-version: 2019-03-01. type BillingProfile struct { @@ -6637,6 +6658,36 @@ type KeyVaultSecretReference struct { SourceVault *SubResource `json:"sourceVault,omitempty"` } +// LastPatchInstallationSummary describes the properties of the last installed patch summary. +type LastPatchInstallationSummary struct { + // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings' + Status PatchOperationStatus `json:"status,omitempty"` + // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + InstallationActivityID *string `json:"installationActivityId,omitempty"` + // MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions + MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"` + // RebootStatus - READ-ONLY; The reboot status of the machine after the patch operation. It will be in "NotNeeded" status if reboot is not needed after the patch operation. "Required" will be the status once the patch is applied and machine is required to reboot. "Started" will be the reboot status when the machine has started to reboot. "Failed" will be the status if the machine is failed to reboot. "Completed" will be the status once the machine is rebooted successfully. Possible values include: 'RebootStatusNotNeeded', 'RebootStatusRequired', 'RebootStatusStarted', 'RebootStatusFailed', 'RebootStatusCompleted' + RebootStatus RebootStatus `json:"rebootStatus,omitempty"` + // NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. + NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"` + // ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match. + ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"` + // PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation. + PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"` + // InstalledPatchCount - READ-ONLY; The count of patches that successfully installed. + InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"` + // FailedPatchCount - READ-ONLY; The count of patches that failed installation. + FailedPatchCount *int32 `json:"failedPatchCount,omitempty"` + // StartTime - READ-ONLY; The UTC timestamp when the operation began. + StartTime *date.Time `json:"startTime,omitempty"` + // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // StartedBy - READ-ONLY; The person or system account that started the operation + StartedBy *string `json:"startedBy,omitempty"` + // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them. + Error *APIError `json:"error,omitempty"` +} + // LinuxConfiguration specifies the Linux operating system settings on the virtual machine.

For a list // of supported Linux distributions, see [Linux on Azure-Endorsed // Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) @@ -7164,7 +7215,7 @@ type OSProfile struct { // PatchSettings ... type PatchSettings struct { - // PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the OS. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' + // PatchMode - Specifies the mode of in-guest patching to IaaS virtual machine.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' PatchMode InGuestPatchMode `json:"patchMode,omitempty"` } @@ -10461,6 +10512,8 @@ type VirtualMachineInstanceView struct { AssignedHost *string `json:"assignedHost,omitempty"` // Statuses - The resource status information. Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + // PatchStatus - The status of virtual machine patch operations. + PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineInstanceView. @@ -10505,6 +10558,9 @@ func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) { if vmiv.Statuses != nil { objectMap["statuses"] = vmiv.Statuses } + if vmiv.PatchStatus != nil { + objectMap["patchStatus"] = vmiv.PatchStatus + } return json.Marshal(objectMap) } @@ -10664,6 +10720,14 @@ func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMa return VirtualMachineListResultPage{fn: getNextPage} } +// VirtualMachinePatchStatus the status of virtual machine patch operations. +type VirtualMachinePatchStatus struct { + // AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine. + AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"` + // LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine. + LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"` +} + // VirtualMachineProperties describes the properties of a Virtual Machine. type VirtualMachineProperties struct { // HardwareProfile - Specifies the hardware settings for the virtual machine. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go index e79f7122b30c..ac69843a71f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachines.go @@ -1812,8 +1812,7 @@ func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (re return } -// SimulateEviction the operation to simulate the eviction of spot virtual machine. The eviction will occur within 30 -// minutes of calling the API +// SimulateEviction the operation to simulate the eviction of spot virtual machine. // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go index 21a2ee96fef3..8a39ff8f6638 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-06-01/compute/virtualmachinescalesetvms.go @@ -1127,8 +1127,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Res return } -// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. The eviction will -// occur within 30 minutes of calling the API +// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set. // Parameters: // resourceGroupName - the name of the resource group. // VMScaleSetName - the name of the VM scale set. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/enums.go index 671ebe7a19f9..ed38d8246a08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/enums.go @@ -426,11 +426,15 @@ const ( NodeSizeNone NodeSize = "None" // NodeSizeSmall ... NodeSizeSmall NodeSize = "Small" + // NodeSizeXLarge ... + NodeSizeXLarge NodeSize = "XLarge" + // NodeSizeXXLarge ... + NodeSizeXXLarge NodeSize = "XXLarge" ) // PossibleNodeSizeValues returns an array of possible values for the NodeSize const type. func PossibleNodeSizeValues() []NodeSize { - return []NodeSize{NodeSizeLarge, NodeSizeMedium, NodeSizeNone, NodeSizeSmall} + return []NodeSize{NodeSizeLarge, NodeSizeMedium, NodeSizeNone, NodeSizeSmall, NodeSizeXLarge, NodeSizeXXLarge} } // NodeSizeFamily enumerates the values for node size family. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/integrationruntimes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/integrationruntimes.go index 3fde14107fc8..160be4d4f5ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/integrationruntimes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/integrationruntimes.go @@ -51,13 +51,13 @@ func NewIntegrationRuntimesClientWithBaseURI(baseURI string, subscriptionID stri // integrationRuntime - integration runtime resource definition. // ifMatch - eTag of the integration runtime entity. Should only be specified for update, for which it should // match existing entity or can be * for unconditional update. -func (client IntegrationRuntimesClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (result IntegrationRuntimeResource, err error) { +func (client IntegrationRuntimesClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string, integrationRuntime IntegrationRuntimeResource, ifMatch string) (result IntegrationRuntimesCreateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Create") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -80,18 +80,12 @@ func (client IntegrationRuntimesClient) Create(ctx context.Context, resourceGrou return } - resp, err := client.CreateSender(req) + result, err = client.CreateSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Create", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Create", result.Response(), "Failure sending request") return } - result, err = client.CreateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Create", resp, "Failure responding to request") - } - return } @@ -125,8 +119,14 @@ func (client IntegrationRuntimesClient) CreatePreparer(ctx context.Context, reso // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. -func (client IntegrationRuntimesClient) CreateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client IntegrationRuntimesClient) CreateSender(req *http.Request) (future IntegrationRuntimesCreateFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // CreateResponder handles the response to the Create request. The method always @@ -134,7 +134,7 @@ func (client IntegrationRuntimesClient) CreateSender(req *http.Request) (*http.R func (client IntegrationRuntimesClient) CreateResponder(resp *http.Response) (result IntegrationRuntimeResource, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -146,13 +146,13 @@ func (client IntegrationRuntimesClient) CreateResponder(resp *http.Response) (re // resourceGroupName - the name of the resource group. The name is case insensitive. // workspaceName - the name of the workspace // integrationRuntimeName - integration runtime name -func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result autorest.Response, err error) { +func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, integrationRuntimeName string) (result IntegrationRuntimesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationRuntimesClient.Delete") defer func() { sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode + if result.Response() != nil { + sc = result.Response().StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -173,18 +173,12 @@ func (client IntegrationRuntimesClient) Delete(ctx context.Context, resourceGrou return } - resp, err := client.DeleteSender(req) + result, err = client.DeleteSender(req) if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Delete", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Delete", result.Response(), "Failure sending request") return } - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesClient", "Delete", resp, "Failure responding to request") - } - return } @@ -212,8 +206,14 @@ func (client IntegrationRuntimesClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client IntegrationRuntimesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +func (client IntegrationRuntimesClient) DeleteSender(req *http.Request) (future IntegrationRuntimesDeleteFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return } // DeleteResponder handles the response to the Delete request. The method always @@ -221,7 +221,7 @@ func (client IntegrationRuntimesClient) DeleteSender(req *http.Request) (*http.R func (client IntegrationRuntimesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/models.go index 4fe9d1f0b2ee..659a43626361 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/synapse/mgmt/2019-06-01-preview/synapse/models.go @@ -464,6 +464,8 @@ type BigDataPoolResourceProperties struct { CreationDate *date.Time `json:"creationDate,omitempty"` // AutoPause - Auto-pausing properties AutoPause *AutoPauseProperties `json:"autoPause,omitempty"` + // IsComputeIsolationEnabled - Whether compute isolation is required or not. + IsComputeIsolationEnabled *bool `json:"isComputeIsolationEnabled,omitempty"` // SparkEventsFolder - The Spark events folder SparkEventsFolder *string `json:"sparkEventsFolder,omitempty"` // NodeCount - The number of nodes in the Big Data pool. @@ -474,7 +476,7 @@ type BigDataPoolResourceProperties struct { SparkVersion *string `json:"sparkVersion,omitempty"` // DefaultSparkLogFolder - The default folder where Spark logs will be written. DefaultSparkLogFolder *string `json:"defaultSparkLogFolder,omitempty"` - // NodeSize - The level of compute power that each node in the Big Data pool has. Possible values include: 'NodeSizeNone', 'NodeSizeSmall', 'NodeSizeMedium', 'NodeSizeLarge' + // NodeSize - The level of compute power that each node in the Big Data pool has. Possible values include: 'NodeSizeNone', 'NodeSizeSmall', 'NodeSizeMedium', 'NodeSizeLarge', 'NodeSizeXLarge', 'NodeSizeXXLarge' NodeSize NodeSize `json:"nodeSize,omitempty"` // NodeSizeFamily - The kind of nodes that the Big Data pool provides. Possible values include: 'NodeSizeFamilyNone', 'NodeSizeFamilyMemoryOptimized' NodeSizeFamily NodeSizeFamily `json:"nodeSizeFamily,omitempty"` @@ -2061,14 +2063,14 @@ type IntegrationRuntimeResource struct { autorest.Response `json:"-"` // Properties - Integration runtime properties. Properties BasicIntegrationRuntime `json:"properties,omitempty"` - // ID - READ-ONLY; The resource identifier. + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` - // Etag - READ-ONLY; Etag identifies change in the resource. - Etag *string `json:"etag,omitempty"` } // MarshalJSON is the custom marshaler for IntegrationRuntimeResource. @@ -2095,6 +2097,15 @@ func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error { } irr.Properties = properties } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + irr.Etag = &etag + } case "id": if v != nil { var ID string @@ -2122,21 +2133,64 @@ func (irr *IntegrationRuntimeResource) UnmarshalJSON(body []byte) error { } irr.Type = &typeVar } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - irr.Etag = &etag - } } } return nil } +// IntegrationRuntimesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IntegrationRuntimesCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *IntegrationRuntimesCreateFuture) Result(client IntegrationRuntimesClient) (irr IntegrationRuntimeResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if irr.Response.Response, err = future.GetResult(sender); err == nil && irr.Response.Response.StatusCode != http.StatusNoContent { + irr, err = client.CreateResponder(irr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesCreateFuture", "Result", irr.Response.Response, "Failure responding to request") + } + } + return +} + +// IntegrationRuntimesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type IntegrationRuntimesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *IntegrationRuntimesDeleteFuture) Result(client IntegrationRuntimesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "synapse.IntegrationRuntimesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("synapse.IntegrationRuntimesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // IntegrationRuntimeSsisCatalogInfo catalog information for managed dedicated integration runtime. type IntegrationRuntimeSsisCatalogInfo struct { // AdditionalProperties - Unmatched properties from the message are deserialized this collection @@ -5969,6 +6023,8 @@ type Sku struct { Tier *string `json:"tier,omitempty"` // Name - The SKU name Name *string `json:"name,omitempty"` + // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` } // SQLPool a SQL Analytics pool @@ -8808,16 +8864,16 @@ type SsisVariable struct { SensitiveValue *string `json:"sensitiveValue,omitempty"` } -// SubResource azure Synapse nested resource, which belongs to a factory. +// SubResource azure Synapse nested resource, which belongs to a workspace. type SubResource struct { - // ID - READ-ONLY; The resource identifier. + // Etag - READ-ONLY; Resource Etag. + Etag *string `json:"etag,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The resource name. + // Name - READ-ONLY; The name of the resource Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The resource type. + // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` - // Etag - READ-ONLY; Etag identifies change in the resource. - Etag *string `json:"etag,omitempty"` } // TopQueries a database query. @@ -9749,6 +9805,8 @@ type WorkspaceProperties struct { ManagedVirtualNetwork *string `json:"managedVirtualNetwork,omitempty"` // PrivateEndpointConnections - Private endpoint connections to the workspace PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // ExtraProperties - READ-ONLY; Workspace level configs and feature flags + ExtraProperties map[string]interface{} `json:"extraProperties"` } // MarshalJSON is the custom marshaler for WorkspaceProperties. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index bf7f3456adb3..168697eafd8f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v46.1.0" +const Number = "v46.4.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index b1beaa873d23..1075674491a2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,7 @@ cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace cloud.google.com/go/internal/version cloud.google.com/go/storage -# github.com/Azure/azure-sdk-for-go v46.1.0+incompatible +# github.com/Azure/azure-sdk-for-go v46.4.0+incompatible github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources github.com/Azure/azure-sdk-for-go/services/advisor/mgmt/2020-01-01/advisor github.com/Azure/azure-sdk-for-go/services/analysisservices/mgmt/2017-08-01/analysisservices