vendor: update all dependencies to latest versions
This commit is contained in:
+5
-8
@@ -1,9 +1,7 @@
|
||||
// Package analysisservices implements the Azure ARM Analysisservices service
|
||||
// API version 2016-05-16.
|
||||
// Package analysisservices implements the Azure ARM Analysisservices service API version 2017-08-01-beta.
|
||||
//
|
||||
// The Azure Analysis Services Web API provides a RESTful set of web services
|
||||
// that enables users to create, retrieve, update, and delete Analysis Services
|
||||
// servers
|
||||
// The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve,
|
||||
// update, and delete Analysis Services servers
|
||||
package analysisservices
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
@@ -20,9 +18,8 @@ package analysisservices
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
|
||||
+132
-42
@@ -14,12 +14,23 @@ package analysisservices
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/to"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ConnectionMode enumerates the values for connection mode.
|
||||
type ConnectionMode string
|
||||
|
||||
const (
|
||||
// All specifies the all state for connection mode.
|
||||
All ConnectionMode = "All"
|
||||
// ReadOnly specifies the read only state for connection mode.
|
||||
ReadOnly ConnectionMode = "ReadOnly"
|
||||
)
|
||||
|
||||
// ProvisioningState enumerates the values for provisioning state.
|
||||
@@ -52,26 +63,6 @@ const (
|
||||
Updating ProvisioningState = "Updating"
|
||||
)
|
||||
|
||||
// SkuName enumerates the values for sku name.
|
||||
type SkuName string
|
||||
|
||||
const (
|
||||
// B1 specifies the b1 state for sku name.
|
||||
B1 SkuName = "B1"
|
||||
// B2 specifies the b2 state for sku name.
|
||||
B2 SkuName = "B2"
|
||||
// D1 specifies the d1 state for sku name.
|
||||
D1 SkuName = "D1"
|
||||
// S0 specifies the s0 state for sku name.
|
||||
S0 SkuName = "S0"
|
||||
// S1 specifies the s1 state for sku name.
|
||||
S1 SkuName = "S1"
|
||||
// S2 specifies the s2 state for sku name.
|
||||
S2 SkuName = "S2"
|
||||
// S4 specifies the s4 state for sku name.
|
||||
S4 SkuName = "S4"
|
||||
)
|
||||
|
||||
// SkuTier enumerates the values for sku tier.
|
||||
type SkuTier string
|
||||
|
||||
@@ -114,11 +105,88 @@ const (
|
||||
StateUpdating State = "Updating"
|
||||
)
|
||||
|
||||
// BackupConfiguration is an object that represents backup configurations
|
||||
type BackupConfiguration struct {
|
||||
StorageAccount *string `json:"storageAccount,omitempty"`
|
||||
BlobContainer *string `json:"blobContainer,omitempty"`
|
||||
AccessKey *string `json:"accessKey,omitempty"`
|
||||
// Status enumerates the values for status.
|
||||
type Status string
|
||||
|
||||
const (
|
||||
// Live specifies the live state for status.
|
||||
Live Status = "Live"
|
||||
)
|
||||
|
||||
// ErrorResponse is describes the format of Error response.
|
||||
type ErrorResponse struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayDetails is the gateway details.
|
||||
type GatewayDetails struct {
|
||||
GatewayResourceID *string `json:"gatewayResourceId,omitempty"`
|
||||
GatewayObjectID *string `json:"gatewayObjectId,omitempty"`
|
||||
DmtsClusterURI *string `json:"dmtsClusterUri,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayError is detail of gateway errors.
|
||||
type GatewayError struct {
|
||||
Code *string `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayListStatusError is status of gateway is error.
|
||||
type GatewayListStatusError struct {
|
||||
Error *GatewayError `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// GatewayListStatusLive is status of gateway is live.
|
||||
type GatewayListStatusLive struct {
|
||||
autorest.Response `json:"-"`
|
||||
Status Status `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// IPv4FirewallRule is the detail of firewall rule.
|
||||
type IPv4FirewallRule struct {
|
||||
FirewallRuleName *string `json:"firewallRuleName,omitempty"`
|
||||
RangeStart *string `json:"rangeStart,omitempty"`
|
||||
RangeEnd *string `json:"rangeEnd,omitempty"`
|
||||
}
|
||||
|
||||
// IPv4FirewallSettings is an array of firewall rules.
|
||||
type IPv4FirewallSettings struct {
|
||||
FirewallRules *[]IPv4FirewallRule `json:"firewallRules,omitempty"`
|
||||
EnablePowerBIService *string `json:"enablePowerBIService,omitempty"`
|
||||
}
|
||||
|
||||
// Operation is a Consumption REST API operation.
|
||||
type Operation struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Display *OperationDisplay `json:"display,omitempty"`
|
||||
}
|
||||
|
||||
// OperationDisplay is the object that represents the operation.
|
||||
type OperationDisplay struct {
|
||||
Provider *string `json:"provider,omitempty"`
|
||||
Resource *string `json:"resource,omitempty"`
|
||||
Operation *string `json:"operation,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResult is result of listing consumption operations. It contains a list of operations and a URL link to
|
||||
// get the next set of results.
|
||||
type OperationListResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]Operation `json:"value,omitempty"`
|
||||
NextLink *string `json:"nextLink,omitempty"`
|
||||
}
|
||||
|
||||
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
|
||||
// nil if no more results exist.
|
||||
func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) {
|
||||
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
||||
return nil, nil
|
||||
}
|
||||
return autorest.Prepare(&http.Request{},
|
||||
autorest.AsJSON(),
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(to.String(client.NextLink)))
|
||||
}
|
||||
|
||||
// Resource is represents an instance of an Analysis Services resource.
|
||||
@@ -131,11 +199,11 @@ type Resource struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceSku is represents the SKU name and Azure pricing tier for Analysis
|
||||
// Services resource.
|
||||
// ResourceSku is represents the SKU name and Azure pricing tier for Analysis Services resource.
|
||||
type ResourceSku struct {
|
||||
Name SkuName `json:"name,omitempty"`
|
||||
Tier SkuTier `json:"tier,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Tier SkuTier `json:"tier,omitempty"`
|
||||
Capacity *int32 `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// Server is represents an instance of an Analysis Services resource.
|
||||
@@ -150,25 +218,30 @@ type Server struct {
|
||||
*ServerProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// ServerAdministrators is an array of administrator user identities
|
||||
// ServerAdministrators is an array of administrator user identities.
|
||||
type ServerAdministrators struct {
|
||||
Members *[]string `json:"members,omitempty"`
|
||||
}
|
||||
|
||||
// ServerMutableProperties is an object that represents a set of mutable
|
||||
// Analysis Services resource properties.
|
||||
// ServerMutableProperties is an object that represents a set of mutable Analysis Services resource properties.
|
||||
type ServerMutableProperties struct {
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"`
|
||||
GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"`
|
||||
IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"`
|
||||
QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"`
|
||||
}
|
||||
|
||||
// ServerProperties is properties of Analysis Services resource.
|
||||
type ServerProperties struct {
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
|
||||
State State `json:"state,omitempty"`
|
||||
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
|
||||
ServerFullName *string `json:"serverFullName,omitempty"`
|
||||
AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"`
|
||||
BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"`
|
||||
GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"`
|
||||
IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"`
|
||||
QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"`
|
||||
State State `json:"state,omitempty"`
|
||||
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
|
||||
ServerFullName *string `json:"serverFullName,omitempty"`
|
||||
}
|
||||
|
||||
// Servers is an array of Analysis Services resources.
|
||||
@@ -183,3 +256,20 @@ type ServerUpdateParameters struct {
|
||||
Tags *map[string]*string `json:"tags,omitempty"`
|
||||
*ServerMutableProperties `json:"properties,omitempty"`
|
||||
}
|
||||
|
||||
// SkuDetailsForExistingResource is an object that represents SKU details for existing resources.
|
||||
type SkuDetailsForExistingResource struct {
|
||||
Sku *ResourceSku `json:"sku,omitempty"`
|
||||
}
|
||||
|
||||
// SkuEnumerationForExistingResourceResult is an object that represents enumerating SKUs for existing resources.
|
||||
type SkuEnumerationForExistingResourceResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]SkuDetailsForExistingResource `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SkuEnumerationForNewResourceResult is an object that represents enumerating SKUs for new resources.
|
||||
type SkuEnumerationForNewResourceResult struct {
|
||||
autorest.Response `json:"-"`
|
||||
Value *[]ResourceSku `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
package analysisservices
|
||||
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
"github.com/Azure/go-autorest/autorest/azure"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// OperationsClient is the the Azure Analysis Services Web API provides a RESTful set of web services that enables
|
||||
// users to create, retrieve, update, and delete Analysis Services servers
|
||||
type OperationsClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
|
||||
// NewOperationsClient creates an instance of the OperationsClient client.
|
||||
func NewOperationsClient(subscriptionID string) OperationsClient {
|
||||
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
|
||||
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
|
||||
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// List lists all of the available consumption REST API operations.
|
||||
func (client OperationsClient) List() (result OperationListResult, err error) {
|
||||
req, err := client.ListPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListPreparer prepares the List request.
|
||||
func (client OperationsClient) ListPreparer() (*http.Request, error) {
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPath("/providers/Microsoft.AnalysisServices/operations"),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSender sends the List request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListResponder handles the response to the List request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListNextResults retrieves the next set of results, if any.
|
||||
func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
|
||||
req, err := lastResults.OperationListResultPreparer()
|
||||
if err != nil {
|
||||
return result, autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", nil, "Failure preparing next results request")
|
||||
}
|
||||
if req == nil {
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return result, autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure sending next results request")
|
||||
}
|
||||
|
||||
result, err = client.ListResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to next results request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListComplete gets all elements from the list without paging.
|
||||
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
|
||||
resultChan := make(chan Operation)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.List()
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
+395
-86
@@ -14,9 +14,8 @@ package analysisservices
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,9 +24,8 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ServersClient is the the Azure Analysis Services Web API provides a RESTful
|
||||
// set of web services that enables users to create, retrieve, update, and
|
||||
// delete Analysis Services servers
|
||||
// ServersClient is the the Azure Analysis Services Web API provides a RESTful set of web services that enables users
|
||||
// to create, retrieve, update, and delete Analysis Services servers
|
||||
type ServersClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -42,17 +40,14 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC
|
||||
return ServersClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// Create provisions the specified Analysis Services server based on the
|
||||
// configuration specified in the request. This method may poll for completion.
|
||||
// Polling can be canceled by passing the cancel channel argument. The channel
|
||||
// will be used to cancel polling and any outstanding HTTP requests.
|
||||
// Create provisions the specified Analysis Services server based on the configuration specified in the request. This
|
||||
// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be
|
||||
// used to cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63.
|
||||
// serverParameters is contains the information used to provision the Analysis
|
||||
// Services server.
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63. serverParameters is contains the information used
|
||||
// to provision the Analysis Services server.
|
||||
func (client ServersClient) Create(resourceGroupName string, serverName string, serverParameters Server, cancel <-chan struct{}) (<-chan Server, <-chan error) {
|
||||
resultChan := make(chan Server, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -75,8 +70,10 @@ func (client ServersClient) Create(resourceGroupName string, serverName string,
|
||||
var err error
|
||||
var result Server
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -109,7 +106,7 @@ func (client ServersClient) CreatePreparer(resourceGroupName string, serverName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -145,14 +142,12 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server,
|
||||
return
|
||||
}
|
||||
|
||||
// Delete deletes the specified Analysis Services server. This method may poll
|
||||
// for completion. Polling can be canceled by passing the cancel channel
|
||||
// argument. The channel will be used to cancel polling and any outstanding
|
||||
// HTTP requests.
|
||||
// Delete deletes the specified Analysis Services server. This method may poll for completion. Polling can be canceled
|
||||
// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP
|
||||
// requests.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Delete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
@@ -176,8 +171,10 @@ func (client ServersClient) Delete(resourceGroupName string, serverName string,
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -210,7 +207,7 @@ func (client ServersClient) DeletePreparer(resourceGroupName string, serverName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -243,11 +240,88 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores
|
||||
return
|
||||
}
|
||||
|
||||
// DissociateGateway dissociates a Unified Gateway associated with the server.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) DissociateGateway(resourceGroupName string, serverName string) (result autorest.Response, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "DissociateGateway")
|
||||
}
|
||||
|
||||
req, err := client.DissociateGatewayPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.DissociateGatewaySender(req)
|
||||
if err != nil {
|
||||
result.Response = resp
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.DissociateGatewayResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// DissociateGatewayPreparer prepares the DissociateGateway request.
|
||||
func (client ServersClient) DissociateGatewayPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// DissociateGatewaySender sends the DissociateGateway request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) DissociateGatewaySender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// DissociateGatewayResponder handles the response to the DissociateGateway request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) DissociateGatewayResponder(resp *http.Response) (result autorest.Response, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByClosing())
|
||||
result.Response = resp
|
||||
return
|
||||
}
|
||||
|
||||
// GetDetails gets details about the specified Analysis Services server.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be a minimum of 3 characters, and a maximum of 63.
|
||||
func (client ServersClient) GetDetails(resourceGroupName string, serverName string) (result Server, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
@@ -291,7 +365,7 @@ func (client ServersClient) GetDetailsPreparer(resourceGroupName string, serverN
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -352,7 +426,7 @@ func (client ServersClient) ListPreparer() (*http.Request, error) {
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -384,12 +458,10 @@ func (client ServersClient) ListResponder(resp *http.Response) (result Servers,
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroup gets all the Analysis Services servers for the given
|
||||
// resource group.
|
||||
// ListByResourceGroup gets all the Analysis Services servers for the given resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90.
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90.
|
||||
func (client ServersClient) ListByResourceGroup(resourceGroupName string) (result Servers, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
@@ -427,7 +499,7 @@ func (client ServersClient) ListByResourceGroupPreparer(resourceGroupName string
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -459,14 +531,231 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r
|
||||
return
|
||||
}
|
||||
|
||||
// Resume resumes operation of the specified Analysis Services server instance.
|
||||
// This method may poll for completion. Polling can be canceled by passing the
|
||||
// cancel channel argument. The channel will be used to cancel polling and any
|
||||
// ListGatewayStatus return the gateway status of the specified Analysis Services server instance.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server.
|
||||
func (client ServersClient) ListGatewayStatus(resourceGroupName string, serverName string) (result GatewayListStatusLive, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListGatewayStatus")
|
||||
}
|
||||
|
||||
req, err := client.ListGatewayStatusPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListGatewayStatusSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListGatewayStatusResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListGatewayStatusPreparer prepares the ListGatewayStatus request.
|
||||
func (client ServersClient) ListGatewayStatusPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsPost(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListGatewayStatusSender sends the ListGatewayStatus request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListGatewayStatusSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListGatewayStatusResponder handles the response to the ListGatewayStatus request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListGatewayStatusResponder(resp *http.Response) (result GatewayListStatusLive, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForExisting lists eligible SKUs for an Analysis Services resource.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) ListSkusForExisting(resourceGroupName string, serverName string) (result SkuEnumerationForExistingResourceResult, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
|
||||
{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
|
||||
{TargetValue: serverName,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListSkusForExisting")
|
||||
}
|
||||
|
||||
req, err := client.ListSkusForExistingPreparer(resourceGroupName, serverName)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSkusForExistingSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListSkusForExistingResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForExistingPreparer prepares the ListSkusForExisting request.
|
||||
func (client ServersClient) ListSkusForExistingPreparer(resourceGroupName string, serverName string) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSkusForExistingSender sends the ListSkusForExisting request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListSkusForExistingSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListSkusForExistingResponder handles the response to the ListSkusForExisting request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListSkusForExistingResponder(resp *http.Response) (result SkuEnumerationForExistingResourceResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForNew lists eligible SKUs for Analysis Services resource provider.
|
||||
func (client ServersClient) ListSkusForNew() (result SkuEnumerationForNewResourceResult, err error) {
|
||||
req, err := client.ListSkusForNewPreparer()
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.ListSkusForNewSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.ListSkusForNewResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListSkusForNewPreparer prepares the ListSkusForNew request.
|
||||
func (client ServersClient) ListSkusForNewPreparer() (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
|
||||
preparer := autorest.CreatePreparer(
|
||||
autorest.AsGet(),
|
||||
autorest.WithBaseURL(client.BaseURI),
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus", pathParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
}
|
||||
|
||||
// ListSkusForNewSender sends the ListSkusForNew request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) ListSkusForNewSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
}
|
||||
|
||||
// ListSkusForNewResponder handles the response to the ListSkusForNew request. The method always
|
||||
// closes the http.Response Body.
|
||||
func (client ServersClient) ListSkusForNewResponder(resp *http.Response) (result SkuEnumerationForNewResourceResult, err error) {
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
return
|
||||
}
|
||||
|
||||
// Resume resumes operation of the specified Analysis Services server instance. This method may poll for completion.
|
||||
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
|
||||
// outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Resume(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
@@ -490,8 +779,10 @@ func (client ServersClient) Resume(resourceGroupName string, serverName string,
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -524,7 +815,7 @@ func (client ServersClient) ResumePreparer(resourceGroupName string, serverName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -557,14 +848,12 @@ func (client ServersClient) ResumeResponder(resp *http.Response) (result autores
|
||||
return
|
||||
}
|
||||
|
||||
// Suspend supends operation of the specified Analysis Services server
|
||||
// instance. This method may poll for completion. Polling can be canceled by
|
||||
// passing the cancel channel argument. The channel will be used to cancel
|
||||
// polling and any outstanding HTTP requests.
|
||||
// Suspend supends operation of the specified Analysis Services server instance. This method may poll for completion.
|
||||
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
|
||||
// outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
func (client ServersClient) Suspend(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
|
||||
resultChan := make(chan autorest.Response, 1)
|
||||
@@ -588,8 +877,10 @@ func (client ServersClient) Suspend(resourceGroupName string, serverName string,
|
||||
var err error
|
||||
var result autorest.Response
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -622,7 +913,7 @@ func (client ServersClient) SuspendPreparer(resourceGroupName string, serverName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -655,15 +946,17 @@ func (client ServersClient) SuspendResponder(resp *http.Response) (result autore
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates the current state of the specified Analysis Services server.
|
||||
// Update updates the current state of the specified Analysis Services server. This method may poll for completion.
|
||||
// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any
|
||||
// outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given
|
||||
// Analysis Services server is part. This name must be at least 1 character in
|
||||
// length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63.
|
||||
// serverUpdateParameters is request object that contains the updated
|
||||
// information for the server.
|
||||
func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (result Server, err error) {
|
||||
// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This
|
||||
// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services
|
||||
// server. It must be at least 3 characters in length, and no more than 63. serverUpdateParameters is request object
|
||||
// that contains the updated information for the server.
|
||||
func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (<-chan Server, <-chan error) {
|
||||
resultChan := make(chan Server, 1)
|
||||
errChan := make(chan error, 1)
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: resourceGroupName,
|
||||
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
|
||||
@@ -673,39 +966,53 @@ func (client ServersClient) Update(resourceGroupName string, serverName string,
|
||||
Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil},
|
||||
{Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil},
|
||||
{Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil {
|
||||
return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update")
|
||||
errChan <- validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update")
|
||||
close(errChan)
|
||||
close(resultChan)
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
var err error
|
||||
var result Server
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters, cancel)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := client.UpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
resp, err := client.UpdateSender(req)
|
||||
if err != nil {
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request")
|
||||
return
|
||||
}
|
||||
|
||||
result, err = client.UpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request")
|
||||
}
|
||||
|
||||
return
|
||||
result, err = client.UpdateResponder(resp)
|
||||
if err != nil {
|
||||
err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request")
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// UpdatePreparer prepares the Update request.
|
||||
func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (*http.Request, error) {
|
||||
func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (*http.Request, error) {
|
||||
pathParameters := map[string]interface{}{
|
||||
"resourceGroupName": autorest.Encode("path", resourceGroupName),
|
||||
"serverName": autorest.Encode("path", serverName),
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-05-16"
|
||||
const APIVersion = "2017-08-01-beta"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -717,13 +1024,15 @@ func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName
|
||||
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", pathParameters),
|
||||
autorest.WithJSON(serverUpdateParameters),
|
||||
autorest.WithQueryParameters(queryParameters))
|
||||
return preparer.Prepare(&http.Request{})
|
||||
return preparer.Prepare(&http.Request{Cancel: cancel})
|
||||
}
|
||||
|
||||
// UpdateSender sends the Update request. The method will close the
|
||||
// http.Response Body if it receives an error.
|
||||
func (client ServersClient) UpdateSender(req *http.Request) (*http.Response, error) {
|
||||
return autorest.SendWithSender(client, req)
|
||||
return autorest.SendWithSender(client,
|
||||
req,
|
||||
azure.DoPollForAsynchronous(client.PollingDelay))
|
||||
}
|
||||
|
||||
// UpdateResponder handles the response to the Update request. The method always
|
||||
@@ -732,7 +1041,7 @@ func (client ServersClient) UpdateResponder(resp *http.Response) (result Server,
|
||||
err = autorest.Respond(
|
||||
resp,
|
||||
client.ByInspecting(),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK),
|
||||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
|
||||
autorest.ByUnmarshallingJSON(&result),
|
||||
autorest.ByClosing())
|
||||
result.Response = autorest.Response{Response: resp}
|
||||
|
||||
+4
-5
@@ -14,16 +14,15 @@ package analysisservices
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
// UserAgent returns the UserAgent string to use when sending http.Requests.
|
||||
func UserAgent() string {
|
||||
return "Azure-SDK-For-Go/v10.1.0-beta arm-analysisservices/2016-05-16"
|
||||
return "Azure-SDK-For-Go/v11.0.0-beta arm-analysisservices/2017-08-01-beta"
|
||||
}
|
||||
|
||||
// Version returns the semantic version (see http://semver.org) of the client.
|
||||
func Version() string {
|
||||
return "v10.1.0-beta"
|
||||
return "v11.0.0-beta"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user