/// <summary> /// Regenerates the secondary policy key of the specified authorization policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='authorizationPolicyName'> /// The name of the policy. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AuthorizationPolicy> RegenerateSecondaryKeyAsync(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, string authorizationPolicyName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RegenerateSecondaryKeyWithHttpMessagesAsync(resourceGroupName, hubName, authorizationPolicyName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets an authorization policy in the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='authorizationPolicyName'> /// The name of the policy. /// </param> public static AuthorizationPolicyResourceFormat Get(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, string authorizationPolicyName) { return(operations.GetAsync(resourceGroupName, hubName, authorizationPolicyName).GetAwaiter().GetResult()); }
/// <summary> /// Creates an authorization policy or updates an existing authorization /// policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='authorizationPolicyName'> /// The name of the policy. /// </param> /// <param name='parameters'> /// Parameters supplied to the CreateOrUpdate authorization policy operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AuthorizationPolicyResourceFormat> CreateOrUpdateAsync(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, string authorizationPolicyName, AuthorizationPolicyResourceFormat parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, hubName, authorizationPolicyName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates an authorization policy or updates an existing authorization /// policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='authorizationPolicyName'> /// The name of the policy. /// </param> /// <param name='parameters'> /// Parameters supplied to the CreateOrUpdate authorization policy operation. /// </param> public static AuthorizationPolicyResourceFormat CreateOrUpdate(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, string authorizationPolicyName, AuthorizationPolicyResourceFormat parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, hubName, authorizationPolicyName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the authorization policies in a specified hub. /// </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 <AuthorizationPolicyResourceFormat> > ListByHubNextAsync(this IAuthorizationPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the authorization policies in a specified hub. /// </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 <AuthorizationPolicyResourceFormat> ListByHubNext(this IAuthorizationPoliciesOperations operations, string nextPageLink) { return(operations.ListByHubNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Regenerates the secondary policy key of the specified authorization policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='authorizationPolicyName'> /// The name of the policy. /// </param> public static AuthorizationPolicy RegenerateSecondaryKey(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, string authorizationPolicyName) { return(operations.RegenerateSecondaryKeyAsync(resourceGroupName, hubName, authorizationPolicyName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the authorization policies in a specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> public static IPage <AuthorizationPolicyResourceFormat> ListByHub(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName) { return(operations.ListByHubAsync(resourceGroupName, hubName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the authorization policies in a specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <AuthorizationPolicyResourceFormatInner> > ListByHubAsync(this IAuthorizationPoliciesOperations operations, string resourceGroupName, string hubName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubWithHttpMessagesAsync(resourceGroupName, hubName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }