/// <summary> /// Creates or updates a managed instance key. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be operated on (updated or /// created). /// </param> /// <param name='parameters'> /// The requested managed instance key resource state. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedInstanceKeyInner> CreateOrUpdateAsync(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName, ManagedInstanceKeyInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, keyName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of managed instance keys. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='filter'> /// An OData filter expression that filters elements in the collection. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ManagedInstanceKey> > ListByInstanceAsync(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByInstanceWithHttpMessagesAsync(resourceGroupName, managedInstanceName, filter, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a managed instance key. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be retrieved. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedInstanceKey> GetAsync(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, keyName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of managed instance keys. /// </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 <ManagedInstanceKeyInner> > ListByInstanceNextAsync(this IManagedInstanceKeysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByInstanceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes the managed instance key with the given name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be deleted. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, managedInstanceName, keyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets a managed instance key. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be retrieved. /// </param> public static ManagedInstanceKey Get(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName) { return(operations.GetAsync(resourceGroupName, managedInstanceName, keyName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of managed instance keys. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='filter'> /// An OData filter expression that filters elements in the collection. /// </param> public static IPage <ManagedInstanceKey> ListByInstance(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string filter = default(string)) { return(operations.ListByInstanceAsync(resourceGroupName, managedInstanceName, filter).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of managed instance keys. /// </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 <ManagedInstanceKey> ListByInstanceNext(this IManagedInstanceKeysOperations operations, string nextPageLink) { return(operations.ListByInstanceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the managed instance key with the given name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be deleted. /// </param> public static void BeginDelete(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName) { operations.BeginDeleteAsync(resourceGroupName, managedInstanceName, keyName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates a managed instance key. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='keyName'> /// The name of the managed instance key to be operated on (updated or /// created). /// </param> /// <param name='parameters'> /// The requested managed instance key resource state. /// </param> public static ManagedInstanceKey BeginCreateOrUpdate(this IManagedInstanceKeysOperations operations, string resourceGroupName, string managedInstanceName, string keyName, ManagedInstanceKey parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, keyName, parameters).GetAwaiter().GetResult()); }