/// <summary> /// This operation applies changes from the specified Git branch to the /// configuration database. This is a long running operation and could take /// several minutes to complete. /// <see href="https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-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='parameters'> /// Deploy Configuration parameters. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationResultContract> DeployAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeployWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Begin deploy operation of configuration from the specified Git /// branch to the configuration database in an Api Management /// service.To determine whether the operation has finished processing /// the request, call GetTenantConfigurationLongRunningOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ITenantConfigurationOperations. /// </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='parameters'> /// Required. Deploy Configuration parameters. /// </param> /// <returns> /// A standard service response for long running tenant operations. /// </returns> public static TenantLongRunningOperationResponse BeginDeploy(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((ITenantConfigurationOperations)s).BeginDeployAsync(resourceGroupName, serviceName, parameters); } , 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); }
/// <summary> /// Begin deploy operation of configuration from the specified Git /// branch to the configuration database in an Api Management /// service.To determine whether the operation has finished processing /// the request, call GetTenantConfigurationLongRunningOperationStatus. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ITenantConfigurationOperations. /// </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='parameters'> /// Required. Deploy Configuration parameters. /// </param> /// <returns> /// A standard service response for long running tenant operations. /// </returns> public static Task <TenantLongRunningOperationResponse> BeginDeployAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) { return(operations.BeginDeployAsync(resourceGroupName, serviceName, parameters, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ITenantConfigurationOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running tenant configuration /// operations. /// </returns> public static Task <TenantConfigurationLongRunningOperationResponse> GetTenantConfigurationLongRunningOperationStatusAsync(this ITenantConfigurationOperations operations, string operationStatusLink) { return(operations.GetTenantConfigurationLongRunningOperationStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ITenantConfigurationOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running tenant configuration /// operations. /// </returns> public static TenantConfigurationLongRunningOperationResponse GetTenantConfigurationLongRunningOperationStatus(this ITenantConfigurationOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((ITenantConfigurationOperations)s).GetTenantConfigurationLongRunningOperationStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// This operation creates a commit with the current configuration snapshot to /// the specified branch in the repository. This is a long running operation /// and could take several minutes to complete. /// <see href="https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository" /> /// </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='parameters'> /// Save Configuration parameters. /// </param> public static OperationResultContract Save(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, SaveConfigurationParameter parameters) { return(operations.SaveAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// This operation validates the changes in the specified Git branch. This is a /// long running operation and could take several minutes to complete. /// </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='parameters'> /// Validate Configuration parameters. /// </param> public static OperationResultContract BeginValidate(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, DeployConfigurationParameters parameters) { return(operations.BeginValidateAsync(resourceGroupName, serviceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets the status of the most recent synchronization between the /// configuration database and the Git repository. /// </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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TenantConfigurationSyncStateContract> GetSyncStateAsync(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSyncStateWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the status of the most recent synchronization between the /// configuration database and the Git repository. /// </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> public static TenantConfigurationSyncStateContract GetSyncState(this ITenantConfigurationOperations operations, string resourceGroupName, string serviceName) { return(operations.GetSyncStateAsync(resourceGroupName, serviceName).GetAwaiter().GetResult()); }