C# Class Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerDataServiceCertAuth

Implementation of the IServerDataServiceContext with Certificate authentication.
Inheritance: IServerDataServiceContext
ファイルを表示 Open project: Azure/azure-powershell Class Usage Examples

Private Properties

Property Type Description
AddTracingHeaders void
CreateDatabaseCopyFromResponse DatabaseCopyModel
CreateDatabaseFromResponse Database
CreateDatabaseFromResponse Database
CreateDatabaseFromResponse Database
CreateDatabaseFromResponse Database
CreateDatabaseFromResponse Database[]
CreateDatabaseOperation DatabaseOperation
CreateDatabaseOperationFromResponse DatabaseOperation
CreateDatabaseOperationsFromResponse DatabaseOperation[]
CreateDimensionSettings Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.DimensionSetting
CreateDimensionSettingsFromResponse Collection
CreateMetricsFromResponse IEnumerable
CreateRestorableDroppedDatabaseFromResponse RestorableDroppedDatabase
CreateRestorableDroppedDatabaseFromResponse RestorableDroppedDatabase
CreateRestorableDroppedDatabaseFromResponse RestorableDroppedDatabase[]
CreateRestoreDatabaseOperationFromResponse RestoreDatabaseOperation
CreateServiceObjectiveFromResponse ServiceObjective
LoadExtraProperties void
LoadExtraProperties void
PopulateSloCache void
ServerDataServiceCertAuth System

Public Methods

Method Description
Create ( string serverName, AzureSMProfile profile, AzureSubscription subscription ) : ServerDataServiceCertAuth

Creates and returns a new instance of the ServerDataServiceCertAuth class which connects to the specified server using the specified subscription credentials.

CreateNewDatabase ( string databaseName, int databaseMaxSizeInGB, long databaseMaxSizeInBytes, string databaseCollation, DatabaseEdition databaseEdition, ServiceObjective serviceObjective ) : Database

Creates a new sql database.

GetDatabase ( string databaseName ) : Database

Retrieve a specific database from the current context

GetDatabaseCopy ( DatabaseCopyModel databaseCopy ) : DatabaseCopyModel

Refreshes the given database copy object.

GetDatabaseCopy ( string databaseName, string partnerServer, string partnerDatabaseName ) : DatabaseCopyModel[]

Retrieve all database copy objects with matching parameters.

GetDatabaseOperation ( System.Guid OperationGuid ) : DatabaseOperation

Retrieve information on operation with the guid

GetDatabaseOperations ( string databaseName ) : DatabaseOperation[]

Retrieves the list of all operations on the database.

GetDatabaseUsages ( string databaseName ) : IEnumerable

Retrieve a specific database from the current context

GetDatabases ( ) : Database[]

Gets a list of all the databases in the current context.

GetDatabasesOperations ( ) : DatabaseOperation[]

Retrieves the list of all databases' operations on the server.

GetQuota ( string quotaName ) : Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota

Get a specific quota for a server

GetQuotas ( ) : Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota[]

Get a list of all quotas for a server

GetRestorableDroppedDatabase ( string databaseName, System.DateTime deletionDate ) : RestorableDroppedDatabase

Retrieve information on the restorable dropped database with the name databaseName and deletion date deletionDate.

GetRestorableDroppedDatabases ( ) : RestorableDroppedDatabase[]

Gets a list of all the restorable dropped databases in the current context.

GetServiceObjective ( ServiceObjective serviceObjectiveToRefresh ) : ServiceObjective

Retrieve information on latest service objective with service objective

GetServiceObjective ( string serviceObjectiveName ) : ServiceObjective

Retrieve information on service objective with the specified name

GetServiceObjectives ( ) : ServiceObjective[]

Retrieves the list of all service objectives on the server.

LoadExtraProperties ( object obj ) : void

Ensures any extra property on the given obj is loaded.

RemoveDatabase ( string databaseName ) : void

Remove a database from a server

RestoreDatabase ( string sourceDatabaseName, System.DateTime sourceDatabaseDeletionDate, string targetServerName, string targetDatabaseName, System.DateTime pointInTime ) : RestoreDatabaseOperation

Issues a restore request for the given source database to the given target database.

StartDatabaseCopy ( string databaseName, string partnerServer, string partnerDatabaseName, bool continuousCopy, bool isOfflineSecondary ) : DatabaseCopyModel

Start database copy on the database with the name databaseName.

StopDatabaseCopy ( DatabaseCopyModel databaseCopy, bool forcedTermination ) : void

Terminate an ongoing database copy operation.

UpdateDatabase ( string databaseName, string newDatabaseName, int databaseMaxSizeInGB, long databaseMaxSizeInBytes, DatabaseEdition databaseEdition, ServiceObjective serviceObjective ) : Database

Update a database on the server.

Private Methods

Method Description
AddTracingHeaders ( Microsoft.WindowsAzure.Management.Sql.SqlManagementClient sqlManagementClient ) : void

Add the tracing session and request headers to the client.

CreateDatabaseCopyFromResponse ( WamlDatabaseCopy response ) : DatabaseCopyModel
CreateDatabaseFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.DatabaseCreateResponse response ) : Database

Given a DatabaseCreateResponse this will create and return a Database object with the fields filled in.

CreateDatabaseFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.DatabaseGetResponse response ) : Database

Given a DatabaseGetResponse this will create and return a Database object with the fields filled in.

CreateDatabaseFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.DatabaseUpdateResponse response ) : Database

Given a DatabaseUpdateResponse this will create and return a Database object with the fields filled in.

CreateDatabaseFromResponse ( int id, string name, System.DateTime creationDate, string edition, string collationName, long maximumDatabaseSizeInGB, long maximumDatabaseSizeInBytes, bool isFederationRoot, bool isSystemObject, string sizeMB, string serviceObjectiveAssignmentErrorCode, string serviceObjectiveAssignmentErrorDescription, string serviceObjectiveAssignmentState, string serviceObjectiveAssignmentStateDescription, string serviceObjectiveAssignmentSuccessDate, string serviceObjectiveId, string assignedServiceObjectiveId, System.DateTime recoveryPeriodStartDate, string state ) : Database

Given a set of database properties this will create and return a Database object with the fields filled in.

CreateDatabaseFromResponse ( DatabaseListResponse response ) : Database[]

Given a DatabaseListResponse this will create and return an array of Database objects with the fields filled in.

CreateDatabaseOperation ( string name, string state, string id, int stateId, string sessionActivityId, string databaseName, int percentComplete, int errorCode, string error, int errorSeverity, int errorState, System.DateTime startTime, System.DateTime lastModifyTime ) : DatabaseOperation
CreateDatabaseOperationFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.DatabaseOperationGetResponse response ) : DatabaseOperation
CreateDatabaseOperationsFromResponse ( DatabaseOperationListResponse response ) : DatabaseOperation[]
CreateDimensionSettings ( string name, string id, string description, byte ordinal, bool isDefault ) : Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.DimensionSetting
CreateDimensionSettingsFromResponse ( IList dimensionSettingsList ) : Collection
CreateMetricsFromResponse ( DatabaseUsagesListResponse response ) : IEnumerable

Converts a DatabaseUsagesListResponse into IEnumerable

CreateRestorableDroppedDatabaseFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.RestorableDroppedDatabaseGetResponse response ) : RestorableDroppedDatabase

Given a RestorableDroppedDatabaseGetResponse this will create and return a RestorableDroppedDatabase object with the fields filled in.

CreateRestorableDroppedDatabaseFromResponse ( string entityId, string name, string serverName, string edition, long maximumDatabaseSizeInBytes, System.DateTime creationDate, System.DateTime deletionDate, System.DateTime recoveryPeriodStartDate ) : RestorableDroppedDatabase

Given a set of restorable dropped database properties this will create and return a RestorableDroppedDatabase object with the fields filled in.

CreateRestorableDroppedDatabaseFromResponse ( RestorableDroppedDatabaseListResponse response ) : RestorableDroppedDatabase[]

Given a RestorableDroppedDatabaseListResponse this will create and return an array of RestorableDroppedDatabase object with the fields filled in.

CreateRestoreDatabaseOperationFromResponse ( Microsoft.WindowsAzure.Management.Sql.Models.RestoreDatabaseOperationCreateResponse response ) : RestoreDatabaseOperation

Given a RestoreDatabaseOperationCreateResponse this will create and return a RestoreDatabaseOperation object with the fields filled in.

CreateServiceObjectiveFromResponse ( Management response ) : ServiceObjective
LoadExtraProperties ( Database database ) : void

Ensures any extra property on the given database is loaded.

LoadExtraProperties ( RestorableDroppedDatabase database ) : void

Ensures any extra property on the given database is loaded.

PopulateSloCache ( ) : void
ServerDataServiceCertAuth ( AzureSMProfile profile, AzureSubscription subscription, string serverName ) : System

Initializes a new instance of the ServerDataServiceCertAuth class

Method Details

Create() public static method

Creates and returns a new instance of the ServerDataServiceCertAuth class which connects to the specified server using the specified subscription credentials.
public static Create ( string serverName, AzureSMProfile profile, AzureSubscription subscription ) : ServerDataServiceCertAuth
serverName string The name of the server to connect to.
profile Microsoft.Azure.Commands.Common.Authentication.Models.AzureSMProfile
subscription Microsoft.Azure.Commands.Common.Authentication.Models.AzureSubscription The subscription used to connect and authenticate.
return ServerDataServiceCertAuth

CreateNewDatabase() public method

Creates a new sql database.
public CreateNewDatabase ( string databaseName, int databaseMaxSizeInGB, long databaseMaxSizeInBytes, string databaseCollation, DatabaseEdition databaseEdition, ServiceObjective serviceObjective ) : Database
databaseName string The name for the new database
databaseMaxSizeInGB int The maximum size of the new database
databaseMaxSizeInBytes long
databaseCollation string The collation for the new database
databaseEdition DatabaseEdition The edition for the new database
serviceObjective ServiceObjective
return Database

GetDatabase() public method

Retrieve a specific database from the current context
public GetDatabase ( string databaseName ) : Database
databaseName string The name of the database to retrieve
return Database

GetDatabaseCopy() public method

Refreshes the given database copy object.
public GetDatabaseCopy ( DatabaseCopyModel databaseCopy ) : DatabaseCopyModel
databaseCopy DatabaseCopyModel The object to refresh.
return DatabaseCopyModel

GetDatabaseCopy() public method

Retrieve all database copy objects with matching parameters.
public GetDatabaseCopy ( string databaseName, string partnerServer, string partnerDatabaseName ) : DatabaseCopyModel[]
databaseName string The name of the database to copy.
partnerServer string The name for the partner server.
partnerDatabaseName string The name of the database on the partner server.
return DatabaseCopyModel[]

GetDatabaseOperation() public method

Retrieve information on operation with the guid
public GetDatabaseOperation ( System.Guid OperationGuid ) : DatabaseOperation
OperationGuid System.Guid The Guid of the operation to retrieve.
return DatabaseOperation

GetDatabaseOperations() public method

Retrieves the list of all operations on the database.
public GetDatabaseOperations ( string databaseName ) : DatabaseOperation[]
databaseName string The name of database to retrieve operations.
return DatabaseOperation[]

GetDatabaseUsages() public method

Retrieve a specific database from the current context
public GetDatabaseUsages ( string databaseName ) : IEnumerable
databaseName string The name of the database to retrieve
return IEnumerable

GetDatabases() public method

Gets a list of all the databases in the current context.
public GetDatabases ( ) : Database[]
return Database[]

GetDatabasesOperations() public method

Retrieves the list of all databases' operations on the server.
public GetDatabasesOperations ( ) : DatabaseOperation[]
return DatabaseOperation[]

GetQuota() public method

Get a specific quota for a server
public GetQuota ( string quotaName ) : Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota
quotaName string The name of the quota to retrieve
return Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota

GetQuotas() public method

Get a list of all quotas for a server
public GetQuotas ( ) : Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota[]
return Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota[]

GetRestorableDroppedDatabase() public method

Retrieve information on the restorable dropped database with the name databaseName and deletion date deletionDate.
public GetRestorableDroppedDatabase ( string databaseName, System.DateTime deletionDate ) : RestorableDroppedDatabase
databaseName string The name of the restorable dropped database to retrieve.
deletionDate System.DateTime The deletion date of the restorable dropped database to retrieve.
return RestorableDroppedDatabase

GetRestorableDroppedDatabases() public method

Gets a list of all the restorable dropped databases in the current context.
public GetRestorableDroppedDatabases ( ) : RestorableDroppedDatabase[]
return RestorableDroppedDatabase[]

GetServiceObjective() public method

Retrieve information on latest service objective with service objective
public GetServiceObjective ( ServiceObjective serviceObjectiveToRefresh ) : ServiceObjective
serviceObjectiveToRefresh ServiceObjective The service objective to refresh.
return ServiceObjective

GetServiceObjective() public method

Retrieve information on service objective with the specified name
public GetServiceObjective ( string serviceObjectiveName ) : ServiceObjective
serviceObjectiveName string The service objective to retrieve.
return ServiceObjective

GetServiceObjectives() public method

Retrieves the list of all service objectives on the server.
public GetServiceObjectives ( ) : ServiceObjective[]
return ServiceObjective[]

LoadExtraProperties() public method

Ensures any extra property on the given obj is loaded.
public LoadExtraProperties ( object obj ) : void
obj object The object that needs the extra properties.
return void

RemoveDatabase() public method

Remove a database from a server
public RemoveDatabase ( string databaseName ) : void
databaseName string The name of the database to delete
return void

RestoreDatabase() public method

Issues a restore request for the given source database to the given target database.
public RestoreDatabase ( string sourceDatabaseName, System.DateTime sourceDatabaseDeletionDate, string targetServerName, string targetDatabaseName, System.DateTime pointInTime ) : RestoreDatabaseOperation
sourceDatabaseName string The name of the source database.
sourceDatabaseDeletionDate System.DateTime The deletion date of the source database, in case it is a dropped database.
targetServerName string The name of the server to create the restored database on.
targetDatabaseName string The name of the database to be created with the restored contents.
pointInTime System.DateTime The point in time to restore the source database to.
return RestoreDatabaseOperation

StartDatabaseCopy() public method

Start database copy on the database with the name databaseName.
public StartDatabaseCopy ( string databaseName, string partnerServer, string partnerDatabaseName, bool continuousCopy, bool isOfflineSecondary ) : DatabaseCopyModel
databaseName string The name of the database to copy.
partnerServer string The name for the partner server.
partnerDatabaseName string The name of the database on the partner server.
continuousCopy bool true to make this a continuous copy.
isOfflineSecondary bool true to make this an offline secondary copy.
return DatabaseCopyModel

StopDatabaseCopy() public method

Terminate an ongoing database copy operation.
public StopDatabaseCopy ( DatabaseCopyModel databaseCopy, bool forcedTermination ) : void
databaseCopy DatabaseCopyModel The database copy to terminate.
forcedTermination bool true to forcefully terminate the copy.
return void

UpdateDatabase() public method

Update a database on the server.
public UpdateDatabase ( string databaseName, string newDatabaseName, int databaseMaxSizeInGB, long databaseMaxSizeInBytes, DatabaseEdition databaseEdition, ServiceObjective serviceObjective ) : Database
databaseName string The name of the database to modify.
newDatabaseName string The new name of the database.
databaseMaxSizeInGB int The new maximum size of the database.
databaseMaxSizeInBytes long
databaseEdition DatabaseEdition The new edition of the database.
serviceObjective ServiceObjective The new service objective of the database.
return Database