1package account 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/azure" 24 "github.com/Azure/go-autorest/autorest/validation" 25 "net/http" 26) 27 28// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 29// Client is the creates an Azure Data Lake Analytics account management client. 30type Client struct { 31 BaseClient 32} 33 34// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 35// NewClient creates an instance of the Client client. 36func NewClient(subscriptionID string) Client { 37 return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) 38} 39 40// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 41// NewClientWithBaseURI creates an instance of the Client client. 42func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { 43 return Client{NewWithBaseURI(baseURI, subscriptionID)} 44} 45 46// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 47// AddDataLakeStoreAccount updates the specified Data Lake Analytics account to include the additional Data Lake Store 48// account. 49// 50// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 51// accountName is the name of the Data Lake Analytics account to which to add the Data Lake Store account. 52// dataLakeStoreAccountName is the name of the Data Lake Store account to add. parameters is the details of the 53// Data Lake Store account. 54func (client Client) AddDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters AddDataLakeStoreParameters) (result autorest.Response, err error) { 55 if err := validation.Validate([]validation.Validation{ 56 {TargetValue: parameters, 57 Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { 58 return result, validation.NewError("account.Client", "AddDataLakeStoreAccount", err.Error()) 59 } 60 61 req, err := client.AddDataLakeStoreAccountPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName, parameters) 62 if err != nil { 63 err = autorest.NewErrorWithError(err, "account.Client", "AddDataLakeStoreAccount", nil, "Failure preparing request") 64 return 65 } 66 67 resp, err := client.AddDataLakeStoreAccountSender(req) 68 if err != nil { 69 result.Response = resp 70 err = autorest.NewErrorWithError(err, "account.Client", "AddDataLakeStoreAccount", resp, "Failure sending request") 71 return 72 } 73 74 result, err = client.AddDataLakeStoreAccountResponder(resp) 75 if err != nil { 76 err = autorest.NewErrorWithError(err, "account.Client", "AddDataLakeStoreAccount", resp, "Failure responding to request") 77 } 78 79 return 80} 81 82// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 83// AddDataLakeStoreAccountPreparer prepares the AddDataLakeStoreAccount request. 84func (client Client) AddDataLakeStoreAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters AddDataLakeStoreParameters) (*http.Request, error) { 85 pathParameters := map[string]interface{}{ 86 "accountName": autorest.Encode("path", accountName), 87 "dataLakeStoreAccountName": autorest.Encode("path", dataLakeStoreAccountName), 88 "resourceGroupName": autorest.Encode("path", resourceGroupName), 89 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 90 } 91 92 const APIVersion = "2015-10-01-preview" 93 queryParameters := map[string]interface{}{ 94 "api-version": APIVersion, 95 } 96 97 preparer := autorest.CreatePreparer( 98 autorest.AsContentType("application/json; charset=utf-8"), 99 autorest.AsPut(), 100 autorest.WithBaseURL(client.BaseURI), 101 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}", pathParameters), 102 autorest.WithJSON(parameters), 103 autorest.WithQueryParameters(queryParameters)) 104 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 105} 106 107// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 108// AddDataLakeStoreAccountSender sends the AddDataLakeStoreAccount request. The method will close the 109// http.Response Body if it receives an error. 110func (client Client) AddDataLakeStoreAccountSender(req *http.Request) (*http.Response, error) { 111 return autorest.SendWithSender(client, req, 112 azure.DoRetryWithRegistration(client.Client)) 113} 114 115// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 116// AddDataLakeStoreAccountResponder handles the response to the AddDataLakeStoreAccount request. The method always 117// closes the http.Response Body. 118func (client Client) AddDataLakeStoreAccountResponder(resp *http.Response) (result autorest.Response, err error) { 119 err = autorest.Respond( 120 resp, 121 client.ByInspecting(), 122 azure.WithErrorUnlessStatusCode(http.StatusOK), 123 autorest.ByClosing()) 124 result.Response = resp 125 return 126} 127 128// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 129// AddStorageAccount updates the specified Data Lake Analytics account to add an Azure Storage account. 130// 131// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 132// accountName is the name of the Data Lake Analytics account to which to add the Azure Storage account. 133// storageAccountName is the name of the Azure Storage account to add parameters is the parameters containing the 134// access key and optional suffix for the Azure Storage Account. 135func (client Client) AddStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) { 136 if err := validation.Validate([]validation.Validation{ 137 {TargetValue: parameters, 138 Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, 139 Chain: []validation.Constraint{{Target: "parameters.Properties.AccessKey", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { 140 return result, validation.NewError("account.Client", "AddStorageAccount", err.Error()) 141 } 142 143 req, err := client.AddStorageAccountPreparer(ctx, resourceGroupName, accountName, storageAccountName, parameters) 144 if err != nil { 145 err = autorest.NewErrorWithError(err, "account.Client", "AddStorageAccount", nil, "Failure preparing request") 146 return 147 } 148 149 resp, err := client.AddStorageAccountSender(req) 150 if err != nil { 151 result.Response = resp 152 err = autorest.NewErrorWithError(err, "account.Client", "AddStorageAccount", resp, "Failure sending request") 153 return 154 } 155 156 result, err = client.AddStorageAccountResponder(resp) 157 if err != nil { 158 err = autorest.NewErrorWithError(err, "account.Client", "AddStorageAccount", resp, "Failure responding to request") 159 } 160 161 return 162} 163 164// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 165// AddStorageAccountPreparer prepares the AddStorageAccount request. 166func (client Client) AddStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (*http.Request, error) { 167 pathParameters := map[string]interface{}{ 168 "accountName": autorest.Encode("path", accountName), 169 "resourceGroupName": autorest.Encode("path", resourceGroupName), 170 "storageAccountName": autorest.Encode("path", storageAccountName), 171 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 172 } 173 174 const APIVersion = "2015-10-01-preview" 175 queryParameters := map[string]interface{}{ 176 "api-version": APIVersion, 177 } 178 179 preparer := autorest.CreatePreparer( 180 autorest.AsContentType("application/json; charset=utf-8"), 181 autorest.AsPut(), 182 autorest.WithBaseURL(client.BaseURI), 183 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", pathParameters), 184 autorest.WithJSON(parameters), 185 autorest.WithQueryParameters(queryParameters)) 186 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 187} 188 189// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 190// AddStorageAccountSender sends the AddStorageAccount request. The method will close the 191// http.Response Body if it receives an error. 192func (client Client) AddStorageAccountSender(req *http.Request) (*http.Response, error) { 193 return autorest.SendWithSender(client, req, 194 azure.DoRetryWithRegistration(client.Client)) 195} 196 197// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 198// AddStorageAccountResponder handles the response to the AddStorageAccount request. The method always 199// closes the http.Response Body. 200func (client Client) AddStorageAccountResponder(resp *http.Response) (result autorest.Response, err error) { 201 err = autorest.Respond( 202 resp, 203 client.ByInspecting(), 204 azure.WithErrorUnlessStatusCode(http.StatusOK), 205 autorest.ByClosing()) 206 result.Response = resp 207 return 208} 209 210// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 211// Create creates the specified Data Lake Analytics account. This supplies the user with computation services for Data 212// Lake Analytics workloads 213// 214// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account.the 215// account will be associated with. name is the name of the Data Lake Analytics account to create. parameters is 216// parameters supplied to the create Data Lake Analytics account operation. 217func (client Client) Create(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (result CreateFuture, err error) { 218 req, err := client.CreatePreparer(ctx, resourceGroupName, name, parameters) 219 if err != nil { 220 err = autorest.NewErrorWithError(err, "account.Client", "Create", nil, "Failure preparing request") 221 return 222 } 223 224 result, err = client.CreateSender(req) 225 if err != nil { 226 err = autorest.NewErrorWithError(err, "account.Client", "Create", result.Response(), "Failure sending request") 227 return 228 } 229 230 return 231} 232 233// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 234// CreatePreparer prepares the Create request. 235func (client Client) CreatePreparer(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (*http.Request, error) { 236 pathParameters := map[string]interface{}{ 237 "name": autorest.Encode("path", name), 238 "resourceGroupName": autorest.Encode("path", resourceGroupName), 239 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 240 } 241 242 const APIVersion = "2015-10-01-preview" 243 queryParameters := map[string]interface{}{ 244 "api-version": APIVersion, 245 } 246 247 preparer := autorest.CreatePreparer( 248 autorest.AsContentType("application/json; charset=utf-8"), 249 autorest.AsPut(), 250 autorest.WithBaseURL(client.BaseURI), 251 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}", pathParameters), 252 autorest.WithJSON(parameters), 253 autorest.WithQueryParameters(queryParameters)) 254 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 255} 256 257// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 258// CreateSender sends the Create request. The method will close the 259// http.Response Body if it receives an error. 260func (client Client) CreateSender(req *http.Request) (future CreateFuture, err error) { 261 sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) 262 future.Future = azure.NewFuture(req) 263 future.req = req 264 _, err = future.Done(sender) 265 if err != nil { 266 return 267 } 268 err = autorest.Respond(future.Response(), 269 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) 270 return 271} 272 273// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 274// CreateResponder handles the response to the Create request. The method always 275// closes the http.Response Body. 276func (client Client) CreateResponder(resp *http.Response) (result DataLakeAnalyticsAccount, err error) { 277 err = autorest.Respond( 278 resp, 279 client.ByInspecting(), 280 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), 281 autorest.ByUnmarshallingJSON(&result), 282 autorest.ByClosing()) 283 result.Response = autorest.Response{Response: resp} 284 return 285} 286 287// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 288// Delete begins the delete delete process for the Data Lake Analytics account object specified by the account name. 289// 290// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 291// accountName is the name of the Data Lake Analytics account to delete 292func (client Client) Delete(ctx context.Context, resourceGroupName string, accountName string) (result DeleteFuture, err error) { 293 req, err := client.DeletePreparer(ctx, resourceGroupName, accountName) 294 if err != nil { 295 err = autorest.NewErrorWithError(err, "account.Client", "Delete", nil, "Failure preparing request") 296 return 297 } 298 299 result, err = client.DeleteSender(req) 300 if err != nil { 301 err = autorest.NewErrorWithError(err, "account.Client", "Delete", result.Response(), "Failure sending request") 302 return 303 } 304 305 return 306} 307 308// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 309// DeletePreparer prepares the Delete request. 310func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { 311 pathParameters := map[string]interface{}{ 312 "accountName": autorest.Encode("path", accountName), 313 "resourceGroupName": autorest.Encode("path", resourceGroupName), 314 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 315 } 316 317 const APIVersion = "2015-10-01-preview" 318 queryParameters := map[string]interface{}{ 319 "api-version": APIVersion, 320 } 321 322 preparer := autorest.CreatePreparer( 323 autorest.AsDelete(), 324 autorest.WithBaseURL(client.BaseURI), 325 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", pathParameters), 326 autorest.WithQueryParameters(queryParameters)) 327 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 328} 329 330// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 331// DeleteSender sends the Delete request. The method will close the 332// http.Response Body if it receives an error. 333func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { 334 sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) 335 future.Future = azure.NewFuture(req) 336 future.req = req 337 _, err = future.Done(sender) 338 if err != nil { 339 return 340 } 341 err = autorest.Respond(future.Response(), 342 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound)) 343 return 344} 345 346// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 347// DeleteResponder handles the response to the Delete request. The method always 348// closes the http.Response Body. 349func (client Client) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { 350 err = autorest.Respond( 351 resp, 352 client.ByInspecting(), 353 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound), 354 autorest.ByClosing()) 355 result.Response = resp 356 return 357} 358 359// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 360// DeleteDataLakeStoreAccount updates the Data Lake Analytics account specified to remove the specified Data Lake Store 361// account. 362// 363// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 364// accountName is the name of the Data Lake Analytics account from which to remove the Data Lake Store account. 365// dataLakeStoreAccountName is the name of the Data Lake Store account to remove 366func (client Client) DeleteDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) { 367 req, err := client.DeleteDataLakeStoreAccountPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName) 368 if err != nil { 369 err = autorest.NewErrorWithError(err, "account.Client", "DeleteDataLakeStoreAccount", nil, "Failure preparing request") 370 return 371 } 372 373 resp, err := client.DeleteDataLakeStoreAccountSender(req) 374 if err != nil { 375 result.Response = resp 376 err = autorest.NewErrorWithError(err, "account.Client", "DeleteDataLakeStoreAccount", resp, "Failure sending request") 377 return 378 } 379 380 result, err = client.DeleteDataLakeStoreAccountResponder(resp) 381 if err != nil { 382 err = autorest.NewErrorWithError(err, "account.Client", "DeleteDataLakeStoreAccount", resp, "Failure responding to request") 383 } 384 385 return 386} 387 388// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 389// DeleteDataLakeStoreAccountPreparer prepares the DeleteDataLakeStoreAccount request. 390func (client Client) DeleteDataLakeStoreAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (*http.Request, error) { 391 pathParameters := map[string]interface{}{ 392 "accountName": autorest.Encode("path", accountName), 393 "dataLakeStoreAccountName": autorest.Encode("path", dataLakeStoreAccountName), 394 "resourceGroupName": autorest.Encode("path", resourceGroupName), 395 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 396 } 397 398 const APIVersion = "2015-10-01-preview" 399 queryParameters := map[string]interface{}{ 400 "api-version": APIVersion, 401 } 402 403 preparer := autorest.CreatePreparer( 404 autorest.AsDelete(), 405 autorest.WithBaseURL(client.BaseURI), 406 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}", pathParameters), 407 autorest.WithQueryParameters(queryParameters)) 408 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 409} 410 411// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 412// DeleteDataLakeStoreAccountSender sends the DeleteDataLakeStoreAccount request. The method will close the 413// http.Response Body if it receives an error. 414func (client Client) DeleteDataLakeStoreAccountSender(req *http.Request) (*http.Response, error) { 415 return autorest.SendWithSender(client, req, 416 azure.DoRetryWithRegistration(client.Client)) 417} 418 419// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 420// DeleteDataLakeStoreAccountResponder handles the response to the DeleteDataLakeStoreAccount request. The method always 421// closes the http.Response Body. 422func (client Client) DeleteDataLakeStoreAccountResponder(resp *http.Response) (result autorest.Response, err error) { 423 err = autorest.Respond( 424 resp, 425 client.ByInspecting(), 426 azure.WithErrorUnlessStatusCode(http.StatusOK), 427 autorest.ByClosing()) 428 result.Response = resp 429 return 430} 431 432// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 433// DeleteStorageAccount updates the specified Data Lake Analytics account to remove an Azure Storage account. 434// 435// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 436// accountName is the name of the Data Lake Analytics account from which to remove the Azure Storage account. 437// storageAccountName is the name of the Azure Storage account to remove 438func (client Client) DeleteStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result autorest.Response, err error) { 439 req, err := client.DeleteStorageAccountPreparer(ctx, resourceGroupName, accountName, storageAccountName) 440 if err != nil { 441 err = autorest.NewErrorWithError(err, "account.Client", "DeleteStorageAccount", nil, "Failure preparing request") 442 return 443 } 444 445 resp, err := client.DeleteStorageAccountSender(req) 446 if err != nil { 447 result.Response = resp 448 err = autorest.NewErrorWithError(err, "account.Client", "DeleteStorageAccount", resp, "Failure sending request") 449 return 450 } 451 452 result, err = client.DeleteStorageAccountResponder(resp) 453 if err != nil { 454 err = autorest.NewErrorWithError(err, "account.Client", "DeleteStorageAccount", resp, "Failure responding to request") 455 } 456 457 return 458} 459 460// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 461// DeleteStorageAccountPreparer prepares the DeleteStorageAccount request. 462func (client Client) DeleteStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (*http.Request, error) { 463 pathParameters := map[string]interface{}{ 464 "accountName": autorest.Encode("path", accountName), 465 "resourceGroupName": autorest.Encode("path", resourceGroupName), 466 "storageAccountName": autorest.Encode("path", storageAccountName), 467 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 468 } 469 470 const APIVersion = "2015-10-01-preview" 471 queryParameters := map[string]interface{}{ 472 "api-version": APIVersion, 473 } 474 475 preparer := autorest.CreatePreparer( 476 autorest.AsDelete(), 477 autorest.WithBaseURL(client.BaseURI), 478 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", pathParameters), 479 autorest.WithQueryParameters(queryParameters)) 480 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 481} 482 483// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 484// DeleteStorageAccountSender sends the DeleteStorageAccount request. The method will close the 485// http.Response Body if it receives an error. 486func (client Client) DeleteStorageAccountSender(req *http.Request) (*http.Response, error) { 487 return autorest.SendWithSender(client, req, 488 azure.DoRetryWithRegistration(client.Client)) 489} 490 491// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 492// DeleteStorageAccountResponder handles the response to the DeleteStorageAccount request. The method always 493// closes the http.Response Body. 494func (client Client) DeleteStorageAccountResponder(resp *http.Response) (result autorest.Response, err error) { 495 err = autorest.Respond( 496 resp, 497 client.ByInspecting(), 498 azure.WithErrorUnlessStatusCode(http.StatusOK), 499 autorest.ByClosing()) 500 result.Response = resp 501 return 502} 503 504// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 505// Get gets details of the specified Data Lake Analytics account. 506// 507// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 508// accountName is the name of the Data Lake Analytics account to retrieve. 509func (client Client) Get(ctx context.Context, resourceGroupName string, accountName string) (result DataLakeAnalyticsAccount, err error) { 510 req, err := client.GetPreparer(ctx, resourceGroupName, accountName) 511 if err != nil { 512 err = autorest.NewErrorWithError(err, "account.Client", "Get", nil, "Failure preparing request") 513 return 514 } 515 516 resp, err := client.GetSender(req) 517 if err != nil { 518 result.Response = autorest.Response{Response: resp} 519 err = autorest.NewErrorWithError(err, "account.Client", "Get", resp, "Failure sending request") 520 return 521 } 522 523 result, err = client.GetResponder(resp) 524 if err != nil { 525 err = autorest.NewErrorWithError(err, "account.Client", "Get", resp, "Failure responding to request") 526 } 527 528 return 529} 530 531// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 532// GetPreparer prepares the Get request. 533func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, accountName string) (*http.Request, error) { 534 pathParameters := map[string]interface{}{ 535 "accountName": autorest.Encode("path", accountName), 536 "resourceGroupName": autorest.Encode("path", resourceGroupName), 537 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 538 } 539 540 const APIVersion = "2015-10-01-preview" 541 queryParameters := map[string]interface{}{ 542 "api-version": APIVersion, 543 } 544 545 preparer := autorest.CreatePreparer( 546 autorest.AsGet(), 547 autorest.WithBaseURL(client.BaseURI), 548 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}", pathParameters), 549 autorest.WithQueryParameters(queryParameters)) 550 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 551} 552 553// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 554// GetSender sends the Get request. The method will close the 555// http.Response Body if it receives an error. 556func (client Client) GetSender(req *http.Request) (*http.Response, error) { 557 return autorest.SendWithSender(client, req, 558 azure.DoRetryWithRegistration(client.Client)) 559} 560 561// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 562// GetResponder handles the response to the Get request. The method always 563// closes the http.Response Body. 564func (client Client) GetResponder(resp *http.Response) (result DataLakeAnalyticsAccount, err error) { 565 err = autorest.Respond( 566 resp, 567 client.ByInspecting(), 568 azure.WithErrorUnlessStatusCode(http.StatusOK), 569 autorest.ByUnmarshallingJSON(&result), 570 autorest.ByClosing()) 571 result.Response = autorest.Response{Response: resp} 572 return 573} 574 575// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 576// GetDataLakeStoreAccount gets the specified Data Lake Store account details in the specified Data Lake Analytics 577// account. 578// 579// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 580// accountName is the name of the Data Lake Analytics account from which to retrieve the Data Lake Store account 581// details. dataLakeStoreAccountName is the name of the Data Lake Store account to retrieve 582func (client Client) GetDataLakeStoreAccount(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result DataLakeStoreAccountInfo, err error) { 583 req, err := client.GetDataLakeStoreAccountPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName) 584 if err != nil { 585 err = autorest.NewErrorWithError(err, "account.Client", "GetDataLakeStoreAccount", nil, "Failure preparing request") 586 return 587 } 588 589 resp, err := client.GetDataLakeStoreAccountSender(req) 590 if err != nil { 591 result.Response = autorest.Response{Response: resp} 592 err = autorest.NewErrorWithError(err, "account.Client", "GetDataLakeStoreAccount", resp, "Failure sending request") 593 return 594 } 595 596 result, err = client.GetDataLakeStoreAccountResponder(resp) 597 if err != nil { 598 err = autorest.NewErrorWithError(err, "account.Client", "GetDataLakeStoreAccount", resp, "Failure responding to request") 599 } 600 601 return 602} 603 604// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 605// GetDataLakeStoreAccountPreparer prepares the GetDataLakeStoreAccount request. 606func (client Client) GetDataLakeStoreAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (*http.Request, error) { 607 pathParameters := map[string]interface{}{ 608 "accountName": autorest.Encode("path", accountName), 609 "dataLakeStoreAccountName": autorest.Encode("path", dataLakeStoreAccountName), 610 "resourceGroupName": autorest.Encode("path", resourceGroupName), 611 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 612 } 613 614 const APIVersion = "2015-10-01-preview" 615 queryParameters := map[string]interface{}{ 616 "api-version": APIVersion, 617 } 618 619 preparer := autorest.CreatePreparer( 620 autorest.AsGet(), 621 autorest.WithBaseURL(client.BaseURI), 622 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/{dataLakeStoreAccountName}", pathParameters), 623 autorest.WithQueryParameters(queryParameters)) 624 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 625} 626 627// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 628// GetDataLakeStoreAccountSender sends the GetDataLakeStoreAccount request. The method will close the 629// http.Response Body if it receives an error. 630func (client Client) GetDataLakeStoreAccountSender(req *http.Request) (*http.Response, error) { 631 return autorest.SendWithSender(client, req, 632 azure.DoRetryWithRegistration(client.Client)) 633} 634 635// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 636// GetDataLakeStoreAccountResponder handles the response to the GetDataLakeStoreAccount request. The method always 637// closes the http.Response Body. 638func (client Client) GetDataLakeStoreAccountResponder(resp *http.Response) (result DataLakeStoreAccountInfo, err error) { 639 err = autorest.Respond( 640 resp, 641 client.ByInspecting(), 642 azure.WithErrorUnlessStatusCode(http.StatusOK), 643 autorest.ByUnmarshallingJSON(&result), 644 autorest.ByClosing()) 645 result.Response = autorest.Response{Response: resp} 646 return 647} 648 649// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 650// GetStorageAccount gets the specified Azure Storage account linked to the given Data Lake Analytics account. 651// 652// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 653// accountName is the name of the Data Lake Analytics account from which to retrieve Azure storage account details. 654// storageAccountName is the name of the Azure Storage account for which to retrieve the details. 655func (client Client) GetStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageAccountInfo, err error) { 656 req, err := client.GetStorageAccountPreparer(ctx, resourceGroupName, accountName, storageAccountName) 657 if err != nil { 658 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageAccount", nil, "Failure preparing request") 659 return 660 } 661 662 resp, err := client.GetStorageAccountSender(req) 663 if err != nil { 664 result.Response = autorest.Response{Response: resp} 665 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageAccount", resp, "Failure sending request") 666 return 667 } 668 669 result, err = client.GetStorageAccountResponder(resp) 670 if err != nil { 671 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageAccount", resp, "Failure responding to request") 672 } 673 674 return 675} 676 677// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 678// GetStorageAccountPreparer prepares the GetStorageAccount request. 679func (client Client) GetStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (*http.Request, error) { 680 pathParameters := map[string]interface{}{ 681 "accountName": autorest.Encode("path", accountName), 682 "resourceGroupName": autorest.Encode("path", resourceGroupName), 683 "storageAccountName": autorest.Encode("path", storageAccountName), 684 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 685 } 686 687 const APIVersion = "2015-10-01-preview" 688 queryParameters := map[string]interface{}{ 689 "api-version": APIVersion, 690 } 691 692 preparer := autorest.CreatePreparer( 693 autorest.AsGet(), 694 autorest.WithBaseURL(client.BaseURI), 695 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", pathParameters), 696 autorest.WithQueryParameters(queryParameters)) 697 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 698} 699 700// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 701// GetStorageAccountSender sends the GetStorageAccount request. The method will close the 702// http.Response Body if it receives an error. 703func (client Client) GetStorageAccountSender(req *http.Request) (*http.Response, error) { 704 return autorest.SendWithSender(client, req, 705 azure.DoRetryWithRegistration(client.Client)) 706} 707 708// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 709// GetStorageAccountResponder handles the response to the GetStorageAccount request. The method always 710// closes the http.Response Body. 711func (client Client) GetStorageAccountResponder(resp *http.Response) (result StorageAccountInfo, err error) { 712 err = autorest.Respond( 713 resp, 714 client.ByInspecting(), 715 azure.WithErrorUnlessStatusCode(http.StatusOK), 716 autorest.ByUnmarshallingJSON(&result), 717 autorest.ByClosing()) 718 result.Response = autorest.Response{Response: resp} 719 return 720} 721 722// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 723// GetStorageContainer gets the specified Azure Storage container associated with the given Data Lake Analytics and 724// Azure Storage accounts. 725// 726// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 727// accountName is the name of the Data Lake Analytics account for which to retrieve blob container. 728// storageAccountName is the name of the Azure storage account from which to retrieve the blob container. 729// containerName is the name of the Azure storage container to retrieve 730func (client Client) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result BlobContainer, err error) { 731 req, err := client.GetStorageContainerPreparer(ctx, resourceGroupName, accountName, storageAccountName, containerName) 732 if err != nil { 733 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageContainer", nil, "Failure preparing request") 734 return 735 } 736 737 resp, err := client.GetStorageContainerSender(req) 738 if err != nil { 739 result.Response = autorest.Response{Response: resp} 740 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageContainer", resp, "Failure sending request") 741 return 742 } 743 744 result, err = client.GetStorageContainerResponder(resp) 745 if err != nil { 746 err = autorest.NewErrorWithError(err, "account.Client", "GetStorageContainer", resp, "Failure responding to request") 747 } 748 749 return 750} 751 752// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 753// GetStorageContainerPreparer prepares the GetStorageContainer request. 754func (client Client) GetStorageContainerPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (*http.Request, error) { 755 pathParameters := map[string]interface{}{ 756 "accountName": autorest.Encode("path", accountName), 757 "containerName": autorest.Encode("path", containerName), 758 "resourceGroupName": autorest.Encode("path", resourceGroupName), 759 "storageAccountName": autorest.Encode("path", storageAccountName), 760 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 761 } 762 763 const APIVersion = "2015-10-01-preview" 764 queryParameters := map[string]interface{}{ 765 "api-version": APIVersion, 766 } 767 768 preparer := autorest.CreatePreparer( 769 autorest.AsGet(), 770 autorest.WithBaseURL(client.BaseURI), 771 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}", pathParameters), 772 autorest.WithQueryParameters(queryParameters)) 773 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 774} 775 776// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 777// GetStorageContainerSender sends the GetStorageContainer request. The method will close the 778// http.Response Body if it receives an error. 779func (client Client) GetStorageContainerSender(req *http.Request) (*http.Response, error) { 780 return autorest.SendWithSender(client, req, 781 azure.DoRetryWithRegistration(client.Client)) 782} 783 784// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 785// GetStorageContainerResponder handles the response to the GetStorageContainer request. The method always 786// closes the http.Response Body. 787func (client Client) GetStorageContainerResponder(resp *http.Response) (result BlobContainer, err error) { 788 err = autorest.Respond( 789 resp, 790 client.ByInspecting(), 791 azure.WithErrorUnlessStatusCode(http.StatusOK), 792 autorest.ByUnmarshallingJSON(&result), 793 autorest.ByClosing()) 794 result.Response = autorest.Response{Response: resp} 795 return 796} 797 798// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 799// List gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a 800// link to the next page, if any. 801// 802// filter is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to 803// skip over before returning elements. Optional. expand is oData expansion. Expand related resources in line with 804// the retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category 805// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those 806// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more 807// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the 808// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false 809// to request a count of the matching resources included with the resources in the response, e.g. 810// Categories?$count=true. Optional. search is a free form search. A free-text search expression to match for 811// whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. 812// formatParameter is the desired return format. Return the response in particular formatxii without access to 813// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. 814func (client Client) List(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultPage, err error) { 815 result.fn = client.listNextResults 816 req, err := client.ListPreparer(ctx, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 817 if err != nil { 818 err = autorest.NewErrorWithError(err, "account.Client", "List", nil, "Failure preparing request") 819 return 820 } 821 822 resp, err := client.ListSender(req) 823 if err != nil { 824 result.dlaalr.Response = autorest.Response{Response: resp} 825 err = autorest.NewErrorWithError(err, "account.Client", "List", resp, "Failure sending request") 826 return 827 } 828 829 result.dlaalr, err = client.ListResponder(resp) 830 if err != nil { 831 err = autorest.NewErrorWithError(err, "account.Client", "List", resp, "Failure responding to request") 832 } 833 834 return 835} 836 837// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 838// ListPreparer prepares the List request. 839func (client Client) ListPreparer(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { 840 pathParameters := map[string]interface{}{ 841 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 842 } 843 844 const APIVersion = "2015-10-01-preview" 845 queryParameters := map[string]interface{}{ 846 "api-version": APIVersion, 847 } 848 if len(filter) > 0 { 849 queryParameters["$filter"] = autorest.Encode("query", filter) 850 } 851 if top != nil { 852 queryParameters["$top"] = autorest.Encode("query", *top) 853 } 854 if skip != nil { 855 queryParameters["$skip"] = autorest.Encode("query", *skip) 856 } 857 if len(expand) > 0 { 858 queryParameters["$expand"] = autorest.Encode("query", expand) 859 } 860 if len(selectParameter) > 0 { 861 queryParameters["$select"] = autorest.Encode("query", selectParameter) 862 } 863 if len(orderby) > 0 { 864 queryParameters["$orderby"] = autorest.Encode("query", orderby) 865 } 866 if count != nil { 867 queryParameters["$count"] = autorest.Encode("query", *count) 868 } 869 if len(search) > 0 { 870 queryParameters["$search"] = autorest.Encode("query", search) 871 } 872 if len(formatParameter) > 0 { 873 queryParameters["$format"] = autorest.Encode("query", formatParameter) 874 } 875 876 preparer := autorest.CreatePreparer( 877 autorest.AsGet(), 878 autorest.WithBaseURL(client.BaseURI), 879 autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeAnalytics/accounts", pathParameters), 880 autorest.WithQueryParameters(queryParameters)) 881 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 882} 883 884// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 885// ListSender sends the List request. The method will close the 886// http.Response Body if it receives an error. 887func (client Client) ListSender(req *http.Request) (*http.Response, error) { 888 return autorest.SendWithSender(client, req, 889 azure.DoRetryWithRegistration(client.Client)) 890} 891 892// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 893// ListResponder handles the response to the List request. The method always 894// closes the http.Response Body. 895func (client Client) ListResponder(resp *http.Response) (result DataLakeAnalyticsAccountListResult, err error) { 896 err = autorest.Respond( 897 resp, 898 client.ByInspecting(), 899 azure.WithErrorUnlessStatusCode(http.StatusOK), 900 autorest.ByUnmarshallingJSON(&result), 901 autorest.ByClosing()) 902 result.Response = autorest.Response{Response: resp} 903 return 904} 905 906// listNextResults retrieves the next set of results, if any. 907func (client Client) listNextResults(lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) { 908 req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer() 909 if err != nil { 910 return result, autorest.NewErrorWithError(err, "account.Client", "listNextResults", nil, "Failure preparing next results request") 911 } 912 if req == nil { 913 return 914 } 915 resp, err := client.ListSender(req) 916 if err != nil { 917 result.Response = autorest.Response{Response: resp} 918 return result, autorest.NewErrorWithError(err, "account.Client", "listNextResults", resp, "Failure sending next results request") 919 } 920 result, err = client.ListResponder(resp) 921 if err != nil { 922 err = autorest.NewErrorWithError(err, "account.Client", "listNextResults", resp, "Failure responding to next results request") 923 } 924 return 925} 926 927// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 928// ListComplete enumerates all values, automatically crossing page boundaries as required. 929func (client Client) ListComplete(ctx context.Context, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultIterator, err error) { 930 result.page, err = client.List(ctx, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 931 return 932} 933 934// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 935// ListByResourceGroup gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. 936// This includes a link to the next page, if any. 937// 938// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. filter 939// is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip 940// over before returning elements. Optional. expand is oData expansion. Expand related resources in line with the 941// retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category 942// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those 943// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more 944// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the 945// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false 946// to request a count of the matching resources included with the resources in the response, e.g. 947// Categories?$count=true. Optional. search is a free form search. A free-text search expression to match for 948// whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. 949// formatParameter is the return format. Return the response in particular formatxii without access to request 950// headers for standard content-type negotiation (e.g Orders?$format=json). Optional. 951func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultPage, err error) { 952 result.fn = client.listByResourceGroupNextResults 953 req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 954 if err != nil { 955 err = autorest.NewErrorWithError(err, "account.Client", "ListByResourceGroup", nil, "Failure preparing request") 956 return 957 } 958 959 resp, err := client.ListByResourceGroupSender(req) 960 if err != nil { 961 result.dlaalr.Response = autorest.Response{Response: resp} 962 err = autorest.NewErrorWithError(err, "account.Client", "ListByResourceGroup", resp, "Failure sending request") 963 return 964 } 965 966 result.dlaalr, err = client.ListByResourceGroupResponder(resp) 967 if err != nil { 968 err = autorest.NewErrorWithError(err, "account.Client", "ListByResourceGroup", resp, "Failure responding to request") 969 } 970 971 return 972} 973 974// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 975// ListByResourceGroupPreparer prepares the ListByResourceGroup request. 976func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { 977 pathParameters := map[string]interface{}{ 978 "resourceGroupName": autorest.Encode("path", resourceGroupName), 979 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 980 } 981 982 const APIVersion = "2015-10-01-preview" 983 queryParameters := map[string]interface{}{ 984 "api-version": APIVersion, 985 } 986 if len(filter) > 0 { 987 queryParameters["$filter"] = autorest.Encode("query", filter) 988 } 989 if top != nil { 990 queryParameters["$top"] = autorest.Encode("query", *top) 991 } 992 if skip != nil { 993 queryParameters["$skip"] = autorest.Encode("query", *skip) 994 } 995 if len(expand) > 0 { 996 queryParameters["$expand"] = autorest.Encode("query", expand) 997 } 998 if len(selectParameter) > 0 { 999 queryParameters["$select"] = autorest.Encode("query", selectParameter) 1000 } 1001 if len(orderby) > 0 { 1002 queryParameters["$orderby"] = autorest.Encode("query", orderby) 1003 } 1004 if count != nil { 1005 queryParameters["$count"] = autorest.Encode("query", *count) 1006 } 1007 if len(search) > 0 { 1008 queryParameters["$search"] = autorest.Encode("query", search) 1009 } 1010 if len(formatParameter) > 0 { 1011 queryParameters["$format"] = autorest.Encode("query", formatParameter) 1012 } 1013 1014 preparer := autorest.CreatePreparer( 1015 autorest.AsGet(), 1016 autorest.WithBaseURL(client.BaseURI), 1017 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts", pathParameters), 1018 autorest.WithQueryParameters(queryParameters)) 1019 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1020} 1021 1022// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1023// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the 1024// http.Response Body if it receives an error. 1025func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { 1026 return autorest.SendWithSender(client, req, 1027 azure.DoRetryWithRegistration(client.Client)) 1028} 1029 1030// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1031// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always 1032// closes the http.Response Body. 1033func (client Client) ListByResourceGroupResponder(resp *http.Response) (result DataLakeAnalyticsAccountListResult, err error) { 1034 err = autorest.Respond( 1035 resp, 1036 client.ByInspecting(), 1037 azure.WithErrorUnlessStatusCode(http.StatusOK), 1038 autorest.ByUnmarshallingJSON(&result), 1039 autorest.ByClosing()) 1040 result.Response = autorest.Response{Response: resp} 1041 return 1042} 1043 1044// listByResourceGroupNextResults retrieves the next set of results, if any. 1045func (client Client) listByResourceGroupNextResults(lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) { 1046 req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer() 1047 if err != nil { 1048 return result, autorest.NewErrorWithError(err, "account.Client", "listByResourceGroupNextResults", nil, "Failure preparing next results request") 1049 } 1050 if req == nil { 1051 return 1052 } 1053 resp, err := client.ListByResourceGroupSender(req) 1054 if err != nil { 1055 result.Response = autorest.Response{Response: resp} 1056 return result, autorest.NewErrorWithError(err, "account.Client", "listByResourceGroupNextResults", resp, "Failure sending next results request") 1057 } 1058 result, err = client.ListByResourceGroupResponder(resp) 1059 if err != nil { 1060 err = autorest.NewErrorWithError(err, "account.Client", "listByResourceGroupNextResults", resp, "Failure responding to next results request") 1061 } 1062 return 1063} 1064 1065// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1066// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. 1067func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListResultIterator, err error) { 1068 result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 1069 return 1070} 1071 1072// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1073// ListDataLakeStoreAccounts gets the first page of Data Lake Store accounts linked to the specified Data Lake 1074// Analytics account. The response includes a link to the next page, if any. 1075// 1076// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 1077// accountName is the name of the Data Lake Analytics account for which to list Data Lake Store accounts. filter is 1078// oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over 1079// before returning elements. Optional. expand is oData expansion. Expand related resources in line with the 1080// retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category 1081// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those 1082// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more 1083// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the 1084// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false 1085// to request a count of the matching resources included with the resources in the response, e.g. 1086// Categories?$count=true. Optional. search is a free form search. A free-text search expression to match for 1087// whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. 1088// formatParameter is the desired return format. Return the response in particular formatxii without access to 1089// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. 1090func (client Client) ListDataLakeStoreAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListDataLakeStoreResultPage, err error) { 1091 result.fn = client.listDataLakeStoreAccountsNextResults 1092 req, err := client.ListDataLakeStoreAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 1093 if err != nil { 1094 err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", nil, "Failure preparing request") 1095 return 1096 } 1097 1098 resp, err := client.ListDataLakeStoreAccountsSender(req) 1099 if err != nil { 1100 result.dlaaldlsr.Response = autorest.Response{Response: resp} 1101 err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", resp, "Failure sending request") 1102 return 1103 } 1104 1105 result.dlaaldlsr, err = client.ListDataLakeStoreAccountsResponder(resp) 1106 if err != nil { 1107 err = autorest.NewErrorWithError(err, "account.Client", "ListDataLakeStoreAccounts", resp, "Failure responding to request") 1108 } 1109 1110 return 1111} 1112 1113// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1114// ListDataLakeStoreAccountsPreparer prepares the ListDataLakeStoreAccounts request. 1115func (client Client) ListDataLakeStoreAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { 1116 pathParameters := map[string]interface{}{ 1117 "accountName": autorest.Encode("path", accountName), 1118 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1119 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1120 } 1121 1122 const APIVersion = "2015-10-01-preview" 1123 queryParameters := map[string]interface{}{ 1124 "api-version": APIVersion, 1125 } 1126 if len(filter) > 0 { 1127 queryParameters["$filter"] = autorest.Encode("query", filter) 1128 } 1129 if top != nil { 1130 queryParameters["$top"] = autorest.Encode("query", *top) 1131 } 1132 if skip != nil { 1133 queryParameters["$skip"] = autorest.Encode("query", *skip) 1134 } 1135 if len(expand) > 0 { 1136 queryParameters["$expand"] = autorest.Encode("query", expand) 1137 } 1138 if len(selectParameter) > 0 { 1139 queryParameters["$select"] = autorest.Encode("query", selectParameter) 1140 } 1141 if len(orderby) > 0 { 1142 queryParameters["$orderby"] = autorest.Encode("query", orderby) 1143 } 1144 if count != nil { 1145 queryParameters["$count"] = autorest.Encode("query", *count) 1146 } 1147 if len(search) > 0 { 1148 queryParameters["$search"] = autorest.Encode("query", search) 1149 } 1150 if len(formatParameter) > 0 { 1151 queryParameters["$format"] = autorest.Encode("query", formatParameter) 1152 } 1153 1154 preparer := autorest.CreatePreparer( 1155 autorest.AsGet(), 1156 autorest.WithBaseURL(client.BaseURI), 1157 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/DataLakeStoreAccounts/", pathParameters), 1158 autorest.WithQueryParameters(queryParameters)) 1159 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1160} 1161 1162// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1163// ListDataLakeStoreAccountsSender sends the ListDataLakeStoreAccounts request. The method will close the 1164// http.Response Body if it receives an error. 1165func (client Client) ListDataLakeStoreAccountsSender(req *http.Request) (*http.Response, error) { 1166 return autorest.SendWithSender(client, req, 1167 azure.DoRetryWithRegistration(client.Client)) 1168} 1169 1170// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1171// ListDataLakeStoreAccountsResponder handles the response to the ListDataLakeStoreAccounts request. The method always 1172// closes the http.Response Body. 1173func (client Client) ListDataLakeStoreAccountsResponder(resp *http.Response) (result DataLakeAnalyticsAccountListDataLakeStoreResult, err error) { 1174 err = autorest.Respond( 1175 resp, 1176 client.ByInspecting(), 1177 azure.WithErrorUnlessStatusCode(http.StatusOK), 1178 autorest.ByUnmarshallingJSON(&result), 1179 autorest.ByClosing()) 1180 result.Response = autorest.Response{Response: resp} 1181 return 1182} 1183 1184// listDataLakeStoreAccountsNextResults retrieves the next set of results, if any. 1185func (client Client) listDataLakeStoreAccountsNextResults(lastResults DataLakeAnalyticsAccountListDataLakeStoreResult) (result DataLakeAnalyticsAccountListDataLakeStoreResult, err error) { 1186 req, err := lastResults.dataLakeAnalyticsAccountListDataLakeStoreResultPreparer() 1187 if err != nil { 1188 return result, autorest.NewErrorWithError(err, "account.Client", "listDataLakeStoreAccountsNextResults", nil, "Failure preparing next results request") 1189 } 1190 if req == nil { 1191 return 1192 } 1193 resp, err := client.ListDataLakeStoreAccountsSender(req) 1194 if err != nil { 1195 result.Response = autorest.Response{Response: resp} 1196 return result, autorest.NewErrorWithError(err, "account.Client", "listDataLakeStoreAccountsNextResults", resp, "Failure sending next results request") 1197 } 1198 result, err = client.ListDataLakeStoreAccountsResponder(resp) 1199 if err != nil { 1200 err = autorest.NewErrorWithError(err, "account.Client", "listDataLakeStoreAccountsNextResults", resp, "Failure responding to next results request") 1201 } 1202 return 1203} 1204 1205// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1206// ListDataLakeStoreAccountsComplete enumerates all values, automatically crossing page boundaries as required. 1207func (client Client) ListDataLakeStoreAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListDataLakeStoreResultIterator, err error) { 1208 result.page, err = client.ListDataLakeStoreAccounts(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 1209 return 1210} 1211 1212// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1213// ListSasTokens gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and 1214// container combination. 1215// 1216// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 1217// accountName is the name of the Data Lake Analytics account from which an Azure Storage account's SAS token is 1218// being requested. storageAccountName is the name of the Azure storage account for which the SAS token is being 1219// requested. containerName is the name of the Azure storage container for which the SAS token is being requested. 1220func (client Client) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result ListSasTokensResultPage, err error) { 1221 result.fn = client.listSasTokensNextResults 1222 req, err := client.ListSasTokensPreparer(ctx, resourceGroupName, accountName, storageAccountName, containerName) 1223 if err != nil { 1224 err = autorest.NewErrorWithError(err, "account.Client", "ListSasTokens", nil, "Failure preparing request") 1225 return 1226 } 1227 1228 resp, err := client.ListSasTokensSender(req) 1229 if err != nil { 1230 result.lstr.Response = autorest.Response{Response: resp} 1231 err = autorest.NewErrorWithError(err, "account.Client", "ListSasTokens", resp, "Failure sending request") 1232 return 1233 } 1234 1235 result.lstr, err = client.ListSasTokensResponder(resp) 1236 if err != nil { 1237 err = autorest.NewErrorWithError(err, "account.Client", "ListSasTokens", resp, "Failure responding to request") 1238 } 1239 1240 return 1241} 1242 1243// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1244// ListSasTokensPreparer prepares the ListSasTokens request. 1245func (client Client) ListSasTokensPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (*http.Request, error) { 1246 pathParameters := map[string]interface{}{ 1247 "accountName": autorest.Encode("path", accountName), 1248 "containerName": autorest.Encode("path", containerName), 1249 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1250 "storageAccountName": autorest.Encode("path", storageAccountName), 1251 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1252 } 1253 1254 const APIVersion = "2015-10-01-preview" 1255 queryParameters := map[string]interface{}{ 1256 "api-version": APIVersion, 1257 } 1258 1259 preparer := autorest.CreatePreparer( 1260 autorest.AsPost(), 1261 autorest.WithBaseURL(client.BaseURI), 1262 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens", pathParameters), 1263 autorest.WithQueryParameters(queryParameters)) 1264 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1265} 1266 1267// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1268// ListSasTokensSender sends the ListSasTokens request. The method will close the 1269// http.Response Body if it receives an error. 1270func (client Client) ListSasTokensSender(req *http.Request) (*http.Response, error) { 1271 return autorest.SendWithSender(client, req, 1272 azure.DoRetryWithRegistration(client.Client)) 1273} 1274 1275// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1276// ListSasTokensResponder handles the response to the ListSasTokens request. The method always 1277// closes the http.Response Body. 1278func (client Client) ListSasTokensResponder(resp *http.Response) (result ListSasTokensResult, err error) { 1279 err = autorest.Respond( 1280 resp, 1281 client.ByInspecting(), 1282 azure.WithErrorUnlessStatusCode(http.StatusOK), 1283 autorest.ByUnmarshallingJSON(&result), 1284 autorest.ByClosing()) 1285 result.Response = autorest.Response{Response: resp} 1286 return 1287} 1288 1289// listSasTokensNextResults retrieves the next set of results, if any. 1290func (client Client) listSasTokensNextResults(lastResults ListSasTokensResult) (result ListSasTokensResult, err error) { 1291 req, err := lastResults.listSasTokensResultPreparer() 1292 if err != nil { 1293 return result, autorest.NewErrorWithError(err, "account.Client", "listSasTokensNextResults", nil, "Failure preparing next results request") 1294 } 1295 if req == nil { 1296 return 1297 } 1298 resp, err := client.ListSasTokensSender(req) 1299 if err != nil { 1300 result.Response = autorest.Response{Response: resp} 1301 return result, autorest.NewErrorWithError(err, "account.Client", "listSasTokensNextResults", resp, "Failure sending next results request") 1302 } 1303 result, err = client.ListSasTokensResponder(resp) 1304 if err != nil { 1305 err = autorest.NewErrorWithError(err, "account.Client", "listSasTokensNextResults", resp, "Failure responding to next results request") 1306 } 1307 return 1308} 1309 1310// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1311// ListSasTokensComplete enumerates all values, automatically crossing page boundaries as required. 1312func (client Client) ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result ListSasTokensResultIterator, err error) { 1313 result.page, err = client.ListSasTokens(ctx, resourceGroupName, accountName, storageAccountName, containerName) 1314 return 1315} 1316 1317// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1318// ListStorageAccounts gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake 1319// Analytics account. The response includes a link to the next page, if any. 1320// 1321// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 1322// accountName is the name of the Data Lake Analytics account for which to list Azure Storage accounts. filter is 1323// the OData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip 1324// over before returning elements. Optional. expand is oData expansion. Expand related resources in line with the 1325// retrieved resources, e.g. Categories/$expand=Products would expand Product data in line with each Category 1326// entry. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those 1327// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more 1328// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the 1329// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false 1330// to request a count of the matching resources included with the resources in the response, e.g. 1331// Categories?$count=true. Optional. search is a free form search. A free-text search expression to match for 1332// whether a particular entry should be included in the feed, e.g. Categories?$search=blue OR green. Optional. 1333// formatParameter is the desired return format. Return the response in particular formatxii without access to 1334// request headers for standard content-type negotiation (e.g Orders?$format=json). Optional. 1335func (client Client) ListStorageAccounts(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListStorageAccountsResultPage, err error) { 1336 result.fn = client.listStorageAccountsNextResults 1337 req, err := client.ListStorageAccountsPreparer(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 1338 if err != nil { 1339 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", nil, "Failure preparing request") 1340 return 1341 } 1342 1343 resp, err := client.ListStorageAccountsSender(req) 1344 if err != nil { 1345 result.dlaalsar.Response = autorest.Response{Response: resp} 1346 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", resp, "Failure sending request") 1347 return 1348 } 1349 1350 result.dlaalsar, err = client.ListStorageAccountsResponder(resp) 1351 if err != nil { 1352 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageAccounts", resp, "Failure responding to request") 1353 } 1354 1355 return 1356} 1357 1358// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1359// ListStorageAccountsPreparer prepares the ListStorageAccounts request. 1360func (client Client) ListStorageAccountsPreparer(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (*http.Request, error) { 1361 pathParameters := map[string]interface{}{ 1362 "accountName": autorest.Encode("path", accountName), 1363 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1364 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1365 } 1366 1367 const APIVersion = "2015-10-01-preview" 1368 queryParameters := map[string]interface{}{ 1369 "api-version": APIVersion, 1370 } 1371 if len(filter) > 0 { 1372 queryParameters["$filter"] = autorest.Encode("query", filter) 1373 } 1374 if top != nil { 1375 queryParameters["$top"] = autorest.Encode("query", *top) 1376 } 1377 if skip != nil { 1378 queryParameters["$skip"] = autorest.Encode("query", *skip) 1379 } 1380 if len(expand) > 0 { 1381 queryParameters["$expand"] = autorest.Encode("query", expand) 1382 } 1383 if len(selectParameter) > 0 { 1384 queryParameters["$select"] = autorest.Encode("query", selectParameter) 1385 } 1386 if len(orderby) > 0 { 1387 queryParameters["$orderby"] = autorest.Encode("query", orderby) 1388 } 1389 if count != nil { 1390 queryParameters["$count"] = autorest.Encode("query", *count) 1391 } 1392 if len(search) > 0 { 1393 queryParameters["$search"] = autorest.Encode("query", search) 1394 } 1395 if len(formatParameter) > 0 { 1396 queryParameters["$format"] = autorest.Encode("query", formatParameter) 1397 } 1398 1399 preparer := autorest.CreatePreparer( 1400 autorest.AsGet(), 1401 autorest.WithBaseURL(client.BaseURI), 1402 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/", pathParameters), 1403 autorest.WithQueryParameters(queryParameters)) 1404 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1405} 1406 1407// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1408// ListStorageAccountsSender sends the ListStorageAccounts request. The method will close the 1409// http.Response Body if it receives an error. 1410func (client Client) ListStorageAccountsSender(req *http.Request) (*http.Response, error) { 1411 return autorest.SendWithSender(client, req, 1412 azure.DoRetryWithRegistration(client.Client)) 1413} 1414 1415// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1416// ListStorageAccountsResponder handles the response to the ListStorageAccounts request. The method always 1417// closes the http.Response Body. 1418func (client Client) ListStorageAccountsResponder(resp *http.Response) (result DataLakeAnalyticsAccountListStorageAccountsResult, err error) { 1419 err = autorest.Respond( 1420 resp, 1421 client.ByInspecting(), 1422 azure.WithErrorUnlessStatusCode(http.StatusOK), 1423 autorest.ByUnmarshallingJSON(&result), 1424 autorest.ByClosing()) 1425 result.Response = autorest.Response{Response: resp} 1426 return 1427} 1428 1429// listStorageAccountsNextResults retrieves the next set of results, if any. 1430func (client Client) listStorageAccountsNextResults(lastResults DataLakeAnalyticsAccountListStorageAccountsResult) (result DataLakeAnalyticsAccountListStorageAccountsResult, err error) { 1431 req, err := lastResults.dataLakeAnalyticsAccountListStorageAccountsResultPreparer() 1432 if err != nil { 1433 return result, autorest.NewErrorWithError(err, "account.Client", "listStorageAccountsNextResults", nil, "Failure preparing next results request") 1434 } 1435 if req == nil { 1436 return 1437 } 1438 resp, err := client.ListStorageAccountsSender(req) 1439 if err != nil { 1440 result.Response = autorest.Response{Response: resp} 1441 return result, autorest.NewErrorWithError(err, "account.Client", "listStorageAccountsNextResults", resp, "Failure sending next results request") 1442 } 1443 result, err = client.ListStorageAccountsResponder(resp) 1444 if err != nil { 1445 err = autorest.NewErrorWithError(err, "account.Client", "listStorageAccountsNextResults", resp, "Failure responding to next results request") 1446 } 1447 return 1448} 1449 1450// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1451// ListStorageAccountsComplete enumerates all values, automatically crossing page boundaries as required. 1452func (client Client) ListStorageAccountsComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, expand string, selectParameter string, orderby string, count *bool, search string, formatParameter string) (result DataLakeAnalyticsAccountListStorageAccountsResultIterator, err error) { 1453 result.page, err = client.ListStorageAccounts(ctx, resourceGroupName, accountName, filter, top, skip, expand, selectParameter, orderby, count, search, formatParameter) 1454 return 1455} 1456 1457// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1458// ListStorageContainers lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics 1459// and Azure Storage account combination. The response includes a link to the next page of results, if any. 1460// 1461// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 1462// accountName is the name of the Data Lake Analytics account for which to list Azure Storage blob containers. 1463// storageAccountName is the name of the Azure storage account from which to list blob containers. 1464func (client Client) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result ListBlobContainersResultPage, err error) { 1465 result.fn = client.listStorageContainersNextResults 1466 req, err := client.ListStorageContainersPreparer(ctx, resourceGroupName, accountName, storageAccountName) 1467 if err != nil { 1468 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageContainers", nil, "Failure preparing request") 1469 return 1470 } 1471 1472 resp, err := client.ListStorageContainersSender(req) 1473 if err != nil { 1474 result.lbcr.Response = autorest.Response{Response: resp} 1475 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageContainers", resp, "Failure sending request") 1476 return 1477 } 1478 1479 result.lbcr, err = client.ListStorageContainersResponder(resp) 1480 if err != nil { 1481 err = autorest.NewErrorWithError(err, "account.Client", "ListStorageContainers", resp, "Failure responding to request") 1482 } 1483 1484 return 1485} 1486 1487// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1488// ListStorageContainersPreparer prepares the ListStorageContainers request. 1489func (client Client) ListStorageContainersPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (*http.Request, error) { 1490 pathParameters := map[string]interface{}{ 1491 "accountName": autorest.Encode("path", accountName), 1492 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1493 "storageAccountName": autorest.Encode("path", storageAccountName), 1494 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1495 } 1496 1497 const APIVersion = "2015-10-01-preview" 1498 queryParameters := map[string]interface{}{ 1499 "api-version": APIVersion, 1500 } 1501 1502 preparer := autorest.CreatePreparer( 1503 autorest.AsGet(), 1504 autorest.WithBaseURL(client.BaseURI), 1505 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers", pathParameters), 1506 autorest.WithQueryParameters(queryParameters)) 1507 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1508} 1509 1510// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1511// ListStorageContainersSender sends the ListStorageContainers request. The method will close the 1512// http.Response Body if it receives an error. 1513func (client Client) ListStorageContainersSender(req *http.Request) (*http.Response, error) { 1514 return autorest.SendWithSender(client, req, 1515 azure.DoRetryWithRegistration(client.Client)) 1516} 1517 1518// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1519// ListStorageContainersResponder handles the response to the ListStorageContainers request. The method always 1520// closes the http.Response Body. 1521func (client Client) ListStorageContainersResponder(resp *http.Response) (result ListBlobContainersResult, err error) { 1522 err = autorest.Respond( 1523 resp, 1524 client.ByInspecting(), 1525 azure.WithErrorUnlessStatusCode(http.StatusOK), 1526 autorest.ByUnmarshallingJSON(&result), 1527 autorest.ByClosing()) 1528 result.Response = autorest.Response{Response: resp} 1529 return 1530} 1531 1532// listStorageContainersNextResults retrieves the next set of results, if any. 1533func (client Client) listStorageContainersNextResults(lastResults ListBlobContainersResult) (result ListBlobContainersResult, err error) { 1534 req, err := lastResults.listBlobContainersResultPreparer() 1535 if err != nil { 1536 return result, autorest.NewErrorWithError(err, "account.Client", "listStorageContainersNextResults", nil, "Failure preparing next results request") 1537 } 1538 if req == nil { 1539 return 1540 } 1541 resp, err := client.ListStorageContainersSender(req) 1542 if err != nil { 1543 result.Response = autorest.Response{Response: resp} 1544 return result, autorest.NewErrorWithError(err, "account.Client", "listStorageContainersNextResults", resp, "Failure sending next results request") 1545 } 1546 result, err = client.ListStorageContainersResponder(resp) 1547 if err != nil { 1548 err = autorest.NewErrorWithError(err, "account.Client", "listStorageContainersNextResults", resp, "Failure responding to next results request") 1549 } 1550 return 1551} 1552 1553// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1554// ListStorageContainersComplete enumerates all values, automatically crossing page boundaries as required. 1555func (client Client) ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result ListBlobContainersResultIterator, err error) { 1556 result.page, err = client.ListStorageContainers(ctx, resourceGroupName, accountName, storageAccountName) 1557 return 1558} 1559 1560// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1561// Update updates the Data Lake Analytics account object specified by the accountName with the contents of the account 1562// object. 1563// 1564// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. name is 1565// the name of the Data Lake Analytics account to update. parameters is parameters supplied to the update Data Lake 1566// Analytics account operation. 1567func (client Client) Update(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (result UpdateFuture, err error) { 1568 req, err := client.UpdatePreparer(ctx, resourceGroupName, name, parameters) 1569 if err != nil { 1570 err = autorest.NewErrorWithError(err, "account.Client", "Update", nil, "Failure preparing request") 1571 return 1572 } 1573 1574 result, err = client.UpdateSender(req) 1575 if err != nil { 1576 err = autorest.NewErrorWithError(err, "account.Client", "Update", result.Response(), "Failure sending request") 1577 return 1578 } 1579 1580 return 1581} 1582 1583// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1584// UpdatePreparer prepares the Update request. 1585func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, parameters DataLakeAnalyticsAccount) (*http.Request, error) { 1586 pathParameters := map[string]interface{}{ 1587 "name": autorest.Encode("path", name), 1588 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1589 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1590 } 1591 1592 const APIVersion = "2015-10-01-preview" 1593 queryParameters := map[string]interface{}{ 1594 "api-version": APIVersion, 1595 } 1596 1597 preparer := autorest.CreatePreparer( 1598 autorest.AsContentType("application/json; charset=utf-8"), 1599 autorest.AsPatch(), 1600 autorest.WithBaseURL(client.BaseURI), 1601 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{name}", pathParameters), 1602 autorest.WithJSON(parameters), 1603 autorest.WithQueryParameters(queryParameters)) 1604 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1605} 1606 1607// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1608// UpdateSender sends the Update request. The method will close the 1609// http.Response Body if it receives an error. 1610func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) { 1611 sender := autorest.DecorateSender(client, azure.DoRetryWithRegistration(client.Client)) 1612 future.Future = azure.NewFuture(req) 1613 future.req = req 1614 _, err = future.Done(sender) 1615 if err != nil { 1616 return 1617 } 1618 err = autorest.Respond(future.Response(), 1619 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated)) 1620 return 1621} 1622 1623// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1624// UpdateResponder handles the response to the Update request. The method always 1625// closes the http.Response Body. 1626func (client Client) UpdateResponder(resp *http.Response) (result DataLakeAnalyticsAccount, err error) { 1627 err = autorest.Respond( 1628 resp, 1629 client.ByInspecting(), 1630 azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), 1631 autorest.ByUnmarshallingJSON(&result), 1632 autorest.ByClosing()) 1633 result.Response = autorest.Response{Response: resp} 1634 return 1635} 1636 1637// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1638// UpdateStorageAccount updates the Data Lake Analytics account to replace Azure Storage blob account details, such as 1639// the access key and/or suffix. 1640// 1641// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. 1642// accountName is the name of the Data Lake Analytics account to modify storage accounts in storageAccountName is 1643// the Azure Storage account to modify parameters is the parameters containing the access key and suffix to update 1644// the storage account with. 1645func (client Client) UpdateStorageAccount(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) { 1646 req, err := client.UpdateStorageAccountPreparer(ctx, resourceGroupName, accountName, storageAccountName, parameters) 1647 if err != nil { 1648 err = autorest.NewErrorWithError(err, "account.Client", "UpdateStorageAccount", nil, "Failure preparing request") 1649 return 1650 } 1651 1652 resp, err := client.UpdateStorageAccountSender(req) 1653 if err != nil { 1654 result.Response = resp 1655 err = autorest.NewErrorWithError(err, "account.Client", "UpdateStorageAccount", resp, "Failure sending request") 1656 return 1657 } 1658 1659 result, err = client.UpdateStorageAccountResponder(resp) 1660 if err != nil { 1661 err = autorest.NewErrorWithError(err, "account.Client", "UpdateStorageAccount", resp, "Failure responding to request") 1662 } 1663 1664 return 1665} 1666 1667// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1668// UpdateStorageAccountPreparer prepares the UpdateStorageAccount request. 1669func (client Client) UpdateStorageAccountPreparer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (*http.Request, error) { 1670 pathParameters := map[string]interface{}{ 1671 "accountName": autorest.Encode("path", accountName), 1672 "resourceGroupName": autorest.Encode("path", resourceGroupName), 1673 "storageAccountName": autorest.Encode("path", storageAccountName), 1674 "subscriptionId": autorest.Encode("path", client.SubscriptionID), 1675 } 1676 1677 const APIVersion = "2015-10-01-preview" 1678 queryParameters := map[string]interface{}{ 1679 "api-version": APIVersion, 1680 } 1681 1682 preparer := autorest.CreatePreparer( 1683 autorest.AsContentType("application/json; charset=utf-8"), 1684 autorest.AsPatch(), 1685 autorest.WithBaseURL(client.BaseURI), 1686 autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}", pathParameters), 1687 autorest.WithJSON(parameters), 1688 autorest.WithQueryParameters(queryParameters)) 1689 return preparer.Prepare((&http.Request{}).WithContext(ctx)) 1690} 1691 1692// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1693// UpdateStorageAccountSender sends the UpdateStorageAccount request. The method will close the 1694// http.Response Body if it receives an error. 1695func (client Client) UpdateStorageAccountSender(req *http.Request) (*http.Response, error) { 1696 return autorest.SendWithSender(client, req, 1697 azure.DoRetryWithRegistration(client.Client)) 1698} 1699 1700// Deprecated: Please use package github.com/Azure/azure-sdk-for-go/services/preview/datalake/analytics/mgmt/2015-10-01-preview/account instead. 1701// UpdateStorageAccountResponder handles the response to the UpdateStorageAccount request. The method always 1702// closes the http.Response Body. 1703func (client Client) UpdateStorageAccountResponder(resp *http.Response) (result autorest.Response, err error) { 1704 err = autorest.Respond( 1705 resp, 1706 client.ByInspecting(), 1707 azure.WithErrorUnlessStatusCode(http.StatusOK), 1708 autorest.ByClosing()) 1709 result.Response = resp 1710 return 1711} 1712