Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR Microsoft.Azure.Management.CosmosDB] fix: rename cosmosdb output folder to cosmos #10124

Closed
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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.CosmosDB
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for CollectionOperations.
/// </summary>
public static partial class CollectionOperationsExtensions
{
/// <summary>
/// Retrieves the metrics determined by the given filter for the given database
/// account and collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
/// <param name='filter'>
/// An OData filter expression that describes a subset of metrics to return.
/// The parameters that can be filtered are name.value (name of the metric, can
/// have an or of multiple names), startTime, endTime, and timeGrain. The
/// supported operator is eq.
/// </param>
public static IEnumerable<Metric> ListMetrics(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter)
{
return operations.ListMetricsAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieves the metrics determined by the given filter for the given database
/// account and collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
/// <param name='filter'>
/// An OData filter expression that describes a subset of metrics to return.
/// The parameters that can be filtered are name.value (name of the metric, can
/// have an or of multiple names), startTime, endTime, and timeGrain. The
/// supported operator is eq.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<Metric>> ListMetricsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListMetricsWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Retrieves the usages (most recent storage data) for the given collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
/// <param name='filter'>
/// An OData filter expression that describes a subset of usages to return. The
/// supported parameter is name.value (name of the metric, can have an or of
/// multiple names).
/// </param>
public static IEnumerable<Usage> ListUsages(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter = default(string))
{
return operations.ListUsagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieves the usages (most recent storage data) for the given collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
/// <param name='filter'>
/// An OData filter expression that describes a subset of usages to return. The
/// supported parameter is name.value (name of the metric, can have an or of
/// multiple names).
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<Usage>> ListUsagesAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Retrieves metric definitions for the given collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
public static IEnumerable<MetricDefinition> ListMetricDefinitions(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid)
{
return operations.ListMetricDefinitionsAsync(resourceGroupName, accountName, databaseRid, collectionRid).GetAwaiter().GetResult();
}

/// <summary>
/// Retrieves metric definitions for the given collection.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Name of an Azure resource group.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='databaseRid'>
/// Cosmos DB database rid.
/// </param>
/// <param name='collectionRid'>
/// Cosmos DB collection rid.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<MetricDefinition>> ListMetricDefinitionsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, accountName, databaseRid, collectionRid, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading