/// <summary> /// Gets a database's transparent data encryption configuration. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <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='serverName'> /// The name of the server. /// </param> /// <param name='databaseName'> /// The name of the database for which the transparent data encryption applies. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TransparentDataEncryptionInner> GetAsync(this ITransparentDataEncryptionsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a logical database's transparent data encryption configuration. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <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='serverName'> /// The name of the server. /// </param> /// <param name='databaseName'> /// The name of the logical database for which the security alert policy is /// defined. /// </param> /// <param name='parameters'> /// The database transparent data encryption. /// </param> public static LogicalDatabaseTransparentDataEncryption CreateOrUpdate(this ITransparentDataEncryptionsOperations operations, string resourceGroupName, string serverName, string databaseName, LogicalDatabaseTransparentDataEncryption parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a logical database's transparent data encryption. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <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='serverName'> /// The name of the server. /// </param> /// <param name='databaseName'> /// The name of the logical database for which the transparent data encryption /// is defined. /// </param> public static LogicalDatabaseTransparentDataEncryption Get(this ITransparentDataEncryptionsOperations operations, string resourceGroupName, string serverName, string databaseName) { return(operations.GetAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of the logical database's transparent data encryption. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <LogicalDatabaseTransparentDataEncryption> > ListByDatabaseNextAsync(this ITransparentDataEncryptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of the logical database's transparent data encryption. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <LogicalDatabaseTransparentDataEncryption> ListByDatabaseNext(this ITransparentDataEncryptionsOperations operations, string nextPageLink) { return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Updates a logical database's transparent data encryption configuration. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <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='serverName'> /// The name of the server. /// </param> /// <param name='databaseName'> /// The name of the logical database for which the security alert policy is /// defined. /// </param> /// <param name='parameters'> /// The database transparent data encryption. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LogicalDatabaseTransparentDataEncryption> CreateOrUpdateAsync(this ITransparentDataEncryptionsOperations operations, string resourceGroupName, string serverName, string databaseName, LogicalDatabaseTransparentDataEncryption parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a database's transparent data encryption configuration. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <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='serverName'> /// The name of the server. /// </param> /// <param name='databaseName'> /// The name of the database for which setting the transparent data encryption /// applies. /// </param> /// <param name='status'> /// The status of the database transparent data encryption. Possible values /// include: 'Enabled', 'Disabled' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TransparentDataEncryptionInner> CreateOrUpdateAsync(this ITransparentDataEncryptionsOperations operations, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionStates?status = default(TransparentDataEncryptionStates?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, status, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }