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 support for dropped databases on Managed Instance #4486

Merged
merged 2 commits into from
Jan 18, 2019
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
2 changes: 1 addition & 1 deletion lib/services/sqlManagement2/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
Expand Down
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 @@ -3118,6 +3118,27 @@ export interface ServerSecurityAlertPolicy extends ProxyResource {
readonly creationTime?: Date;
}

/**
* @class
* Initializes a new instance of the RestorableDroppedManagedDatabase class.
* @constructor
* A restorable dropped managed database resource.
*
* @property {string} [databaseName] The name of the database.
* @property {date} [creationDate] The creation date of the database (ISO8601
* format).
* @property {date} [deletionDate] The deletion date of the database (ISO8601
* format).
* @property {date} [earliestRestoreDate] The earliest restore date of the
* database (ISO8601 format).
*/
export interface RestorableDroppedManagedDatabase extends TrackedResource {
readonly databaseName?: string;
readonly creationDate?: Date;
readonly deletionDate?: Date;
readonly earliestRestoreDate?: Date;
}

/**
* @class
* Initializes a new instance of the RestorePoint class.
Expand Down Expand Up @@ -5037,6 +5058,18 @@ export interface ServerDnsAliasListResult extends Array<ServerDnsAlias> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the RestorableDroppedManagedDatabaseListResult class.
* @constructor
* A list of restorable dropped managed databases.
*
* @property {string} [nextLink] Link to retrieve next page of results.
*/
export interface RestorableDroppedManagedDatabaseListResult extends Array<RestorableDroppedManagedDatabase> {
readonly nextLink?: string;
}

/**
* @class
* Initializes a new instance of the RestorePointListResult class.
Expand Down
2 changes: 2 additions & 0 deletions lib/services/sqlManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ exports.ServerAutomaticTuning = require('./serverAutomaticTuning');
exports.ServerDnsAlias = require('./serverDnsAlias');
exports.ServerDnsAliasAcquisition = require('./serverDnsAliasAcquisition');
exports.ServerSecurityAlertPolicy = require('./serverSecurityAlertPolicy');
exports.RestorableDroppedManagedDatabase = require('./restorableDroppedManagedDatabase');
exports.RestorePoint = require('./restorePoint');
exports.CreateDatabaseRestorePointDefinition = require('./createDatabaseRestorePointDefinition');
exports.ManagedDatabaseSecurityAlertPolicy = require('./managedDatabaseSecurityAlertPolicy');
Expand Down Expand Up @@ -212,6 +213,7 @@ exports.LongTermRetentionBackupListResult = require('./longTermRetentionBackupLi
exports.ManagedBackupShortTermRetentionPolicyListResult = require('./managedBackupShortTermRetentionPolicyListResult');
exports.ManagedDatabaseListResult = require('./managedDatabaseListResult');
exports.ServerDnsAliasListResult = require('./serverDnsAliasListResult');
exports.RestorableDroppedManagedDatabaseListResult = require('./restorableDroppedManagedDatabaseListResult');
exports.RestorePointListResult = require('./restorePointListResult');
exports.DatabaseOperationListResult = require('./databaseOperationListResult');
exports.ElasticPoolOperationListResult = require('./elasticPoolOperationListResult');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/*
* 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 restorable dropped managed database resource.
*
* @extends models['TrackedResource']
*/
class RestorableDroppedManagedDatabase extends models['TrackedResource'] {
/**
* Create a RestorableDroppedManagedDatabase.
* @property {string} [databaseName] The name of the database.
* @property {date} [creationDate] The creation date of the database (ISO8601
* format).
* @property {date} [deletionDate] The deletion date of the database (ISO8601
* format).
* @property {date} [earliestRestoreDate] The earliest restore date of the
* database (ISO8601 format).
*/
constructor() {
super();
}

/**
* Defines the metadata of RestorableDroppedManagedDatabase
*
* @returns {object} metadata of RestorableDroppedManagedDatabase
*
*/
mapper() {
return {
required: false,
serializedName: 'RestorableDroppedManagedDatabase',
type: {
name: 'Composite',
className: 'RestorableDroppedManagedDatabase',
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'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
databaseName: {
required: false,
readOnly: true,
serializedName: 'properties.databaseName',
type: {
name: 'String'
}
},
creationDate: {
required: false,
readOnly: true,
serializedName: 'properties.creationDate',
type: {
name: 'DateTime'
}
},
deletionDate: {
required: false,
readOnly: true,
serializedName: 'properties.deletionDate',
type: {
name: 'DateTime'
}
},
earliestRestoreDate: {
required: false,
readOnly: true,
serializedName: 'properties.earliestRestoreDate',
type: {
name: 'DateTime'
}
}
}
}
};
}
}

module.exports = RestorableDroppedManagedDatabase;
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 restorable dropped managed databases.
*/
class RestorableDroppedManagedDatabaseListResult extends Array {
/**
* Create a RestorableDroppedManagedDatabaseListResult.
* @property {string} [nextLink] Link to retrieve next page of results.
*/
constructor() {
super();
}

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

module.exports = RestorableDroppedManagedDatabaseListResult;
Loading