Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
Generated from 1f26996e492bf786c2acd06e0a4e46159c52df70
Adds storage account quick failover API
  • Loading branch information
AutorestCI committed Nov 14, 2018
commit e5c816ede75d8ad5481fd409e44a0686e0fb1ff5
3 changes: 3 additions & 0 deletions lib/services/storageManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ export interface TrackedResource extends Resource {
* 'Allow', 'Deny'
* @member {boolean} [isHnsEnabled] Account HierarchicalNamespace enabled if
* sets to true.
* @member {boolean} [failoverInProgress] If the failover is in progress, the
* value will be true, otherwise, it will be null.
*/
export interface StorageAccount extends TrackedResource {
readonly sku?: Sku;
Expand All @@ -814,6 +816,7 @@ export interface StorageAccount extends TrackedResource {
enableHttpsTrafficOnly?: boolean;
readonly networkRuleSet?: NetworkRuleSet;
isHnsEnabled?: boolean;
readonly failoverInProgress?: boolean;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions lib/services/storageManagement2/lib/models/storageAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ class StorageAccount extends models['TrackedResource'] {
* include: 'Allow', 'Deny'
* @member {boolean} [isHnsEnabled] Account HierarchicalNamespace enabled if
* sets to true.
* @member {boolean} [failoverInProgress] If the failover is in progress, the
* value will be true, otherwise, it will be null.
*/
constructor() {
super();
Expand Down Expand Up @@ -391,6 +393,14 @@ class StorageAccount extends models['TrackedResource'] {
type: {
name: 'Boolean'
}
},
failoverInProgress: {
required: false,
readOnly: true,
serializedName: 'properties.failoverInProgress',
type: {
name: 'Boolean'
}
}
}
}
Expand Down
140 changes: 140 additions & 0 deletions lib/services/storageManagement2/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,76 @@ export interface StorageAccounts {
listServiceSAS(resourceGroupName: string, accountName: string, parameters: models.ServiceSasParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ListServiceSasResponse>): void;


/**
* 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 {string} resourceGroupName The name of the resource group within the
* user's subscription. The name is case insensitive.
*
* @param {string} 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 {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<null>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
failoverWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

/**
* 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 {string} resourceGroupName The name of the resource group within the
* user's subscription. The name is case insensitive.
*
* @param {string} 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 {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {null} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
failover(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
failover(resourceGroupName: string, accountName: string, callback: ServiceCallback<void>): void;
failover(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


/**
* Asynchronously creates a new storage account with the specified parameters.
* If an account is already created and a subsequent create request is issued
Expand Down Expand Up @@ -1751,6 +1821,76 @@ export interface StorageAccounts {
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.StorageAccount>;
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, callback: ServiceCallback<models.StorageAccount>): void;
beginCreate(resourceGroupName: string, accountName: string, parameters: models.StorageAccountCreateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.StorageAccount>): void;


/**
* 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 {string} resourceGroupName The name of the resource group within the
* user's subscription. The name is case insensitive.
*
* @param {string} 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 {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<null>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
beginFailoverWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

/**
* 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 {string} resourceGroupName The name of the resource group within the
* user's subscription. The name is case insensitive.
*
* @param {string} 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 {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {null} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {null} [result] - The deserialized result object if an error did not occur.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
beginFailover(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
beginFailover(resourceGroupName: string, accountName: string, callback: ServiceCallback<void>): void;
beginFailover(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
}

/**
Expand Down
Loading