Example #1
0
 /// <summary>
 /// Gets the Git access configuration for the tenant.
 /// </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 <AccessInformationContract> GetAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerate primary access key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.ITenantAccessGitOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse RegeneratePrimaryKey(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ITenantAccessGitOperations)s).RegeneratePrimaryKeyAsync(resourceGroupName, serviceName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #3
0
 /// <summary>
 /// Update tenant settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.ITenantAccessGitOperations.
 /// </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. Parameters.
 /// </param>
 /// <param name='etag'>
 /// Required. ETag.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Update(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string etag)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ITenantAccessGitOperations)s).UpdateAsync(resourceGroupName, serviceName, parameters, etag);
     }
                                  , 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>
 /// Regenerate secondary access key for GIT.
 /// </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='accessName'>
 /// The identifier of the Access configuration. Possible values include:
 /// 'access', 'gitAccess'
 /// </param>
 public static void RegenerateSecondaryKey(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, string accessName)
 {
     operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName, accessName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Regenerate primary access key for GIT.
 /// </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='accessName'>
 /// The identifier of the Access configuration. Possible values include:
 /// 'access', 'gitAccess'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RegeneratePrimaryKeyAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, string accessName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RegeneratePrimaryKeyWithHttpMessagesAsync(resourceGroupName, serviceName, accessName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #7
0
 /// <summary>
 /// Gets the Git access configuration for the tenant.
 /// </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 AccessInformationContract Get(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get tenant settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.ITenantAccessGitOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <returns>
 /// Get Tenant Access Information operation response details.
 /// </returns>
 public static Task <AccessInformationGetResponse> GetAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.GetAsync(resourceGroupName, serviceName, CancellationToken.None));
 }
 /// <summary>
 /// Regenerate secondary access key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.ITenantAccessGitOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> RegenerateSecondaryKeyAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName, CancellationToken.None));
 }
Example #10
0
 /// <summary>
 /// Update tenant settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.ITenantAccessGitOperations.
 /// </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. 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> UpdateAsync(this ITenantAccessGitOperations operations, string resourceGroupName, string serviceName, AccessInformationUpdateParameters parameters, string etag)
 {
     return(operations.UpdateAsync(resourceGroupName, serviceName, parameters, etag, CancellationToken.None));
 }