/// <summary> /// Creates or updates the server's connection policy. /// </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='parameters'> /// The required parameters for updating a secure connection policy. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerConnectionPolicy> CreateOrUpdateAsync(this IServerConnectionPoliciesOperations operations, string resourceGroupName, string serverName, ServerConnectionPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the server's secure connection policy. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerConnectionPolicyInner> GetAsync(this IServerConnectionPoliciesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists connection policy /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ServerConnectionPolicy> > ListByServerAsync(this IServerConnectionPoliciesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the server's secure connection policy. /// </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> public static ServerConnectionPolicy Get(this IServerConnectionPoliciesOperations operations, string resourceGroupName, string serverName) { return(operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates the server's connection policy. /// </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='parameters'> /// The required parameters for updating a secure connection policy. /// </param> public static ServerConnectionPolicy CreateOrUpdate(this IServerConnectionPoliciesOperations operations, string resourceGroupName, string serverName, ServerConnectionPolicy parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists connection policy /// </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 <ServerConnectionPolicy> > ListByServerNextAsync(this IServerConnectionPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists connection policy /// </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 <ServerConnectionPolicy> ListByServerNext(this IServerConnectionPoliciesOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }