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

[AutoPR sql/resource-manager] adding new state value to keep backward competiblity #3003

Merged
merged 1 commit into from
Jun 14, 2018
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
33 changes: 33 additions & 0 deletions lib/services/sqlManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2928,6 +2928,39 @@ export interface ServerDnsAliasAcquisition {
oldServerDnsAliasId?: string;
}

/**
* @class
* Initializes a new instance of the ServerSecurityAlertPolicy class.
* @constructor
* A server security alert policy.
*
* @member {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* @member {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly
* @member {array} [emailAddresses] Specifies an array of e-mail addresses to
* which the alert is sent.
* @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to
* the account administrators.
* @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g.
* https://MyAccount.blob.core.windows.net). This blob storage will hold all
* Threat Detection audit logs.
* @member {string} [storageAccountAccessKey] Specifies the identifier key of
* the Threat Detection audit storage account.
* @member {number} [retentionDays] Specifies the number of days to keep in the
* Threat Detection audit logs.
*/
export interface ServerSecurityAlertPolicy extends ProxyResource {
state: string;
disabledAlerts?: string[];
emailAddresses?: string[];
emailAccountAdmins?: boolean;
storageEndpoint?: string;
storageAccountAccessKey?: string;
retentionDays?: number;
}

/**
* @class
* Initializes a new instance of the RestorePoint class.
Expand Down
1 change: 1 addition & 0 deletions lib/services/sqlManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ exports.AutomaticTuningServerOptions = require('./automaticTuningServerOptions')
exports.ServerAutomaticTuning = require('./serverAutomaticTuning');
exports.ServerDnsAlias = require('./serverDnsAlias');
exports.ServerDnsAliasAcquisition = require('./serverDnsAliasAcquisition');
exports.ServerSecurityAlertPolicy = require('./serverSecurityAlertPolicy');
exports.RestorePoint = require('./restorePoint');
exports.CreateDatabaseRestorePointDefinition = require('./createDatabaseRestorePointDefinition');
exports.DatabaseOperation = require('./databaseOperation');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ServerSecurityAlertPolicy extends models['ProxyResource'] {
/**
* Create a ServerSecurityAlertPolicy.
* @member {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'Enabled', 'Disabled'
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* @member {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly
Expand Down Expand Up @@ -84,7 +84,7 @@ class ServerSecurityAlertPolicy extends models['ProxyResource'] {
serializedName: 'properties.state',
type: {
name: 'Enum',
allowedValues: [ 'Enabled', 'Disabled' ]
allowedValues: [ 'New', 'Enabled', 'Disabled' ]
}
},
disabledAlerts: {
Expand Down
305 changes: 305 additions & 0 deletions lib/services/sqlManagement2/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25782,6 +25782,311 @@ export interface ServerDnsAliases {
listByServerNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServerDnsAliasListResult>): void;
}

/**
* @class
* ServerSecurityAlertPolicies
* __NOTE__: An instance of this class is automatically created for an
* instance of the SqlManagementClient.
*/
export interface ServerSecurityAlertPolicies {


/**
* Get a server's security alert policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @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<ServerSecurityAlertPolicy>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServerSecurityAlertPolicy>>;

/**
* Get a server's security alert policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @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 {ServerSecurityAlertPolicy} - 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.
*
* {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur.
* See {@link ServerSecurityAlertPolicy} 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.
*/
get(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServerSecurityAlertPolicy>;
get(resourceGroupName: string, serverName: string, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;
get(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;


/**
* Creates or updates a threat detection policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} parameters The server security alert policy.
*
* @param {string} parameters.state Specifies the state of the policy, whether
* it is enabled or disabled. Possible values include: 'New', 'Enabled',
* 'Disabled'
*
* @param {array} [parameters.disabledAlerts] Specifies an array of alerts that
* are disabled. Allowed values are: Sql_Injection,
* Sql_Injection_Vulnerability, Access_Anomaly
*
* @param {array} [parameters.emailAddresses] Specifies an array of e-mail
* addresses to which the alert is sent.
*
* @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is
* sent to the account administrators.
*
* @param {string} [parameters.storageEndpoint] Specifies the blob storage
* endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage
* will hold all Threat Detection audit logs.
*
* @param {string} [parameters.storageAccountAccessKey] Specifies the
* identifier key of the Threat Detection audit storage account.
*
* @param {number} [parameters.retentionDays] Specifies the number of days to
* keep in the Threat Detection audit logs.
*
* @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<ServerSecurityAlertPolicy>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServerSecurityAlertPolicy>>;

/**
* Creates or updates a threat detection policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} parameters The server security alert policy.
*
* @param {string} parameters.state Specifies the state of the policy, whether
* it is enabled or disabled. Possible values include: 'New', 'Enabled',
* 'Disabled'
*
* @param {array} [parameters.disabledAlerts] Specifies an array of alerts that
* are disabled. Allowed values are: Sql_Injection,
* Sql_Injection_Vulnerability, Access_Anomaly
*
* @param {array} [parameters.emailAddresses] Specifies an array of e-mail
* addresses to which the alert is sent.
*
* @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is
* sent to the account administrators.
*
* @param {string} [parameters.storageEndpoint] Specifies the blob storage
* endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage
* will hold all Threat Detection audit logs.
*
* @param {string} [parameters.storageAccountAccessKey] Specifies the
* identifier key of the Threat Detection audit storage account.
*
* @param {number} [parameters.retentionDays] Specifies the number of days to
* keep in the Threat Detection audit logs.
*
* @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 {ServerSecurityAlertPolicy} - 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.
*
* {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur.
* See {@link ServerSecurityAlertPolicy} 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.
*/
createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServerSecurityAlertPolicy>;
createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;
createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;


/**
* Creates or updates a threat detection policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} parameters The server security alert policy.
*
* @param {string} parameters.state Specifies the state of the policy, whether
* it is enabled or disabled. Possible values include: 'New', 'Enabled',
* 'Disabled'
*
* @param {array} [parameters.disabledAlerts] Specifies an array of alerts that
* are disabled. Allowed values are: Sql_Injection,
* Sql_Injection_Vulnerability, Access_Anomaly
*
* @param {array} [parameters.emailAddresses] Specifies an array of e-mail
* addresses to which the alert is sent.
*
* @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is
* sent to the account administrators.
*
* @param {string} [parameters.storageEndpoint] Specifies the blob storage
* endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage
* will hold all Threat Detection audit logs.
*
* @param {string} [parameters.storageAccountAccessKey] Specifies the
* identifier key of the Threat Detection audit storage account.
*
* @param {number} [parameters.retentionDays] Specifies the number of days to
* keep in the Threat Detection audit logs.
*
* @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<ServerSecurityAlertPolicy>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ServerSecurityAlertPolicy>>;

/**
* Creates or updates a threat detection policy.
*
* @param {string} resourceGroupName The name of the resource group that
* contains the resource. You can obtain this value from the Azure Resource
* Manager API or the portal.
*
* @param {string} serverName The name of the server.
*
* @param {object} parameters The server security alert policy.
*
* @param {string} parameters.state Specifies the state of the policy, whether
* it is enabled or disabled. Possible values include: 'New', 'Enabled',
* 'Disabled'
*
* @param {array} [parameters.disabledAlerts] Specifies an array of alerts that
* are disabled. Allowed values are: Sql_Injection,
* Sql_Injection_Vulnerability, Access_Anomaly
*
* @param {array} [parameters.emailAddresses] Specifies an array of e-mail
* addresses to which the alert is sent.
*
* @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is
* sent to the account administrators.
*
* @param {string} [parameters.storageEndpoint] Specifies the blob storage
* endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage
* will hold all Threat Detection audit logs.
*
* @param {string} [parameters.storageAccountAccessKey] Specifies the
* identifier key of the Threat Detection audit storage account.
*
* @param {number} [parameters.retentionDays] Specifies the number of days to
* keep in the Threat Detection audit logs.
*
* @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 {ServerSecurityAlertPolicy} - 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.
*
* {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur.
* See {@link ServerSecurityAlertPolicy} 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.
*/
beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ServerSecurityAlertPolicy>;
beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;
beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ServerSecurityAlertPolicy>): void;
}

/**
* @class
* RestorePoints
Expand Down
1 change: 1 addition & 0 deletions lib/services/sqlManagement2/lib/operations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ exports.BackupLongTermRetentionPolicies = require('./backupLongTermRetentionPoli
exports.ManagedDatabases = require('./managedDatabases');
exports.ServerAutomaticTuningOperations = require('./serverAutomaticTuningOperations');
exports.ServerDnsAliases = require('./serverDnsAliases');
exports.ServerSecurityAlertPolicies = require('./serverSecurityAlertPolicies');
exports.RestorePoints = require('./restorePoints');
exports.DatabaseOperations = require('./databaseOperations');
exports.ElasticPoolOperations = require('./elasticPoolOperations');
Expand Down
Loading