Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* The response from the get last synctime operation.
*
*/
class GetLastSyncTimeResult {
/**
* Create a GetLastSyncTimeResult.
* @member {string} [status] The status of the secondary location of the
* Storage Account. Live: Indicates that the secondary location is active and
* operational; Bootstrap: Indicates initial synchronization from the primary
* location to the secondary location is in progress, this typically occurs
* when replication is first enabled; Unavailable: Indicates that the
* secondary location is temporarily unavailable. Possible values include:
* 'Live', 'Bootstrap', 'Unavailable'
* @member {date} [lastSyncTime] All primary writes preceding this value are
* guaranteed to be replicated to secondary. Primary writes after this point
* in time may or may not be replicated. It is the minimum last sync time of
* the account’s Blob/Table/Queue/File endpoints. The value may be account’s
* creation time if LastSyncTime is not available. This can happen if the
* replication status is bootstrap or unavailable.
*/
constructor() {
}

/**
* Defines the metadata of GetLastSyncTimeResult
*
* @returns {object} metadata of GetLastSyncTimeResult
*
*/
mapper() {
return {
required: false,
serializedName: 'GetLastSyncTimeResult',
type: {
name: 'Composite',
className: 'GetLastSyncTimeResult',
modelProperties: {
status: {
required: false,
readOnly: true,
serializedName: 'status',
type: {
name: 'String'
}
},
lastSyncTime: {
required: false,
readOnly: true,
serializedName: 'lastSyncTime',
type: {
name: 'DateTime'
}
}
}
}
};
}
}

module.exports = GetLastSyncTimeResult;
28 changes: 28 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 Expand Up @@ -1156,6 +1159,31 @@ export interface ListServiceSasResponse {
readonly serviceSasToken?: string;
}

/**
* @class
* Initializes a new instance of the GetLastSyncTimeResult class.
* @constructor
* The response from the get last synctime operation.
*
* @member {string} [status] The status of the secondary location of the
* Storage Account. Live: Indicates that the secondary location is active and
* operational; Bootstrap: Indicates initial synchronization from the primary
* location to the secondary location is in progress, this typically occurs
* when replication is first enabled; Unavailable: Indicates that the secondary
* location is temporarily unavailable. Possible values include: 'Live',
* 'Bootstrap', 'Unavailable'
* @member {date} [lastSyncTime] All primary writes preceding this value are
* guaranteed to be replicated to secondary. Primary writes after this point in
* time may or may not be replicated. It is the minimum last sync time of the
* account’s Blob/Table/Queue/File endpoints. The value may be account’s
* creation time if LastSyncTime is not available. This can happen if the
* replication status is bootstrap or unavailable.
*/
export interface GetLastSyncTimeResult {
readonly status?: string;
readonly lastSyncTime?: Date;
}

/**
* @class
* Initializes a new instance of the ProxyResource class.
Expand Down
1 change: 1 addition & 0 deletions lib/services/storageManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ exports.AccountSasParameters = require('./accountSasParameters');
exports.ListAccountSasResponse = require('./listAccountSasResponse');
exports.ServiceSasParameters = require('./serviceSasParameters');
exports.ListServiceSasResponse = require('./listServiceSasResponse');
exports.GetLastSyncTimeResult = require('./getLastSyncTimeResult');
exports.ProxyResource = require('./proxyResource');
exports.AzureEntityResource = require('./azureEntityResource');
exports.UpdateHistoryProperty = require('./updateHistoryProperty');
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
205 changes: 205 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,141 @@ 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;


/**
* Retrieve last sync time for his or her RA-GRS and GRS accounts.
*
* @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<GetLastSyncTimeResult>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
getLastSyncTimeWithHttpOperationResponse(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.GetLastSyncTimeResult>>;

/**
* Retrieve last sync time for his or her RA-GRS and GRS accounts.
*
* @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 {GetLastSyncTimeResult} - 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.
*
* {GetLastSyncTimeResult} [result] - The deserialized result object if an error did not occur.
* See {@link GetLastSyncTimeResult} for more information.
*
* {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.
*/
getLastSyncTime(resourceGroupName: string, accountName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.GetLastSyncTimeResult>;
getLastSyncTime(resourceGroupName: string, accountName: string, callback: ServiceCallback<models.GetLastSyncTimeResult>): void;
getLastSyncTime(resourceGroupName: string, accountName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.GetLastSyncTimeResult>): 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 +1886,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