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

[AutoPR mariadb/resource-manager] Update MariaDB default API version to 2018-06-01 #4794

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class MariaDBManagementClient extends AzureServiceClient {

// Operation groups
servers: operations.Servers;
replicas: operations.Replicas;
firewallRules: operations.FirewallRules;
virtualNetworkRules: operations.VirtualNetworkRules;
databases: operations.Databases;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MariaDBManagementClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-06-01-preview';
this.apiVersion = '2018-06-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -73,6 +73,7 @@ class MariaDBManagementClient extends ServiceClient {
this.generateClientRequestId = options.generateClientRequestId;
}
this.servers = new operations.Servers(this);
this.replicas = new operations.Replicas(this);
this.firewallRules = new operations.FirewallRules(this);
this.virtualNetworkRules = new operations.VirtualNetworkRules(this);
this.databases = new operations.Databases(this);
Expand Down
26 changes: 26 additions & 0 deletions lib/services/mariadbManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ export interface ServerPropertiesForGeoRestore extends ServerPropertiesForCreate
sourceServerId: string;
}

/**
* The properties to create a new replica.
*/
export interface ServerPropertiesForReplica extends ServerPropertiesForCreate {
/**
* The master server id to create replica from.
*/
sourceServerId: string;
}

/**
* Billing information related properties of a server.
*/
Expand Down Expand Up @@ -194,6 +204,18 @@ export interface Server extends TrackedResource {
* Storage profile of a server.
*/
storageProfile?: StorageProfile;
/**
* The replication role of the server.
*/
replicationRole?: string;
/**
* The master server id of a replica server.
*/
masterServerId?: string;
/**
* The maximum number of replicas that a master server can have.
*/
replicaCapacity?: number;
}

/**
Expand Down Expand Up @@ -243,6 +265,10 @@ export interface ServerUpdateParameters {
* 'Disabled'
*/
sslEnforcement?: string;
/**
* The replication role of the server.
*/
replicationRole?: string;
/**
* Application-specific metadata in the form of key-value pairs.
*/
Expand Down
4 changes: 3 additions & 1 deletion lib/services/mariadbManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports.ServerPropertiesForCreate = require('./serverPropertiesForCreate');
exports.ServerPropertiesForDefaultCreate = require('./serverPropertiesForDefaultCreate');
exports.ServerPropertiesForRestore = require('./serverPropertiesForRestore');
exports.ServerPropertiesForGeoRestore = require('./serverPropertiesForGeoRestore');
exports.ServerPropertiesForReplica = require('./serverPropertiesForReplica');
exports.Sku = require('./sku');
exports.Server = require('./server');
exports.ServerForCreate = require('./serverForCreate');
Expand Down Expand Up @@ -53,5 +54,6 @@ exports.discriminators = {
'ServerPropertiesForCreate' : exports.ServerPropertiesForCreate,
'ServerPropertiesForCreate.Default' : exports.ServerPropertiesForDefaultCreate,
'ServerPropertiesForCreate.PointInTimeRestore' : exports.ServerPropertiesForRestore,
'ServerPropertiesForCreate.GeoRestore' : exports.ServerPropertiesForGeoRestore
'ServerPropertiesForCreate.GeoRestore' : exports.ServerPropertiesForGeoRestore,
'ServerPropertiesForCreate.Replica' : exports.ServerPropertiesForReplica
};
29 changes: 29 additions & 0 deletions lib/services/mariadbManagement/lib/models/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class Server extends models['TrackedResource'] {
* 'Enabled', 'Disabled'
* @property {number} [storageProfile.storageMB] Max storage allowed for a
* server.
* @property {string} [replicationRole] The replication role of the server.
* @property {string} [masterServerId] The master server id of a replica
* server.
* @property {number} [replicaCapacity] The maximum number of replicas that a
* master server can have.
*/
constructor() {
super();
Expand Down Expand Up @@ -173,6 +178,30 @@ class Server extends models['TrackedResource'] {
name: 'Composite',
className: 'StorageProfile'
}
},
replicationRole: {
required: false,
serializedName: 'properties.replicationRole',
type: {
name: 'String'
}
},
masterServerId: {
required: false,
serializedName: 'properties.masterServerId',
type: {
name: 'String'
}
},
replicaCapacity: {
required: false,
serializedName: 'properties.replicaCapacity',
constraints: {
InclusiveMinimum: 0
},
type: {
name: 'Number'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* 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');

/**
* The properties to create a new replica.
*
* @extends models['ServerPropertiesForCreate']
*/
class ServerPropertiesForReplica extends models['ServerPropertiesForCreate'] {
/**
* Create a ServerPropertiesForReplica.
* @property {string} sourceServerId The master server id to create replica
* from.
*/
constructor() {
super();
}

/**
* Defines the metadata of ServerPropertiesForReplica
*
* @returns {object} metadata of ServerPropertiesForReplica
*
*/
mapper() {
return {
required: false,
serializedName: 'Replica',
type: {
name: 'Composite',
polymorphicDiscriminator: {
serializedName: 'createMode',
clientName: 'createMode'
},
uberParent: 'ServerPropertiesForCreate',
className: 'ServerPropertiesForReplica',
modelProperties: {
version: {
required: false,
serializedName: 'version',
type: {
name: 'String'
}
},
sslEnforcement: {
required: false,
serializedName: 'sslEnforcement',
type: {
name: 'Enum',
allowedValues: [ 'Enabled', 'Disabled' ]
}
},
storageProfile: {
required: false,
serializedName: 'storageProfile',
type: {
name: 'Composite',
className: 'StorageProfile'
}
},
createMode: {
required: true,
serializedName: 'createMode',
isPolymorphicDiscriminator: true,
type: {
name: 'String'
}
},
sourceServerId: {
required: true,
serializedName: 'sourceServerId',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ServerPropertiesForReplica;
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class ServerUpdateParameters {
* include: '5.6', '5.7'
* @property {string} [sslEnforcement] Enable ssl enforcement or not when
* connect to server. Possible values include: 'Enabled', 'Disabled'
* @property {string} [replicationRole] The replication role of the server.
* @property {object} [tags] Application-specific metadata in the form of
* key-value pairs.
*/
Expand Down Expand Up @@ -99,6 +100,13 @@ class ServerUpdateParameters {
allowedValues: [ 'Enabled', 'Disabled' ]
}
},
replicationRole: {
required: false,
serializedName: 'properties.replicationRole',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
Expand Down
Loading