Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit 95c8ae3

Browse files
authored
Generated from 1f26996e492bf786c2acd06e0a4e46159c52df70 (#4091)
Adds storage account quick failover API
1 parent c54d79a commit 95c8ae3

File tree

4 files changed

+579
-0
lines changed

4 files changed

+579
-0
lines changed

lib/services/storageManagement2/lib/models/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,8 @@ export interface TrackedResource extends Resource {
793793
* 'Allow', 'Deny'
794794
* @member {boolean} [isHnsEnabled] Account HierarchicalNamespace enabled if
795795
* sets to true.
796+
* @member {boolean} [failoverInProgress] If the failover is in progress, the
797+
* value will be true, otherwise, it will be null.
796798
*/
797799
export interface StorageAccount extends TrackedResource {
798800
readonly sku?: Sku;
@@ -814,6 +816,7 @@ export interface StorageAccount extends TrackedResource {
814816
enableHttpsTrafficOnly?: boolean;
815817
readonly networkRuleSet?: NetworkRuleSet;
816818
isHnsEnabled?: boolean;
819+
readonly failoverInProgress?: boolean;
817820
}
818821

819822
/**

lib/services/storageManagement2/lib/models/storageAccount.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ class StorageAccount extends models['TrackedResource'] {
168168
* include: 'Allow', 'Deny'
169169
* @member {boolean} [isHnsEnabled] Account HierarchicalNamespace enabled if
170170
* sets to true.
171+
* @member {boolean} [failoverInProgress] If the failover is in progress, the
172+
* value will be true, otherwise, it will be null.
171173
*/
172174
constructor() {
173175
super();
@@ -391,6 +393,14 @@ class StorageAccount extends models['TrackedResource'] {
391393
type: {
392394
name: 'Boolean'
393395
}
396+
},
397+
failoverInProgress: {
398+
required: false,
399+
readOnly: true,
400+
serializedName: 'properties.failoverInProgress',
401+
type: {
402+
name: 'Boolean'
403+
}
394404
}
395405
}
396406
}

lib/services/storageManagement2/lib/operations/index.d.ts

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,76 @@ export interface StorageAccounts {
14661466
listServiceSAS(resourceGroupName: string, accountName: string, parameters: models.ServiceSasParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ListServiceSasResponse>): void;
14671467

14681468

1469+
/**
1470+
* Failover request can be triggered for a storage account in case of
1471+
* availability issues. The failover occurs from the storage account's primary
1472+
* cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
1473+
* become primary after failover.
1474+
*
1475+
* @param {string} resourceGroupName The name of the resource group within the
1476+
* user's subscription. The name is case insensitive.
1477+
*
1478+
* @param {string} accountName The name of the storage account within the
1479+
* specified resource group. Storage account names must be between 3 and 24
1480+
* characters in length and use numbers and lower-case letters only.
1481+
*
1482+
* @param {object} [options] Optional Parameters.
1483+
*
1484+
* @param {object} [options.customHeaders] Headers that will be added to the
1485+
* request
1486+
*
1487+
* @returns {Promise} A promise is returned
1488+
*
1489+
* @resolve {HttpOperationResponse<null>} - The deserialized result object.
1490+
*
1491+
* @reject {Error|ServiceError} - The error object.
1492+
*/
1493+
failoverWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
1494+
1495+
/**
1496+
* Failover request can be triggered for a storage account in case of
1497+
* availability issues. The failover occurs from the storage account's primary
1498+
* cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
1499+
* become primary after failover.
1500+
*
1501+
* @param {string} resourceGroupName The name of the resource group within the
1502+
* user's subscription. The name is case insensitive.
1503+
*
1504+
* @param {string} accountName The name of the storage account within the
1505+
* specified resource group. Storage account names must be between 3 and 24
1506+
* characters in length and use numbers and lower-case letters only.
1507+
*
1508+
* @param {object} [options] Optional Parameters.
1509+
*
1510+
* @param {object} [options.customHeaders] Headers that will be added to the
1511+
* request
1512+
*
1513+
* @param {ServiceCallback} [optionalCallback] - The optional callback.
1514+
*
1515+
* @returns {ServiceCallback|Promise} If a callback was passed as the last
1516+
* parameter then it returns the callback else returns a Promise.
1517+
*
1518+
* {Promise} A promise is returned.
1519+
*
1520+
* @resolve {null} - The deserialized result object.
1521+
*
1522+
* @reject {Error|ServiceError} - The error object.
1523+
*
1524+
* {ServiceCallback} optionalCallback(err, result, request, response)
1525+
*
1526+
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
1527+
*
1528+
* {null} [result] - The deserialized result object if an error did not occur.
1529+
*
1530+
* {WebResource} [request] - The HTTP Request object if an error did not occur.
1531+
*
1532+
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
1533+
*/
1534+
failover(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
1535+
failover(resourceGroupName: string, accountName: string, callback: ServiceCallback<void>): void;
1536+
failover(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
1537+
1538+
14691539
/**
14701540
* Asynchronously creates a new storage account with the specified parameters.
14711541
* If an account is already created and a subsequent create request is issued
@@ -1751,6 +1821,76 @@ export interface StorageAccounts {
17511821
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.StorageAccount>;
17521822
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, callback: ServiceCallback<models.StorageAccount>): void;
17531823
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.StorageAccount>): void;
1824+
1825+
1826+
/**
1827+
* Failover request can be triggered for a storage account in case of
1828+
* availability issues. The failover occurs from the storage account's primary
1829+
* cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
1830+
* become primary after failover.
1831+
*
1832+
* @param {string} resourceGroupName The name of the resource group within the
1833+
* user's subscription. The name is case insensitive.
1834+
*
1835+
* @param {string} accountName The name of the storage account within the
1836+
* specified resource group. Storage account names must be between 3 and 24
1837+
* characters in length and use numbers and lower-case letters only.
1838+
*
1839+
* @param {object} [options] Optional Parameters.
1840+
*
1841+
* @param {object} [options.customHeaders] Headers that will be added to the
1842+
* request
1843+
*
1844+
* @returns {Promise} A promise is returned
1845+
*
1846+
* @resolve {HttpOperationResponse<null>} - The deserialized result object.
1847+
*
1848+
* @reject {Error|ServiceError} - The error object.
1849+
*/
1850+
beginFailoverWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
1851+
1852+
/**
1853+
* Failover request can be triggered for a storage account in case of
1854+
* availability issues. The failover occurs from the storage account's primary
1855+
* cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
1856+
* become primary after failover.
1857+
*
1858+
* @param {string} resourceGroupName The name of the resource group within the
1859+
* user's subscription. The name is case insensitive.
1860+
*
1861+
* @param {string} accountName The name of the storage account within the
1862+
* specified resource group. Storage account names must be between 3 and 24
1863+
* characters in length and use numbers and lower-case letters only.
1864+
*
1865+
* @param {object} [options] Optional Parameters.
1866+
*
1867+
* @param {object} [options.customHeaders] Headers that will be added to the
1868+
* request
1869+
*
1870+
* @param {ServiceCallback} [optionalCallback] - The optional callback.
1871+
*
1872+
* @returns {ServiceCallback|Promise} If a callback was passed as the last
1873+
* parameter then it returns the callback else returns a Promise.
1874+
*
1875+
* {Promise} A promise is returned.
1876+
*
1877+
* @resolve {null} - The deserialized result object.
1878+
*
1879+
* @reject {Error|ServiceError} - The error object.
1880+
*
1881+
* {ServiceCallback} optionalCallback(err, result, request, response)
1882+
*
1883+
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
1884+
*
1885+
* {null} [result] - The deserialized result object if an error did not occur.
1886+
*
1887+
* {WebResource} [request] - The HTTP Request object if an error did not occur.
1888+
*
1889+
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
1890+
*/
1891+
beginFailover(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
1892+
beginFailover(resourceGroupName: string, accountName: string, callback: ServiceCallback<void>): void;
1893+
beginFailover(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
17541894
}
17551895

17561896
/**

0 commit comments

Comments
 (0)