Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
908 changes: 665 additions & 243 deletions src/SDKs/SqlManagement/Management.Sql/Generated/DatabasesOperations.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,108 @@ public static ImportExportResponse Export(this IDatabasesOperations operations,
}
}

/// <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>
public static IEnumerable<Metric> ListMetrics(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, string filter)
{
return operations.ListMetricsAsync(resourceGroupName, serverName, databaseName, filter).GetAwaiter().GetResult();
}

/// <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, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Returns database 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='databaseName'>
/// The name of the database.
/// </param>
public static IEnumerable<MetricDefinition> ListMetricDefinitions(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName)
{
return operations.ListMetricDefinitionsAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
}

/// <summary>
/// Returns database 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='databaseName'>
/// The name of the database.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<MetricDefinition>> ListMetricDefinitionsAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Deletes a database replication link. Cannot be done during failover.
/// </summary>
Expand Down Expand Up @@ -793,54 +895,6 @@ public static void Delete(this IDatabasesOperations operations, string resourceG
}
}

/// <summary>
/// Returns database usages.
/// </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>
public static IEnumerable<DatabaseMetric> ListUsages(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName)
{
return operations.ListUsagesAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
}

/// <summary>
/// Returns database usages.
/// </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='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<DatabaseMetric>> ListUsagesAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Gets a service tier advisor.
/// </summary>
Expand Down Expand Up @@ -1203,6 +1257,54 @@ public static DatabaseSecurityAlertPolicy CreateOrUpdateThreatDetectionPolicy(th
}
}

/// <summary>
/// Returns database usages.
/// </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>
public static IEnumerable<DatabaseUsage> ListUsages(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName)
{
return operations.ListUsagesAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult();
}

/// <summary>
/// Returns database usages.
/// </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='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<DatabaseUsage>> ListUsagesAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Gets a database's blob auditing policy.
/// </summary>
Expand All @@ -1217,7 +1319,7 @@ public static DatabaseSecurityAlertPolicy CreateOrUpdateThreatDetectionPolicy(th
/// The name of the server.
/// </param>
/// <param name='databaseName'>
/// The name of the database for which database blob audit policy is defined.
/// The name of the database for which the blob audit policy is defined.
/// </param>
public static DatabaseBlobAuditingPolicy GetBlobAuditingPolicy(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName)
{
Expand All @@ -1238,7 +1340,7 @@ public static DatabaseBlobAuditingPolicy GetBlobAuditingPolicy(this IDatabasesOp
/// The name of the server.
/// </param>
/// <param name='databaseName'>
/// The name of the database for which database blob audit policy is defined.
/// The name of the database for which the blob audit policy is defined.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand All @@ -1265,7 +1367,7 @@ public static DatabaseBlobAuditingPolicy GetBlobAuditingPolicy(this IDatabasesOp
/// The name of the server.
/// </param>
/// <param name='databaseName'>
/// The name of the database for which database blob audit policy will be
/// The name of the database for which the blob auditing policy will be
/// defined.
/// </param>
/// <param name='parameters'>
Expand All @@ -1290,7 +1392,7 @@ public static DatabaseBlobAuditingPolicy CreateOrUpdateBlobAuditingPolicy(this I
/// The name of the server.
/// </param>
/// <param name='databaseName'>
/// The name of the database for which database blob audit policy will be
/// The name of the database for which the blob auditing policy will be
/// defined.
/// </param>
/// <param name='parameters'>
Expand Down
Loading