コード例 #1
0
 /// <summary>
 /// Lists a collection of apis associated with tags.
 /// </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 <TagResourceContract> > ListByTagsNextAsync(this IApiOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByTagsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Lists all APIs of the API Management service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis" />
 /// </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>
 /// <param name='expandApiVersionSet'>
 /// Include full ApiVersionSet resource in response
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ApiContract> > ListByServiceAsync(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery <ApiContract> odataQuery = default(ODataQuery <ApiContract>), bool?expandApiVersionSet = false, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, expandApiVersionSet, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Lists a collection of apis associated with tags.
 /// </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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <TagResourceContract> > ListByTagsAsync(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery <TagResourceContract> odataQuery = default(ODataQuery <TagResourceContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByTagsWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Creates new or updates existing specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='parameters'>
 /// Create or update 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 <ApiContract> CreateOrUpdateAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Gets the details 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 revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ApiContract> GetAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #6
0
 /// <summary>
 /// Gets the entity state (Etag) version 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 revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 public static ApiGetEntityTagHeaders GetEntityTag(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId)
 {
     return(operations.GetEntityTagAsync(resourceGroupName, serviceName, apiId).GetAwaiter().GetResult());
 }
コード例 #7
0
 /// <summary>
 /// Lists a collection of apis associated with tags.
 /// </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 <TagResourceContract> ListByTagsNext(this IApiOperations operations, string nextPageLink)
 {
     return(operations.ListByTagsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #8
0
 /// <summary>
 /// Lists all APIs of the API Management service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis" />
 /// </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>
 /// <param name='expandApiVersionSet'>
 /// Include full ApiVersionSet resource in response
 /// </param>
 public static IPage <ApiContract> ListByService(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery <ApiContract> odataQuery = default(ODataQuery <ApiContract>), bool?expandApiVersionSet = false)
 {
     return(operations.ListByServiceAsync(resourceGroupName, serviceName, odataQuery, expandApiVersionSet).GetAwaiter().GetResult());
 }
コード例 #9
0
 /// <summary>
 /// Lists all APIs of the API Management service instance.
 /// <see href="https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-apis" />
 /// </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 <ApiContract> ListByServiceNext(this IApiOperations operations, string nextPageLink)
 {
     return(operations.ListByServiceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Lists a collection of apis associated with tags.
 /// </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 <TagResourceContract> ListByTags(this IApiOperations operations, string resourceGroupName, string serviceName, ODataQuery <TagResourceContract> odataQuery = default(ODataQuery <TagResourceContract>))
 {
     return(operations.ListByTagsAsync(resourceGroupName, serviceName, odataQuery).GetAwaiter().GetResult());
 }
コード例 #11
0
 /// <summary>
 /// Deletes the specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </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='deleteRevisions'>
 /// Delete all revisions of the Api.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch, bool?deleteRevisions = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, ifMatch, deleteRevisions, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #12
0
 /// <summary>
 /// Deletes the specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </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='deleteRevisions'>
 /// Delete all revisions of the Api.
 /// </param>
 public static void Delete(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, string ifMatch, bool?deleteRevisions = default(bool?))
 {
     operations.DeleteAsync(resourceGroupName, serviceName, apiId, ifMatch, deleteRevisions).GetAwaiter().GetResult();
 }
コード例 #13
0
 /// <summary>
 /// Updates the specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='parameters'>
 /// API Update Contract 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 IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #14
0
 /// <summary>
 /// Updates the specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='parameters'>
 /// API Update Contract 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 IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiUpdateContract parameters, string ifMatch)
 {
     operations.UpdateAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).GetAwaiter().GetResult();
 }
コード例 #15
0
 /// <summary>
 /// Creates new or updates existing specified API of the API Management 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='apiId'>
 /// API revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 /// <param name='parameters'>
 /// Create or update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. Not required when creating an entity, but required when
 /// updating an entity.
 /// </param>
 public static ApiContract CreateOrUpdate(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId, ApiCreateOrUpdateParameter parameters, string ifMatch = default(string))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, apiId, parameters, ifMatch).GetAwaiter().GetResult());
 }
コード例 #16
0
 /// <summary>
 /// Gets the details 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 revision identifier. Must be unique in the current API Management
 /// service instance. Non-current revision has ;rev=n as a suffix where n is
 /// the revision number.
 /// </param>
 public static ApiContract Get(this IApiOperations operations, string resourceGroupName, string serviceName, string apiId)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, apiId).GetAwaiter().GetResult());
 }