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

[AutoPR sql/resource-manager] Added List Policies API to SecurityAlerts #4574

Closed
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
45 changes: 42 additions & 3 deletions lib/services/sqlManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3089,7 +3089,8 @@ export interface ServerDnsAliasAcquisition {
* A server security alert policy.
*
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down Expand Up @@ -3182,7 +3183,8 @@ export interface CreateDatabaseRestorePointDefinition {
* A managed database security alert policy.
*
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down Expand Up @@ -3218,7 +3220,8 @@ export interface ManagedDatabaseSecurityAlertPolicy extends ProxyResource {
* A managed server security alert policy.
*
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down Expand Up @@ -5058,6 +5061,18 @@ export interface ServerDnsAliasListResult extends Array<ServerDnsAlias> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the LogicalServerSecurityAlertPolicyListResult class.
* @constructor
* A list of the server's security alert policies.
*
* @property {string} [nextLink] Link to retrieve next page of results.
*/
export interface LogicalServerSecurityAlertPolicyListResult extends Array<ServerSecurityAlertPolicy> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the RestorableDroppedManagedDatabaseListResult class.
Expand All @@ -5082,6 +5097,30 @@ export interface RestorePointListResult extends Array<RestorePoint> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the ManagedDatabaseSecurityAlertPolicyListResult class.
* @constructor
* A list of the managed database's security alert policies.
*
* @property {string} [nextLink] Link to retrieve next page of results.
*/
export interface ManagedDatabaseSecurityAlertPolicyListResult extends Array<ManagedDatabaseSecurityAlertPolicy> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the ManagedServerSecurityAlertPolicyListResult class.
* @constructor
* A list of the managed Server's security alert policies.
*
* @property {string} [nextLink] Link to retrieve next page of results.
*/
export interface ManagedServerSecurityAlertPolicyListResult extends Array<ManagedServerSecurityAlertPolicy> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the DatabaseOperationListResult class.
Expand Down
3 changes: 3 additions & 0 deletions lib/services/sqlManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,11 @@ exports.LongTermRetentionBackupListResult = require('./longTermRetentionBackupLi
exports.ManagedBackupShortTermRetentionPolicyListResult = require('./managedBackupShortTermRetentionPolicyListResult');
exports.ManagedDatabaseListResult = require('./managedDatabaseListResult');
exports.ServerDnsAliasListResult = require('./serverDnsAliasListResult');
exports.LogicalServerSecurityAlertPolicyListResult = require('./logicalServerSecurityAlertPolicyListResult');
exports.RestorableDroppedManagedDatabaseListResult = require('./restorableDroppedManagedDatabaseListResult');
exports.RestorePointListResult = require('./restorePointListResult');
exports.ManagedDatabaseSecurityAlertPolicyListResult = require('./managedDatabaseSecurityAlertPolicyListResult');
exports.ManagedServerSecurityAlertPolicyListResult = require('./managedServerSecurityAlertPolicyListResult');
exports.DatabaseOperationListResult = require('./databaseOperationListResult');
exports.ElasticPoolOperationListResult = require('./elasticPoolOperationListResult');
exports.VulnerabilityAssessmentScanRecordListResult = require('./vulnerabilityAssessmentScanRecordListResult');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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';

/**
* A list of the server's security alert policies.
*/
class LogicalServerSecurityAlertPolicyListResult extends Array {
/**
* Create a LogicalServerSecurityAlertPolicyListResult.
* @property {string} [nextLink] Link to retrieve next page of results.
*/
constructor() {
super();
}

/**
* Defines the metadata of LogicalServerSecurityAlertPolicyListResult
*
* @returns {object} metadata of LogicalServerSecurityAlertPolicyListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'LogicalServerSecurityAlertPolicyListResult',
type: {
name: 'Composite',
className: 'LogicalServerSecurityAlertPolicyListResult',
modelProperties: {
value: {
required: false,
readOnly: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ServerSecurityAlertPolicyElementType',
type: {
name: 'Composite',
className: 'ServerSecurityAlertPolicy'
}
}
}
},
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = LogicalServerSecurityAlertPolicyListResult;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ManagedDatabaseSecurityAlertPolicy extends models['ProxyResource'] {
/**
* Create a ManagedDatabaseSecurityAlertPolicy.
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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';

/**
* A list of the managed database's security alert policies.
*/
class ManagedDatabaseSecurityAlertPolicyListResult extends Array {
/**
* Create a ManagedDatabaseSecurityAlertPolicyListResult.
* @property {string} [nextLink] Link to retrieve next page of results.
*/
constructor() {
super();
}

/**
* Defines the metadata of ManagedDatabaseSecurityAlertPolicyListResult
*
* @returns {object} metadata of ManagedDatabaseSecurityAlertPolicyListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'ManagedDatabaseSecurityAlertPolicyListResult',
type: {
name: 'Composite',
className: 'ManagedDatabaseSecurityAlertPolicyListResult',
modelProperties: {
value: {
required: false,
readOnly: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ManagedDatabaseSecurityAlertPolicyElementType',
type: {
name: 'Composite',
className: 'ManagedDatabaseSecurityAlertPolicy'
}
}
}
},
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ManagedDatabaseSecurityAlertPolicyListResult;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ManagedServerSecurityAlertPolicy extends models['ProxyResource'] {
/**
* Create a ManagedServerSecurityAlertPolicy.
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* 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';

/**
* A list of the managed Server's security alert policies.
*/
class ManagedServerSecurityAlertPolicyListResult extends Array {
/**
* Create a ManagedServerSecurityAlertPolicyListResult.
* @property {string} [nextLink] Link to retrieve next page of results.
*/
constructor() {
super();
}

/**
* Defines the metadata of ManagedServerSecurityAlertPolicyListResult
*
* @returns {object} metadata of ManagedServerSecurityAlertPolicyListResult
*
*/
mapper() {
return {
required: false,
serializedName: 'ManagedServerSecurityAlertPolicyListResult',
type: {
name: 'Composite',
className: 'ManagedServerSecurityAlertPolicyListResult',
modelProperties: {
value: {
required: false,
readOnly: true,
serializedName: '',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'ManagedServerSecurityAlertPolicyElementType',
type: {
name: 'Composite',
className: 'ManagedServerSecurityAlertPolicy'
}
}
}
},
nextLink: {
required: false,
readOnly: true,
serializedName: 'nextLink',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ManagedServerSecurityAlertPolicyListResult;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ServerSecurityAlertPolicy extends models['ProxyResource'] {
/**
* Create a ServerSecurityAlertPolicy.
* @property {string} state Specifies the state of the policy, whether it is
* enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled'
* enabled or disabled or a policy has not been applied yet on the specific
* database. Possible values include: 'New', 'Enabled', 'Disabled'
* @property {array} [disabledAlerts] Specifies an array of alerts that are
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
* Access_Anomaly, Data_Exfiltration, Unsafe_Action
Expand Down
Loading