Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] DTU-based model: How to set the DTU size and enable zone availability for a SQL database? #1323

Open
2 tasks done
codeminic opened this issue Jul 15, 2022 · 1 comment

Comments

@codeminic
Copy link

Query/Question

  • When creating a SQL database with the DTU-based model, is it possible to set the amount of DTU's to something else than the default? It so, how can this be achieved?
  • When creating a SQL database with the DTU-based model, is it possible to enable zone availability? If so, how can this be achieved?

If this is possible with the new SDK (Azure.ResourceManager.Sql), i'd be happy to migrate. But there is basically no docs (probably because it's still in beta?) and I could not figure out how to even create a database without tweaking anything.

Why is this not a Bug or a feature Request?
Not sure if this is missing functionality - maybe it's there but I could not find it.

Setup (please complete the following information if applicable):

  • Version of the Library used: 1.38.1

The code I'm using so far:

using Microsoft.Azure.Management.ResourceManager.Fluent.Authentication;
using Microsoft.Azure.Management.Sql.Fluent;

namespace Test;

public class Setup
{
    public async Task CreateDatabase(AzureCredentials credentials, string subscription, string sqlServerResourceId)
    {
        var azure = Microsoft.Azure.Management.Fluent.Azure.Authenticate(credentials)
            .WithSubscription(subscription);
        var sqlServer = azure.SqlServers.GetById(sqlServerResourceId);
        await sqlServer.Databases.Define("TestDatabase")
            .WithCollation("SQL_Latin1_General_CP1_CI_AS")
            .WithStandardEdition(SqlDatabaseStandardServiceObjective.S1, SqlDatabaseStandardStorage.Max20Gb)
            .CreateAsync();
    }
}

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

Thanks for your help!

@weidongxu-microsoft
Copy link
Member

This SDK is in maintenance mode, please plan migration to https://aka.ms/azsdk/dotnet/mgmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants