/// <summary> /// Lists all releases of an API. An API release is created when making an API /// Revision current. Releases are also used to rollback to previous revisions. /// Results will be paged and can be constrained by the $top and $skip /// parameters. /// </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 <ApiReleaseContract> > ListByServiceAsync(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <ApiReleaseContract> odataQuery = default(ODataQuery <ApiReleaseContract>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new Release for the 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='releaseId'> /// Release identifier within an API. 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> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApiReleaseContract> CreateOrUpdateAsync(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, ApiReleaseContract parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the details of an API release. /// </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='releaseId'> /// Release identifier within an API. Must be unique in the current API /// Management service instance. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApiReleaseContract> GetAsync(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, releaseId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all releases of an API. An API release is created when making an API /// Revision current. Releases are also used to rollback to previous revisions. /// Results will be paged and can be constrained by the $top and $skip /// parameters. /// </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 <ApiReleaseContract> > ListNextAsync(this IApiReleaseOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all releases of an API. An API release is created when making an API /// Revision current. Releases are also used to rollback to previous revisions. /// Results will be paged and can be constrained by the $top and $skip /// parameters. /// </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 <ApiReleaseContract> ListByService(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, ODataQuery <ApiReleaseContract> odataQuery = default(ODataQuery <ApiReleaseContract>)) { return(operations.ListByServiceAsync(resourceGroupName, serviceName, apiId, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Lists all releases of an API. An API release is created when making an API /// Revision current. Releases are also used to rollback to previous revisions. /// Results will be paged and can be constrained by the $top and $skip /// parameters. /// </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 <ApiReleaseContract> ListByServiceNext(this IApiReleaseOperations operations, string nextPageLink) { return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the specified release in the 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='releaseId'> /// Release identifier within an API. 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 IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, releaseId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the specified release in the 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='releaseId'> /// Release identifier within an API. 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 IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, string ifMatch) { operations.DeleteAsync(resourceGroupName, serviceName, apiId, releaseId, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Updates the details of the release of the 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='releaseId'> /// Release identifier within an API. Must be unique in the current API /// Management service instance. /// </param> /// <param name='parameters'> /// API Release 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 IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, ApiReleaseContract parameters, string ifMatch) { operations.UpdateAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch).GetAwaiter().GetResult(); }
/// <summary> /// Creates a new Release for the 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='releaseId'> /// Release identifier within an API. 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 ApiReleaseContract CreateOrUpdate(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId, ApiReleaseContract parameters, string ifMatch = default(string)) { return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, releaseId, parameters, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Returns the details of an API release. /// </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='releaseId'> /// Release identifier within an API. Must be unique in the current API /// Management service instance. /// </param> public static ApiReleaseContract Get(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId) { return(operations.GetAsync(resourceGroupName, serviceName, apiId, releaseId).GetAwaiter().GetResult()); }
/// <summary> /// Returns the etag of an API release. /// </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='releaseId'> /// Release identifier within an API. Must be unique in the current API /// Management service instance. /// </param> public static ApiReleaseGetEntityTagHeaders GetEntityTag(this IApiReleaseOperations operations, string resourceGroupName, string serviceName, string apiId, string releaseId) { return(operations.GetEntityTagAsync(resourceGroupName, serviceName, apiId, releaseId).GetAwaiter().GetResult()); }