Example #1
0
 /// <summary>
 /// Get Delegation Settings for the Portal.
 /// </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 <PortalDelegationSettings> GetAsync(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Create or Update Delegation settings.
 /// </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'>
 /// 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 <PortalDelegationSettings> CreateOrUpdateAsync(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName, PortalDelegationSettings parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Get Delegation Settings for the Portal.
 /// </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 PortalDelegationSettings Get(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.GetAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Gets the entity state (Etag) version of the DelegationSettings.
 /// </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 DelegationSettingsGetEntityTagHeaders GetEntityTag(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.GetEntityTagAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }
Example #5
0
 /// <summary>
 /// Gets the secret validation key of the DelegationSettings.
 /// </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 PortalSettingValidationKeyContract ListSecrets(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName)
 {
     return(operations.ListSecretsAsync(resourceGroupName, serviceName).GetAwaiter().GetResult());
 }
Example #6
0
 /// <summary>
 /// Create or Update Delegation settings.
 /// </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'>
 /// 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 PortalDelegationSettings CreateOrUpdate(this IDelegationSettingsOperations operations, string resourceGroupName, string serviceName, PortalDelegationSettings parameters, string ifMatch = default(string))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, parameters, ifMatch).GetAwaiter().GetResult());
 }
Example #7
0
 /// <summary>
 /// Update Delegation settings.
 /// </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'>
 /// Update Delegation settings.
 /// </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 IDelegationSettingsOperations operations, string resourceGroupName, string serviceName, PortalDelegationSettings parameters, string ifMatch, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serviceName, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #8
0
 /// <summary>
 /// Update Delegation settings.
 /// </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'>
 /// Update Delegation settings.
 /// </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 IDelegationSettingsOperations operations, string resourceGroupName, string serviceName, PortalDelegationSettings parameters, string ifMatch)
 {
     operations.UpdateAsync(resourceGroupName, serviceName, parameters, ifMatch).GetAwaiter().GetResult();
 }