예제 #1
0
 /// <summary>
 /// Gets a list of  Server keys.
 /// </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 <ServerKey> ListByServerNext(this IServerKeysOperations operations, string nextPageLink)
 {
     return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
예제 #2
0
 /// <summary>
 /// Deletes the MySQL Server key with the given name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='keyName'>
 /// The name of the server key.
 /// </param>
 public static void BeginDelete(this IServerKeysOperations operations, string resourceGroupName, string serverName, string keyName)
 {
     operations.BeginDeleteAsync(resourceGroupName, serverName, keyName).GetAwaiter().GetResult();
 }
예제 #3
0
 /// <summary>
 /// Deletes the MySQL Server key with the given name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='keyName'>
 /// The name of the server key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IServerKeysOperations operations, string resourceGroupName, string serverName, string keyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, keyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #4
0
 /// <summary>
 /// Creates or updates a MySQL Server key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='keyName'>
 /// The name of the server key.
 /// </param>
 /// <param name='parameters'>
 /// The requested MySQL Server key resource state.
 /// </param>
 public static ServerKey BeginCreateOrUpdate(this IServerKeysOperations operations, string resourceGroupName, string serverName, string keyName, ServerKey parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, serverName, keyName, parameters).GetAwaiter().GetResult());
 }
예제 #5
0
 /// <summary>
 /// Gets a list of  Server keys.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 public static IPage <ServerKey> ListByServer(this IServerKeysOperations operations, string resourceGroupName, string serverName)
 {
     return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// Gets a server key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='keyName'>
 /// The name of the server key.
 /// </param>
 public static ServerKey Get(this IServerKeysOperations operations, string resourceGroupName, string serverName, string keyName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, keyName).GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Servers                      = new ServersOperations(this);
     Replicas                     = new ReplicasOperations(this);
     FirewallRules                = new FirewallRulesOperations(this);
     VirtualNetworkRules          = new VirtualNetworkRulesOperations(this);
     Databases                    = new DatabasesOperations(this);
     Configurations               = new ConfigurationsOperations(this);
     ServerParameters             = new ServerParametersOperations(this);
     LogFiles                     = new LogFilesOperations(this);
     ServerAdministrators         = new ServerAdministratorsOperations(this);
     RecoverableServers           = new RecoverableServersOperations(this);
     ServerBasedPerformanceTier   = new ServerBasedPerformanceTierOperations(this);
     LocationBasedPerformanceTier = new LocationBasedPerformanceTierOperations(this);
     CheckNameAvailability        = new CheckNameAvailabilityOperations(this);
     Operations                   = new Operations(this);
     ServerSecurityAlertPolicies  = new ServerSecurityAlertPoliciesOperations(this);
     QueryTexts                   = new QueryTextsOperations(this);
     TopQueryStatistics           = new TopQueryStatisticsOperations(this);
     WaitStatistics               = new WaitStatisticsOperations(this);
     Advisors                     = new AdvisorsOperations(this);
     RecommendedActions           = new RecommendedActionsOperations(this);
     LocationBasedRecommendedActionSessionsOperationStatus = new LocationBasedRecommendedActionSessionsOperationStatusOperations(this);
     LocationBasedRecommendedActionSessionsResult          = new LocationBasedRecommendedActionSessionsResultOperations(this);
     PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
     PrivateLinkResources       = new PrivateLinkResourcesOperations(this);
     ServerKeys     = new ServerKeysOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ServerPropertiesForCreate>("createMode"));
     DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ServerPropertiesForCreate>("createMode"));
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
예제 #8
0
 /// <summary>
 /// Deletes the server key with the given name.
 /// </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='keyName'>
 /// The name of the server key to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IServerKeysOperations operations, string resourceGroupName, string serverName, string keyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, keyName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }