/// <summary>
 /// Deletes a database replication link. Cannot be done during failover.
 /// </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 that has the replication link to be dropped.
 /// </param>
 /// <param name='linkId'>
 /// The ID of the replication link to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IReplicationLinksOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#2
0
 /// <summary>
 /// Deletes the elastic pool.
 /// </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='elasticPoolName'>
 /// The name of the elastic pool to be deleted.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#3
0
 /// <summary>
 /// Updates an existing elastic pool.
 /// </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='elasticPoolName'>
 /// The name of the elastic pool to be updated.
 /// </param>
 /// <param name='parameters'>
 /// The required parameters for updating an elastic pool.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ElasticPoolInner> UpdateAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, ElasticPoolUpdateInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Refreshes a hub database schema.
 /// </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 on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#5
0
 /// <summary>
 /// Gets a firewall 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='firewallRuleName'>
 /// The name of the firewall rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FirewallRuleInner> GetAsync(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, firewallRuleName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a collection of sync group logs.
 /// </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 on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='startTime'>
 /// Get logs generated after this time.
 /// </param>
 /// <param name='endTime'>
 /// Get logs generated before this time.
 /// </param>
 /// <param name='type'>
 /// The types of logs to retrieve. Possible values include: 'All', 'Error',
 /// 'Warning', 'Success'
 /// </param>
 /// <param name='continuationToken'>
 /// The continuation token for this operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SyncGroupLogProperties> > ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates a sync group.
 /// </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 on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='parameters'>
 /// The requested sync group resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncGroupInner> BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroupInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Acquires server DNS alias from another 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 that the alias is pointing to.
 /// </param>
 /// <param name='dnsAliasName'>
 /// The name of the server dns alias.
 /// </param>
 /// <param name='oldServerDnsAliasId'>
 /// The id of the server alias that will be acquired to point to this server
 /// instead.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginAcquireAsync(this IServerDnsAliasesOperations operations, string resourceGroupName, string serverName, string dnsAliasName, string oldServerDnsAliasId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginAcquireWithHttpMessagesAsync(resourceGroupName, serverName, dnsAliasName, oldServerDnsAliasId, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Creates a server dns alias.
 /// </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 that the alias is pointing to.
 /// </param>
 /// <param name='dnsAliasName'>
 /// The name of the server DNS alias.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServerDnsAliasInner> CreateOrUpdateAsync(this IServerDnsAliasesOperations operations, string resourceGroupName, string serverName, string dnsAliasName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, dnsAliasName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the capabilities available for the specified location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationId'>
 /// The location id whose capabilities are retrieved.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LocationCapabilitiesInner> ListByLocationAsync(this ICapabilitiesOperations operations, string locationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationWithHttpMessagesAsync(locationId, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#11
0
 /// <summary>
 /// Creates a server communication link.
 /// </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='communicationLinkName'>
 /// The name of the server communication link.
 /// </param>
 /// <param name='partnerServer'>
 /// The name of the partner server.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServerCommunicationLinkInner> BeginCreateOrUpdateAsync(this IServerCommunicationLinksOperations operations, string resourceGroupName, string serverName, string communicationLinkName, string partnerServer, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, communicationLinkName, partnerServer, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#12
0
 /// <summary>
 /// Gets a subscription usage metric.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='usageName'>
 /// Name of usage metric to return.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SubscriptionUsageInner> GetAsync(this ISubscriptionUsagesOperations operations, string locationName, string usageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(locationName, usageName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#13
0
 /// <summary>
 /// Returns a database's transparent data encryption operation result.
 /// </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 <IEnumerable <TransparentDataEncryptionActivity> > ListByConfigurationAsync(this ITransparentDataEncryptionActivitiesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByConfigurationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a database replication link.
 /// </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 to get the link for.
 /// </param>
 /// <param name='linkId'>
 /// The replication link ID to be retrieved.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ReplicationLinkInner> GetAsync(this IReplicationLinksOperations operations, string resourceGroupName, string serverName, string databaseName, string linkId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, linkId, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#15
0
 /// <summary>
 /// Gets a list of server encryption protectors
 /// </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 <EncryptionProtectorInner> > ListByServerAsync(this IEncryptionProtectorsOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServerWithHttpMessagesAsync(resourceGroupName, serverName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#16
0
 /// <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, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Fails over from the current primary server to this server. This operation
 /// might result in data loss.
 /// </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 containing the failover group.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FailoverGroupInner> BeginForceFailoverAllowDataLossAsync(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginForceFailoverAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, failoverGroupName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#18
0
 /// <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>
 /// Gets a collection of sync database ids.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SyncDatabaseIdProperties> > ListSyncDatabaseIdsAsync(this ISyncGroupsOperations operations, string locationName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListSyncDatabaseIdsWithHttpMessagesAsync(locationName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates a database's threat detection 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='databaseName'>
 /// The name of the database for which database Threat Detection policy is
 /// defined.
 /// </param>
 /// <param name='parameters'>
 /// The database Threat Detection policy.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DatabaseSecurityAlertPolicyInner> CreateOrUpdateAsync(this IDatabaseThreatDetectionPoliciesOperations operations, string resourceGroupName, string serverName, string databaseName, DatabaseSecurityAlertPolicyInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists sync groups under a hub database.
 /// </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 <SyncGroupInner> > ListByDatabaseNextAsync(this ISyncGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#22
0
 /// <summary>
 /// Returns a list of databases inside a recommented elastic pool.
 /// </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='recommendedElasticPoolName'>
 /// The name of the recommended elastic pool to be retrieved.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <DatabaseInner> > ListByRecommendedElasticPoolAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string recommendedElasticPoolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByRecommendedElasticPoolWithHttpMessagesAsync(resourceGroupName, serverName, recommendedElasticPoolName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a collection of hub database schemas.
 /// </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 on which the sync group is hosted.
 /// </param>
 /// <param name='syncGroupName'>
 /// The name of the sync group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <SyncFullSchemaProperties> > ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#24
0
 /// <summary>
 /// Returns database metrics.
 /// </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.
 /// </param>
 /// <param name='filter'>
 /// An OData filter expression that describes a subset of metrics to return.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Metric> > ListMetricsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, filter, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#25
0
 public SqlManager(RestClient restClient, string subscriptionId, string tenantId) :
     base(restClient, subscriptionId, SqlManagementClient.NewInstance(restClient))
 {
     Inner.SubscriptionId = subscriptionId;
     this.tenantId        = tenantId;
 }
示例#26
0
 /// <summary>
 /// Creates an import operation that imports a bacpac into an existing
 /// database. The existing database must be empty.
 /// </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 to import into
 /// </param>
 /// <param name='parameters'>
 /// The required parameters for importing a Bacpac into a database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ImportExportResponseInner> BeginCreateImportOperationAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExtensionRequestInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateImportOperationWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#27
0
 /// <summary>
 /// Returns elastic pool metric definitions.
 /// </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='elasticPoolName'>
 /// The name of the elastic pool.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <MetricDefinition> > ListMetricDefinitionsAsync(this IElasticPoolsOperations operations, string resourceGroupName, string serverName, string elasticPoolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, elasticPoolName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#28
0
 /// <summary>
 /// Gets a sync member database schema.
 /// </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 <SyncFullSchemaProperties> > ListMemberSchemasNextAsync(this ISyncMembersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMemberSchemasNextWithHttpMessagesAsync(nextPageLink, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#29
0
 /// <summary>
 /// Creates a restore point for a data warehouse.
 /// </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.
 /// </param>
 /// <param name='restorePointLabel'>
 /// The restore point label to apply
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePointInner> CreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointLabel, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, restorePointLabel, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Generates a sync agent key.
 /// </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 on which the sync agent is hosted.
 /// </param>
 /// <param name='syncAgentName'>
 /// The name of the sync agent.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SyncAgentKeyPropertiesInner> GenerateKeyAsync(this ISyncAgentsOperations operations, string resourceGroupName, string serverName, string syncAgentName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateKeyWithHttpMessagesAsync(resourceGroupName, serverName, syncAgentName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }