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>
 /// Creates new or updates existing specific API of the Api Management
 /// service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='parameters'>
 /// Required. Create or update parameters.
 /// </param>
 /// <param name='etag'>
 /// Optional. ETag.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse CreateOrUpdate(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, ApiCreateOrUpdateParameters parameters, string etag)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IApisOperations)s).CreateOrUpdateAsync(resourceGroupName, serviceName, aid, parameters, etag);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #3
0
 /// <summary>
 /// List all APIs of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Api operations response details.
 /// </returns>
 public static ApiListResponse ListNext(this IApisOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IApisOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #4
0
 /// <summary>
 /// List all APIs of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Api operations response details.
 /// </returns>
 public static ApiListResponse List(this IApisOperations operations, string resourceGroupName, string serviceName, QueryParameters query)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IApisOperations)s).ListAsync(resourceGroupName, serviceName, query);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #5
0
 /// <summary>
 /// Imports API from one of the supported formats.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='contentType'>
 /// Required. Type of importing content.
 /// </param>
 /// <param name='content'>
 /// Required. Importing content.
 /// </param>
 /// <param name='path'>
 /// Optional. Path in case importing document does not support path.
 /// </param>
 /// <param name='wsdlServiceName'>
 /// Optional. Local name of WSDL Service to be imported.
 /// </param>
 /// <param name='wsdlEndpointName'>
 /// Optional. Local name of WSDL Endpoint (port) to be imported.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Import(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, string contentType, Stream content, string path, string wsdlServiceName, string wsdlEndpointName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IApisOperations)s).ImportAsync(resourceGroupName, serviceName, aid, contentType, content, path, wsdlServiceName, wsdlEndpointName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <summary>
 /// Exports API to one of the supported formats.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='accept'>
 /// Required. Type of exporting content. Equivalent to Accept HTTP
 /// header.
 /// </param>
 /// <returns>
 /// The response model for the export API output operation.
 /// </returns>
 public static ApiExportResponse Export(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, string accept)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IApisOperations)s).ExportAsync(resourceGroupName, serviceName, aid, accept);
     }
                                  , 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 #8
0
 /// <summary>
 /// Patches specific API of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='parameters'>
 /// Required. Patch parameters.
 /// </param>
 /// <param name='etag'>
 /// Required. ETag.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> PatchAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, PatchParameters parameters, string etag)
 {
     return(operations.PatchAsync(resourceGroupName, serviceName, aid, parameters, etag, CancellationToken.None));
 }
Beispiel #9
0
 /// <summary>
 /// List all APIs of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. NextLink from the previous successful call to List
 /// operation.
 /// </param>
 /// <returns>
 /// List Api operations response details.
 /// </returns>
 public static Task <ApiListResponse> ListNextAsync(this IApisOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
Beispiel #10
0
 /// <summary>
 /// List all APIs of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Api operations response details.
 /// </returns>
 public static Task <ApiListResponse> ListAsync(this IApisOperations operations, string resourceGroupName, string serviceName, QueryParameters query)
 {
     return(operations.ListAsync(resourceGroupName, serviceName, query, CancellationToken.None));
 }
Beispiel #11
0
 /// <summary>
 /// Imports API from one of the supported formats.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='contentType'>
 /// Required. Type of importing content.
 /// </param>
 /// <param name='content'>
 /// Required. Importing content.
 /// </param>
 /// <param name='path'>
 /// Optional. Path in case importing document does not support path.
 /// </param>
 /// <param name='wsdlServiceName'>
 /// Optional. Local name of WSDL Service to be imported.
 /// </param>
 /// <param name='wsdlEndpointName'>
 /// Optional. Local name of WSDL Endpoint (port) to be imported.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> ImportAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, string contentType, Stream content, string path, string wsdlServiceName, string wsdlEndpointName)
 {
     return(operations.ImportAsync(resourceGroupName, serviceName, aid, contentType, content, path, wsdlServiceName, wsdlEndpointName, CancellationToken.None));
 }
Beispiel #12
0
 /// <summary>
 /// Gets specific API of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <returns>
 /// Get Api operation response details.
 /// </returns>
 public static Task <ApiGetResponse> GetAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, aid, CancellationToken.None));
 }
Beispiel #13
0
 /// <summary>
 /// Exports API to one of the supported formats.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='accept'>
 /// Required. Type of exporting content. Equivalent to Accept HTTP
 /// header.
 /// </param>
 /// <returns>
 /// The response model for the export API output operation.
 /// </returns>
 public static Task <ApiExportResponse> ExportAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, string accept)
 {
     return(operations.ExportAsync(resourceGroupName, serviceName, aid, accept, CancellationToken.None));
 }
Beispiel #14
0
 /// <summary>
 /// Deletes specific API of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </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='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='etag'>
 /// Required. ETag.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IApisOperations operations, string resourceGroupName, string serviceName, string aid, string etag)
 {
     return(operations.DeleteAsync(resourceGroupName, serviceName, aid, etag, CancellationToken.None));
 }