/// <summary> /// Lists all diagnostics of an API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DiagnosticContract> > ListByServiceAsync(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <DiagnosticContract> odataQuery = default(ODataQuery <DiagnosticContract>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates the details of the Diagnostic for an API specified by its /// identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='parameters'> /// Diagnostic Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DiagnosticContract> UpdateAsync(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId, DiagnosticContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, diagnosticId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the entity state (Etag) version of the Diagnostic for an API specified /// by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> public static ApiDiagnosticGetEntityTagHeaders GetEntityTag(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId) { return(operations.GetEntityTagAsync(resourceGroupName, serviceName, apiId, diagnosticId).GetAwaiter().GetResult()); }
/// <summary> /// Lists all diagnostics of an API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <DiagnosticContract> ListByService(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <DiagnosticContract> odataQuery = default(ODataQuery <DiagnosticContract>)) { return(operations.ListByServiceAsync(resourceGroupName, serviceName, apiId, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Lists all diagnostics of an API. /// </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 <DiagnosticContract> > ListByServiceNextAsync(this IApiDiagnosticOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all diagnostics of an API. /// </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 <DiagnosticContract> ListByServiceNext(this IApiDiagnosticOperations operations, string nextPageLink) { return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified Diagnostic from an API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the specified Diagnostic from an API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> public static void Delete(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId, string ifMatch) { operations.DeleteAsync(resourceGroupName, serviceName, apiId, diagnosticId, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Updates the details of the Diagnostic for an API specified by its /// identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='parameters'> /// Diagnostic Update parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> public static DiagnosticContract Update(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId, DiagnosticContract parameters, string ifMatch) { return(operations.UpdateAsync(resourceGroupName, serviceName, apiId, diagnosticId, parameters, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Gets the details of the Diagnostic for an API specified by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> public static DiagnosticContract Get(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId) { return(operations.GetAsync(resourceGroupName, serviceName, apiId, diagnosticId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the entity state (Etag) version of the Diagnostic for an API specified /// by its identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='apiId'> /// API identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='diagnosticId'> /// Diagnostic identifier. Must be unique in the current API Management service /// instance. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApiDiagnosticGetEntityTagHeaders> GetEntityTagAsync(this IApiDiagnosticOperations operations, string resourceGroupName, string serviceName, string apiId, string diagnosticId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetEntityTagWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, diagnosticId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }