Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerated "@azure/arm-storage" SDK.
  • Loading branch information
kpajdzik committed Nov 14, 2018
commit 5cb36bd99a87c04b18ca2e0d63ffb70a05c3be4d
7 changes: 7 additions & 0 deletions packages/@azure/arm-storage/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,13 @@ export interface StorageAccount extends TrackedResource {
* sets to true.
*/
isHnsEnabled?: boolean;
/**
* @member {boolean} [failoverInProgress] If the failover is in progress, the
* value will be true, otherwise, it will be null.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
readonly failoverInProgress?: boolean;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions packages/@azure/arm-storage/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,13 @@ export const StorageAccount: msRest.CompositeMapper = {
type: {
name: "Boolean"
}
},
failoverInProgress: {
readOnly: true,
serializedName: "properties.failoverInProgress",
type: {
name: "Boolean"
}
}
}
}
Expand Down
64 changes: 64 additions & 0 deletions packages/@azure/arm-storage/lib/operations/storageAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,23 @@ export class StorageAccounts {
callback) as Promise<Models.StorageAccountsListServiceSASResponse>;
}

/**
* Failover request can be triggered for a storage account in case of availability issues. The
* failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS
* accounts. The secondary cluster will become primary after failover.
* @param resourceGroupName The name of the resource group within the user's subscription. The name
* is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage
* account names must be between 3 and 24 characters in length and use numbers and lower-case
* letters only.
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
failover(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
return this.beginFailover(resourceGroupName,accountName,options)
.then(lroPoller => lroPoller.pollUntilFinished());
}

/**
* Asynchronously creates a new storage account with the specified parameters. If an account is
* already created and a subsequent create request is issued with different properties, the account
Expand All @@ -471,6 +488,29 @@ export class StorageAccounts {
beginCreateOperationSpec,
options);
}

/**
* Failover request can be triggered for a storage account in case of availability issues. The
* failover occurs from the storage account's primary cluster to secondary cluster for RA-GRS
* accounts. The secondary cluster will become primary after failover.
* @param resourceGroupName The name of the resource group within the user's subscription. The name
* is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage
* account names must be between 3 and 24 characters in length and use numbers and lower-case
* letters only.
* @param [options] The optional parameters
* @returns Promise<msRestAzure.LROPoller>
*/
beginFailover(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
accountName,
options
},
beginFailoverOperationSpec,
options);
}
}

// Operation Specifications
Expand Down Expand Up @@ -790,3 +830,27 @@ const beginCreateOperationSpec: msRest.OperationSpec = {
},
serializer
};

const beginFailoverOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover",
urlParameters: [
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion0
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
202: {},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};