Skip to content

Commit

Permalink
Add SDK for database recovery on Managed Instance (#5186)
Browse files Browse the repository at this point in the history
Swagger PR Links
Azure/azure-rest-api-specs#4947

Add SDK for database recovery on Managed Instance

•Add getrecoverabledatabases on managed instance and create databases using geo-backup

•Add test

•Generate client from azure and update session records

•Add release notes
  • Loading branch information
lixiachena authored and dsgouda committed Jan 29, 2019
1 parent 433d41f commit 7936025
Show file tree
Hide file tree
Showing 13 changed files with 1,964 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/SDKs/SDKs/_metadata/sql_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/v-djnisi/azure-rest-api-specs/blob/readread/specification/sql/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\src\SDKs
2018-11-05 14:53:22 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/sql/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\git\azure-sdk-for-net\src\SDKs
2019-01-29 06:40:43 UTC
Azure-rest-api-specs repository information
GitHub fork: v-djnisi
Branch: readread
Commit: f848336966752760cd1c49a97a4edc29d710bc17
GitHub fork: Azure
Branch: master
Commit: 31fa6a10ba86e3f777e63a4c5cd0d2cbd135227b
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Sql
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// RecoverableManagedDatabasesOperations operations.
/// </summary>
public partial interface IRecoverableManagedDatabasesOperations
{
/// <summary>
/// Gets a list of recoverable managed databases.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group that contains the resource. You can
/// obtain this value from the Azure Resource Manager API or the
/// portal.
/// </param>
/// <param name='managedInstanceName'>
/// The name of the managed instance.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<RecoverableManagedDatabase>>> ListByInstanceWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a recoverable managed database.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group that contains the resource. You can
/// obtain this value from the Azure Resource Manager API or the
/// portal.
/// </param>
/// <param name='managedInstanceName'>
/// The name of the managed instance.
/// </param>
/// <param name='recoverableDatabaseName'>
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<RecoverableManagedDatabase>> GetWithHttpMessagesAsync(string resourceGroupName, string managedInstanceName, string recoverableDatabaseName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a list of recoverable managed databases.
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<RecoverableManagedDatabase>>> ListByInstanceNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ public partial interface ISqlManagementClient : System.IDisposable
/// </summary>
IManagedInstanceEncryptionProtectorsOperations ManagedInstanceEncryptionProtectors { get; }

/// <summary>
/// Gets the IRecoverableManagedDatabasesOperations.
/// </summary>
IRecoverableManagedDatabasesOperations RecoverableManagedDatabases { get; }

/// <summary>
/// Gets the IManagedInstanceVulnerabilityAssessmentsOperations.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Sql.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// A recoverable managed database resource.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class RecoverableManagedDatabase : ProxyResource
{
/// <summary>
/// Initializes a new instance of the RecoverableManagedDatabase class.
/// </summary>
public RecoverableManagedDatabase()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the RecoverableManagedDatabase class.
/// </summary>
/// <param name="id">Resource ID.</param>
/// <param name="name">Resource name.</param>
/// <param name="type">Resource type.</param>
/// <param name="lastAvailableBackupDate">The last available backup
/// date.</param>
public RecoverableManagedDatabase(string id = default(string), string name = default(string), string type = default(string), string lastAvailableBackupDate = default(string))
: base(id, name, type)
{
LastAvailableBackupDate = lastAvailableBackupDate;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets the last available backup date.
/// </summary>
[JsonProperty(PropertyName = "properties.lastAvailableBackupDate")]
public string LastAvailableBackupDate { get; private set; }

}
}
Loading

0 comments on commit 7936025

Please sign in to comment.