/// <summary> /// Updates an existing backend. /// </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='backendid'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// 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 UpdateAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates or Updates a backend. /// </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='backendid'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// Create parameters. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. Not required when creating an entity, but required when /// updating an entity. /// </param> public static BackendContract CreateOrUpdate(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendContract parameters, string ifMatch = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Updates an existing backend. /// </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='backendid'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// 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 void Update(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid, BackendUpdateParameters parameters, string ifMatch) { operations.UpdateAsync(resourceGroupName, serviceName, backendid, parameters, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Gets the entity state (Etag) version of the backend 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='backendId'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> public static BackendGetEntityTagHeaders GetEntityTag(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendId) { return(operations.GetEntityTagAsync(resourceGroupName, serviceName, backendId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the details of the backend 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='backendid'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> public static BackendContract Get(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendid) { return(operations.GetAsync(resourceGroupName, serviceName, backendid).GetAwaiter().GetResult()); }
/// <summary> /// Lists a collection of backends in the specified service instance. /// </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 <BackendContract> ListByServiceNext(this IBackendOperations operations, string nextPageLink) { return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Notifies the APIM proxy to create a new connection to the backend after the /// specified timeout. If no timeout was specified, timeout of 2 minutes is /// used. /// </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='backendId'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// Reconnect request parameters. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ReconnectAsync(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendId, BackendReconnectContract parameters = default(BackendReconnectContract), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ReconnectWithHttpMessagesAsync(resourceGroupName, serviceName, backendId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Lists a collection of backends in the specified service instance. /// </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='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <BackendContract> ListByService(this IBackendOperations operations, string resourceGroupName, string serviceName, ODataQuery <BackendContract> odataQuery = default(ODataQuery <BackendContract>)) { return(operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Notifies the APIM proxy to create a new connection to the backend after the /// specified timeout. If no timeout was specified, timeout of 2 minutes is /// used. /// </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='backendId'> /// Identifier of the Backend entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// Reconnect request parameters. /// </param> public static void Reconnect(this IBackendOperations operations, string resourceGroupName, string serviceName, string backendId, BackendReconnectContract parameters = default(BackendReconnectContract)) { operations.ReconnectAsync(resourceGroupName, serviceName, backendId, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified backend. /// </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='backendId'> /// Identifier of the Backend entity. 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 IBackendOperations operations, string resourceGroupName, string serviceName, string backendId, string ifMatch) { operations.DeleteAsync(resourceGroupName, serviceName, backendId, ifMatch).GetAwaiter().GetResult(); }