Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the ApiManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public ApiManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._apiOperationPolicy = new ApiOperationPolicyOperations(this);
     this._apiOperations      = new ApiOperationsOperations(this);
     this._apiPolicy          = new ApiPolicyOperations(this);
     this._apiProducts        = new ApiProductsOperations(this);
     this._apis = new ApisOperations(this);
     this._authorizationServers = new AuthorizationServersOperations(this);
     this._certificates         = new CertificatesOperations(this);
     this._groups               = new GroupsOperations(this);
     this._groupUsers           = new GroupUsersOperations(this);
     this._policySnippents      = new PolicySnippetsOperations(this);
     this._productApis          = new ProductApisOperations(this);
     this._productGroups        = new ProductGroupsOperations(this);
     this._productPolicy        = new ProductPolicyOperations(this);
     this._products             = new ProductsOperations(this);
     this._productSubscriptions = new ProductSubscriptionsOperations(this);
     this._regions              = new RegionsOperations(this);
     this._reports              = new ReportsOperations(this);
     this._resourceProvider     = new ResourceProviderOperations(this);
     this._subscriptions        = new SubscriptionsOperations(this);
     this._tenantPolicy         = new TenantPolicyOperations(this);
     this._userApplications     = new UserApplicationsOperations(this);
     this._userGroups           = new UserGroupsOperations(this);
     this._userIdentities       = new UserIdentitiesOperations(this);
     this._users      = new UsersOperations(this);
     this._apiVersion = "2014-02-14";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Beispiel #2
0
 /// <summary>
 /// Lists the collection of subscriptions to the specified product.
 /// </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='productId'>
 /// Product 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 <SubscriptionContract> > ListAsync(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery <SubscriptionContract> odataQuery = default(ODataQuery <SubscriptionContract>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, serviceName, productId, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Lists the collection of subscriptions to the specified product.
 /// </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 <SubscriptionContract> > ListNextAsync(this IProductSubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #4
0
 /// <summary>
 /// List all Product APIs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductSubscriptionsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Subscriptions operation response details.
 /// </returns>
 public static SubscriptionListResponse List(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string pid, QueryParameters query)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductSubscriptionsOperations)s).ListAsync(resourceGroupName, serviceName, pid, query);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #5
0
 /// <summary>
 /// List all Product APIs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductSubscriptionsOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Subscriptions operation response details.
 /// </returns>
 public static SubscriptionListResponse ListNext(this IProductSubscriptionsOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductSubscriptionsOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the ApiManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public ApiManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._apiOperationPolicy = new ApiOperationPolicyOperations(this);
     this._apiOperations      = new ApiOperationsOperations(this);
     this._apiPolicy          = new ApiPolicyOperations(this);
     this._apiProducts        = new ApiProductsOperations(this);
     this._apis = new ApisOperations(this);
     this._authorizationServers = new AuthorizationServersOperations(this);
     this._backends             = new BackendOperations(this);
     this._certificates         = new CertificatesOperations(this);
     this._groups                       = new GroupsOperations(this);
     this._groupUsers                   = new GroupUsersOperations(this);
     this._identityProvider             = new IdentityProviderOperations(this);
     this._loggers                      = new LoggerOperations(this);
     this._openIdConnectProviders       = new OpenIdConnectProvidersOperations(this);
     this._policySnippents              = new PolicySnippetsOperations(this);
     this._productApis                  = new ProductApisOperations(this);
     this._productGroups                = new ProductGroupsOperations(this);
     this._productPolicy                = new ProductPolicyOperations(this);
     this._products                     = new ProductsOperations(this);
     this._productSubscriptions         = new ProductSubscriptionsOperations(this);
     this._property                     = new PropertiesOperations(this);
     this._regions                      = new RegionsOperations(this);
     this._reports                      = new ReportsOperations(this);
     this._resourceProvider             = new ResourceProviderOperations(this);
     this._subscriptions                = new SubscriptionsOperations(this);
     this._tenantAccessGit              = new TenantAccessGitOperations(this);
     this._tenantAccess                 = new TenantAccessInformationOperations(this);
     this._tenantConfiguration          = new TenantConfigurationOperations(this);
     this._tenantConfigurationSyncState = new TenantConfigurationSyncStateOperation(this);
     this._tenantPolicy                 = new TenantPolicyOperations(this);
     this._userApplications             = new UserApplicationsOperations(this);
     this._userGroups                   = new UserGroupsOperations(this);
     this._userIdentities               = new UserIdentitiesOperations(this);
     this._users             = new UsersOperations(this);
     this._userSubscriptions = new UserSubscriptionsOperations(this);
     this._apiVersion        = "2016-10-10";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Beispiel #7
0
 /// <summary>
 /// Lists the collection of subscriptions to the specified product.
 /// </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 <SubscriptionContract> ListNext(this IProductSubscriptionsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Lists the collection of subscriptions to the specified product.
 /// </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='productId'>
 /// Product 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 <SubscriptionContract> List(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string productId, ODataQuery <SubscriptionContract> odataQuery = default(ODataQuery <SubscriptionContract>))
 {
     return(operations.ListAsync(resourceGroupName, serviceName, productId, odataQuery).GetAwaiter().GetResult());
 }
Beispiel #9
0
 /// <summary>
 /// List all Product APIs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductSubscriptionsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='pid'>
 /// Required. Identifier of the product.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Subscriptions operation response details.
 /// </returns>
 public static Task <SubscriptionListResponse> ListAsync(this IProductSubscriptionsOperations operations, string resourceGroupName, string serviceName, string pid, QueryParameters query)
 {
     return(operations.ListAsync(resourceGroupName, serviceName, pid, query, CancellationToken.None));
 }
Beispiel #10
0
 /// <summary>
 /// List all Product APIs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IProductSubscriptionsOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Subscriptions operation response details.
 /// </returns>
 public static Task <SubscriptionListResponse> ListNextAsync(this IProductSubscriptionsOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }