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

Commit

Permalink
Merge pull request #3399 from Azure/restapi_auto_mysql/resource-manager
Browse files Browse the repository at this point in the history
[AutoPR] mysql/resource-manager
  • Loading branch information
Dan Schulte authored Aug 24, 2018
2 parents 28c8f5f + 485118f commit acae36c
Show file tree
Hide file tree
Showing 17 changed files with 1,374 additions and 43 deletions.
42 changes: 21 additions & 21 deletions lib/services/mysqlManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 33 additions & 0 deletions lib/services/mysqlManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,39 @@ export interface NameAvailability {
reason?: 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: '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
Expand Down
1 change: 1 addition & 0 deletions lib/services/mysqlManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ exports.PerformanceTierServiceLevelObjectives = require('./performanceTierServic
exports.PerformanceTierProperties = require('./performanceTierProperties');
exports.NameAvailabilityRequest = require('./nameAvailabilityRequest');
exports.NameAvailability = require('./nameAvailability');
exports.ServerSecurityAlertPolicy = require('./serverSecurityAlertPolicy');
exports.ServerListResult = require('./serverListResult');
exports.FirewallRuleListResult = require('./firewallRuleListResult');
exports.VirtualNetworkRuleListResult = require('./virtualNetworkRuleListResult');
Expand Down
2 changes: 0 additions & 2 deletions lib/services/mysqlManagement/lib/models/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* REST API operation definition.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* A list of resource provider operations.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Performance tier properties
*
Expand Down
2 changes: 0 additions & 2 deletions lib/services/mysqlManagement/lib/models/serverForCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Represents a server to be created.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* The properties used to create a new server.
*
Expand Down
152 changes: 152 additions & 0 deletions lib/services/mysqlManagement/lib/models/serverSecurityAlertPolicy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
/*
* 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';

const models = require('./index');

/**
* A server security alert policy.
*
* @extends models['ProxyResource']
*/
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'
* @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.
*/
constructor() {
super();
}

/**
* Defines the metadata of ServerSecurityAlertPolicy
*
* @returns {object} metadata of ServerSecurityAlertPolicy
*
*/
mapper() {
return {
required: false,
serializedName: 'ServerSecurityAlertPolicy',
type: {
name: 'Composite',
className: 'ServerSecurityAlertPolicy',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
state: {
required: true,
serializedName: 'properties.state',
type: {
name: 'Enum',
allowedValues: [ 'Enabled', 'Disabled' ]
}
},
disabledAlerts: {
required: false,
serializedName: 'properties.disabledAlerts',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
emailAddresses: {
required: false,
serializedName: 'properties.emailAddresses',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
emailAccountAdmins: {
required: false,
serializedName: 'properties.emailAccountAdmins',
type: {
name: 'Boolean'
}
},
storageEndpoint: {
required: false,
serializedName: 'properties.storageEndpoint',
type: {
name: 'String'
}
},
storageAccountAccessKey: {
required: false,
serializedName: 'properties.storageAccountAccessKey',
type: {
name: 'String'
}
},
retentionDays: {
required: false,
serializedName: 'properties.retentionDays',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = ServerSecurityAlertPolicy;
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Parameters allowd to update for a server.
*
Expand Down
7 changes: 4 additions & 3 deletions lib/services/mysqlManagement/lib/mySQLManagementClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default class MySQLManagementClient extends AzureServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
Expand All @@ -64,6 +64,7 @@ export default class MySQLManagementClient extends AzureServiceClient {
logFiles: operations.LogFiles;
locationBasedPerformanceTier: operations.LocationBasedPerformanceTier;
checkNameAvailability: operations.CheckNameAvailability;
serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;
operations: operations.Operations;
}

Expand Down
7 changes: 4 additions & 3 deletions lib/services/mysqlManagement/lib/mySQLManagementClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class MySQLManagementClient extends ServiceClient {
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
Expand Down Expand Up @@ -80,6 +80,7 @@ class MySQLManagementClient extends ServiceClient {
this.logFiles = new operations.LogFiles(this);
this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this);
this.checkNameAvailability = new operations.CheckNameAvailability(this);
this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this);
this.operations = new operations.Operations(this);
this.models = models;
msRest.addSerializationMixin(this);
Expand Down
Loading

0 comments on commit acae36c

Please sign in to comment.