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

Commit acae36c

Browse files
author
Dan Schulte
authored
Merge pull request #3399 from Azure/restapi_auto_mysql/resource-manager
[AutoPR] mysql/resource-manager
2 parents 28c8f5f + 485118f commit acae36c

17 files changed

+1374
-43
lines changed
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
The MIT License (MIT)
2-
3-
Copyright (c) 2018 Microsoft
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Microsoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

lib/services/mysqlManagement/lib/models/index.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,39 @@ export interface NameAvailability {
512512
reason?: string;
513513
}
514514

515+
/**
516+
* @class
517+
* Initializes a new instance of the ServerSecurityAlertPolicy class.
518+
* @constructor
519+
* A server security alert policy.
520+
*
521+
* @member {string} state Specifies the state of the policy, whether it is
522+
* enabled or disabled. Possible values include: 'Enabled', 'Disabled'
523+
* @member {array} [disabledAlerts] Specifies an array of alerts that are
524+
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
525+
* Access_Anomaly
526+
* @member {array} [emailAddresses] Specifies an array of e-mail addresses to
527+
* which the alert is sent.
528+
* @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to
529+
* the account administrators.
530+
* @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g.
531+
* https://MyAccount.blob.core.windows.net). This blob storage will hold all
532+
* Threat Detection audit logs.
533+
* @member {string} [storageAccountAccessKey] Specifies the identifier key of
534+
* the Threat Detection audit storage account.
535+
* @member {number} [retentionDays] Specifies the number of days to keep in the
536+
* Threat Detection audit logs.
537+
*/
538+
export interface ServerSecurityAlertPolicy extends ProxyResource {
539+
state: string;
540+
disabledAlerts?: string[];
541+
emailAddresses?: string[];
542+
emailAccountAdmins?: boolean;
543+
storageEndpoint?: string;
544+
storageAccountAccessKey?: string;
545+
retentionDays?: number;
546+
}
547+
515548

516549
/**
517550
* @class

lib/services/mysqlManagement/lib/models/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ exports.PerformanceTierServiceLevelObjectives = require('./performanceTierServic
4141
exports.PerformanceTierProperties = require('./performanceTierProperties');
4242
exports.NameAvailabilityRequest = require('./nameAvailabilityRequest');
4343
exports.NameAvailability = require('./nameAvailability');
44+
exports.ServerSecurityAlertPolicy = require('./serverSecurityAlertPolicy');
4445
exports.ServerListResult = require('./serverListResult');
4546
exports.FirewallRuleListResult = require('./firewallRuleListResult');
4647
exports.VirtualNetworkRuleListResult = require('./virtualNetworkRuleListResult');

lib/services/mysqlManagement/lib/models/operation.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* REST API operation definition.
1715
*

lib/services/mysqlManagement/lib/models/operationListResult.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* A list of resource provider operations.
1715
*

lib/services/mysqlManagement/lib/models/performanceTierProperties.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* Performance tier properties
1715
*

lib/services/mysqlManagement/lib/models/serverForCreate.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* Represents a server to be created.
1715
*

lib/services/mysqlManagement/lib/models/serverPropertiesForCreate.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* The properties used to create a new server.
1715
*
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
* Changes may cause incorrect behavior and will be lost if the code is
8+
* regenerated.
9+
*/
10+
11+
'use strict';
12+
13+
const models = require('./index');
14+
15+
/**
16+
* A server security alert policy.
17+
*
18+
* @extends models['ProxyResource']
19+
*/
20+
class ServerSecurityAlertPolicy extends models['ProxyResource'] {
21+
/**
22+
* Create a ServerSecurityAlertPolicy.
23+
* @member {string} state Specifies the state of the policy, whether it is
24+
* enabled or disabled. Possible values include: 'Enabled', 'Disabled'
25+
* @member {array} [disabledAlerts] Specifies an array of alerts that are
26+
* disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
27+
* Access_Anomaly
28+
* @member {array} [emailAddresses] Specifies an array of e-mail addresses to
29+
* which the alert is sent.
30+
* @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to
31+
* the account administrators.
32+
* @member {string} [storageEndpoint] Specifies the blob storage endpoint
33+
* (e.g. https://MyAccount.blob.core.windows.net). This blob storage will
34+
* hold all Threat Detection audit logs.
35+
* @member {string} [storageAccountAccessKey] Specifies the identifier key of
36+
* the Threat Detection audit storage account.
37+
* @member {number} [retentionDays] Specifies the number of days to keep in
38+
* the Threat Detection audit logs.
39+
*/
40+
constructor() {
41+
super();
42+
}
43+
44+
/**
45+
* Defines the metadata of ServerSecurityAlertPolicy
46+
*
47+
* @returns {object} metadata of ServerSecurityAlertPolicy
48+
*
49+
*/
50+
mapper() {
51+
return {
52+
required: false,
53+
serializedName: 'ServerSecurityAlertPolicy',
54+
type: {
55+
name: 'Composite',
56+
className: 'ServerSecurityAlertPolicy',
57+
modelProperties: {
58+
id: {
59+
required: false,
60+
readOnly: true,
61+
serializedName: 'id',
62+
type: {
63+
name: 'String'
64+
}
65+
},
66+
name: {
67+
required: false,
68+
readOnly: true,
69+
serializedName: 'name',
70+
type: {
71+
name: 'String'
72+
}
73+
},
74+
type: {
75+
required: false,
76+
readOnly: true,
77+
serializedName: 'type',
78+
type: {
79+
name: 'String'
80+
}
81+
},
82+
state: {
83+
required: true,
84+
serializedName: 'properties.state',
85+
type: {
86+
name: 'Enum',
87+
allowedValues: [ 'Enabled', 'Disabled' ]
88+
}
89+
},
90+
disabledAlerts: {
91+
required: false,
92+
serializedName: 'properties.disabledAlerts',
93+
type: {
94+
name: 'Sequence',
95+
element: {
96+
required: false,
97+
serializedName: 'StringElementType',
98+
type: {
99+
name: 'String'
100+
}
101+
}
102+
}
103+
},
104+
emailAddresses: {
105+
required: false,
106+
serializedName: 'properties.emailAddresses',
107+
type: {
108+
name: 'Sequence',
109+
element: {
110+
required: false,
111+
serializedName: 'StringElementType',
112+
type: {
113+
name: 'String'
114+
}
115+
}
116+
}
117+
},
118+
emailAccountAdmins: {
119+
required: false,
120+
serializedName: 'properties.emailAccountAdmins',
121+
type: {
122+
name: 'Boolean'
123+
}
124+
},
125+
storageEndpoint: {
126+
required: false,
127+
serializedName: 'properties.storageEndpoint',
128+
type: {
129+
name: 'String'
130+
}
131+
},
132+
storageAccountAccessKey: {
133+
required: false,
134+
serializedName: 'properties.storageAccountAccessKey',
135+
type: {
136+
name: 'String'
137+
}
138+
},
139+
retentionDays: {
140+
required: false,
141+
serializedName: 'properties.retentionDays',
142+
type: {
143+
name: 'Number'
144+
}
145+
}
146+
}
147+
}
148+
};
149+
}
150+
}
151+
152+
module.exports = ServerSecurityAlertPolicy;

lib/services/mysqlManagement/lib/models/serverUpdateParameters.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
'use strict';
1212

13-
const models = require('./index');
14-
1513
/**
1614
* Parameters allowd to update for a server.
1715
*

lib/services/mysqlManagement/lib/mySQLManagementClient.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export default class MySQLManagementClient extends AzureServiceClient {
3434
*
3535
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
3636
*
37-
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
37+
* @param {string} [options.acceptLanguage] - The preferred language for the response.
3838
*
39-
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
39+
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
4040
*
41-
* @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.
41+
* @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.
4242
*
4343
*/
4444
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);
@@ -64,6 +64,7 @@ export default class MySQLManagementClient extends AzureServiceClient {
6464
logFiles: operations.LogFiles;
6565
locationBasedPerformanceTier: operations.LocationBasedPerformanceTier;
6666
checkNameAvailability: operations.CheckNameAvailability;
67+
serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies;
6768
operations: operations.Operations;
6869
}
6970

lib/services/mysqlManagement/lib/mySQLManagementClient.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class MySQLManagementClient extends ServiceClient {
3434
* @param {object} [options.requestOptions] - Options for the underlying request object
3535
* {@link https://github.com/request/request#requestoptions-callback Options doc}
3636
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
37-
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
38-
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
39-
* @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.
37+
* @param {string} [options.acceptLanguage] - The preferred language for the response.
38+
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
39+
* @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.
4040
*/
4141
constructor(credentials, subscriptionId, baseUri, options) {
4242
if (credentials === null || credentials === undefined) {
@@ -80,6 +80,7 @@ class MySQLManagementClient extends ServiceClient {
8080
this.logFiles = new operations.LogFiles(this);
8181
this.locationBasedPerformanceTier = new operations.LocationBasedPerformanceTier(this);
8282
this.checkNameAvailability = new operations.CheckNameAvailability(this);
83+
this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this);
8384
this.operations = new operations.Operations(this);
8485
this.models = models;
8586
msRest.addSerializationMixin(this);

0 commit comments

Comments
 (0)