C# Class Microsoft.Azure.Commands.Sql.Server.Adapter.AzureSqlServerAdapter

Adapter for server operations
Mostra file Open project: Azure/azure-powershell Class Usage Examples

Private Properties

Property Type Description
CreateServerModelFromResponse Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel
Decrypt string

Public Methods

Method Description
AzureSqlServerAdapter ( AzureContext context ) : Microsoft.Azure.Commands.Common.Authentication.Models

Constructs a server adapter

GetServer ( string resourceGroupName, string serverName ) : Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

Gets a server in a resource group

GetServers ( string resourceGroupName ) : List

Gets a list of all the servers in a resource group

RemoveServer ( string resourceGroupName, string serverName ) : void

Deletes a server

UpsertServer ( Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel model ) : Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

Upserts a server

Private Methods

Method Description
CreateServerModelFromResponse ( string resourceGroupName, Management resp ) : Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

Convert a Management.Sql.Models.Server to AzureSqlDatabaseServerModel

Decrypt ( SecureString secureString ) : string

Method Details

AzureSqlServerAdapter() public method

Constructs a server adapter
public AzureSqlServerAdapter ( AzureContext context ) : Microsoft.Azure.Commands.Common.Authentication.Models
context Microsoft.Azure.Commands.Common.Authentication.Models.AzureContext The current azure profile
return Microsoft.Azure.Commands.Common.Authentication.Models

GetServer() public method

Gets a server in a resource group
public GetServer ( string resourceGroupName, string serverName ) : Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel
resourceGroupName string The name of the resource group
serverName string The name of the server
return Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

GetServers() public method

Gets a list of all the servers in a resource group
public GetServers ( string resourceGroupName ) : List
resourceGroupName string The name of the resource group
return List

RemoveServer() public method

Deletes a server
public RemoveServer ( string resourceGroupName, string serverName ) : void
resourceGroupName string The resource group the server is in
serverName string The name of the server to delete
return void

UpsertServer() public method

Upserts a server
public UpsertServer ( Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel model ) : Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel
model Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel The server to upsert
return Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel