/// <summary> /// Gets a list of virtual network rules in a server. /// </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 <VirtualNetworkRule> > ListByServerNextAsync(this IVirtualNetworkRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an existing virtual network rule. /// </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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> /// <param name='parameters'> /// The requested virtual Network Rule Resource state. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VirtualNetworkRuleInner> CreateOrUpdateAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName, VirtualNetworkRuleInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the Data Lake Store virtual network rules within the specified Data /// Lake Store account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <VirtualNetworkRule> > ListByAccountAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates the specified virtual network rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='virtualNetworkRuleName'> /// The name of the virtual network rule to update. /// </param> /// <param name='parameters'> /// Parameters supplied to update the virtual network rule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VirtualNetworkRule> UpdateAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, string virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters = default(UpdateVirtualNetworkRuleParameters), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a virtual network rule. /// </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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VirtualNetworkRule> GetAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, virtualNetworkRuleName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a virtual network rule. /// </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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> public static VirtualNetworkRule Get(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName) { return(operations.GetAsync(resourceGroupName, serverName, virtualNetworkRuleName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of virtual network rules in a server. /// </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 <VirtualNetworkRule> ListByServerNext(this IVirtualNetworkRulesOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the virtual network rule 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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, virtualNetworkRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the virtual network rule 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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> public static void BeginDelete(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName) { operations.BeginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName).GetAwaiter().GetResult(); }
/// <summary> /// Gets a list of virtual network rules in a server. /// </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 IPage <VirtualNetworkRule> ListByServer(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName) { return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }
/// <summary> /// Updates the specified virtual network rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='virtualNetworkRuleName'> /// The name of the virtual network rule to update. /// </param> /// <param name='parameters'> /// Parameters supplied to update the virtual network rule. /// </param> public static VirtualNetworkRule Update(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, string virtualNetworkRuleName, UpdateVirtualNetworkRuleParameters parameters = default(UpdateVirtualNetworkRuleParameters)) { return(operations.UpdateAsync(resourceGroupName, accountName, virtualNetworkRuleName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of virtual network rules in a server. /// </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 <VirtualNetworkRuleInner> > ListByServerNextAsync(this IVirtualNetworkRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the Data Lake Store virtual network rules within the specified Data /// Lake Store account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> public static IPage <VirtualNetworkRule> ListByAccount(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName) { return(operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified virtual network rule from the specified Data Lake /// Store account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the Azure resource group. /// </param> /// <param name='accountName'> /// The name of the Data Lake Store account. /// </param> /// <param name='virtualNetworkRuleName'> /// The name of the virtual network rule to delete. /// </param> public static void Delete(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string accountName, string virtualNetworkRuleName) { operations.DeleteAsync(resourceGroupName, accountName, virtualNetworkRuleName).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the virtual network rule 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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, virtualNetworkRuleName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates or updates an existing virtual network rule. /// </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='virtualNetworkRuleName'> /// The name of the virtual network rule. /// </param> /// <param name='parameters'> /// The requested virtual Network Rule Resource state. /// </param> public static VirtualNetworkRule CreateOrUpdate(this IVirtualNetworkRulesOperations operations, string resourceGroupName, string serverName, string virtualNetworkRuleName, VirtualNetworkRule parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { BackupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesOperations(this); BackupLongTermRetentionVaults = new BackupLongTermRetentionVaultsOperations(this); RecoverableDatabases = new RecoverableDatabasesOperations(this); RestorableDroppedDatabases = new RestorableDroppedDatabasesOperations(this); RestorePoints = new RestorePointsOperations(this); Servers = new ServersOperations(this); ServerConnectionPolicies = new ServerConnectionPoliciesOperations(this); Databases = new DatabasesOperations(this); DatabaseThreatDetectionPolicies = new DatabaseThreatDetectionPoliciesOperations(this); DataMaskingPolicies = new DataMaskingPoliciesOperations(this); DataMaskingRules = new DataMaskingRulesOperations(this); ElasticPools = new ElasticPoolsOperations(this); FirewallRules = new FirewallRulesOperations(this); GeoBackupPolicies = new GeoBackupPoliciesOperations(this); ReplicationLinks = new ReplicationLinksOperations(this); ServerAzureADAdministrators = new ServerAzureADAdministratorsOperations(this); ServerCommunicationLinks = new ServerCommunicationLinksOperations(this); ServiceObjectives = new ServiceObjectivesOperations(this); ElasticPoolActivities = new ElasticPoolActivitiesOperations(this); ElasticPoolDatabaseActivities = new ElasticPoolDatabaseActivitiesOperations(this); RecommendedElasticPools = new RecommendedElasticPoolsOperations(this); ServiceTierAdvisors = new ServiceTierAdvisorsOperations(this); TransparentDataEncryptions = new TransparentDataEncryptionsOperations(this); TransparentDataEncryptionActivities = new TransparentDataEncryptionActivitiesOperations(this); ServerUsages = new ServerUsagesOperations(this); DatabaseUsages = new DatabaseUsagesOperations(this); Capabilities = new CapabilitiesOperations(this); DatabaseBlobAuditingPolicies = new DatabaseBlobAuditingPoliciesOperations(this); EncryptionProtectors = new EncryptionProtectorsOperations(this); FailoverGroups = new FailoverGroupsOperations(this); Operations = new Operations(this); ServerKeys = new ServerKeysOperations(this); SyncAgents = new SyncAgentsOperations(this); SyncGroups = new SyncGroupsOperations(this); SyncMembers = new SyncMembersOperations(this); SubscriptionUsages = new SubscriptionUsagesOperations(this); VirtualNetworkRules = new VirtualNetworkRulesOperations(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() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }