/// <summary> /// The List operation gets information about the managed HSM Pools associated /// with the subscription. /// </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 <ManagedHsm> > ListBySubscriptionNextAsync(this IManagedHsmsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the specified deleted managed HSM. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name of the deleted managed HSM. /// </param> /// <param name='location'> /// The location of the deleted managed HSM. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DeletedManagedHsm> GetDeletedAsync(this IManagedHsmsOperations operations, string name, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDeletedWithHttpMessagesAsync(name, location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The List operation gets information about the deleted managed HSMs /// associated with the subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DeletedManagedHsm> > ListDeletedAsync(this IManagedHsmsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListDeletedWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or update a managed HSM Pool in the specified subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='name'> /// Name of the managed HSM Pool /// </param> /// <param name='parameters'> /// Parameters to create or update the managed HSM Pool /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedHsm> CreateOrUpdateAsync(this IManagedHsmsOperations operations, string resourceGroupName, string name, ManagedHsm parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The List operation gets information about the managed HSM Pools associated /// with the subscription and within the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='top'> /// Maximum number of results to return. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ManagedHsm> > ListByResourceGroupAsync(this IManagedHsmsOperations operations, string resourceGroupName, int?top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, top, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Vaults = new VaultsOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); Operations = new Operations(this); ManagedHsms = new ManagedHsmsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// The List operation gets information about the deleted managed HSMs /// associated with the subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <DeletedManagedHsm> ListDeleted(this IManagedHsmsOperations operations) { return(operations.ListDeletedAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets the specified deleted managed HSM. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name of the deleted managed HSM. /// </param> /// <param name='location'> /// The location of the deleted managed HSM. /// </param> public static DeletedManagedHsm GetDeleted(this IManagedHsmsOperations operations, string name, string location) { return(operations.GetDeletedAsync(name, location).GetAwaiter().GetResult()); }
/// <summary> /// Update a managed HSM Pool in the specified subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='name'> /// Name of the managed HSM Pool /// </param> /// <param name='parameters'> /// Parameters to patch the managed HSM Pool /// </param> public static ManagedHsm Update(this IManagedHsmsOperations operations, string resourceGroupName, string name, ManagedHsm parameters) { return(operations.UpdateAsync(resourceGroupName, name, parameters).GetAwaiter().GetResult()); }
/// <summary> /// The List operation gets information about the managed HSM Pools associated /// with the subscription. /// </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 <ManagedHsm> ListBySubscriptionNext(this IManagedHsmsOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Permanently deletes the specified managed HSM. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name of the soft-deleted managed HSM. /// </param> /// <param name='location'> /// The location of the soft-deleted managed HSM. /// </param> public static void BeginPurgeDeleted(this IManagedHsmsOperations operations, string name, string location) { operations.BeginPurgeDeletedAsync(name, location).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified managed HSM Pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='name'> /// The name of the managed HSM Pool to delete /// </param> public static void BeginDelete(this IManagedHsmsOperations operations, string resourceGroupName, string name) { operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified managed HSM Pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='name'> /// The name of the managed HSM Pool to delete /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IManagedHsmsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// The List operation gets information about the managed HSM Pools associated /// with the subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='top'> /// Maximum number of results to return. /// </param> public static IPage <ManagedHsm> ListBySubscription(this IManagedHsmsOperations operations, int?top = default(int?)) { return(operations.ListBySubscriptionAsync(top).GetAwaiter().GetResult()); }
/// <summary> /// Permanently deletes the specified managed HSM. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name of the soft-deleted managed HSM. /// </param> /// <param name='location'> /// The location of the soft-deleted managed HSM. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginPurgeDeletedAsync(this IManagedHsmsOperations operations, string name, string location, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginPurgeDeletedWithHttpMessagesAsync(name, location, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// The List operation gets information about the managed HSM Pools associated /// with the subscription and within the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='top'> /// Maximum number of results to return. /// </param> public static IPage <ManagedHsm> ListByResourceGroup(this IManagedHsmsOperations operations, string resourceGroupName, int?top = default(int?)) { return(operations.ListByResourceGroupAsync(resourceGroupName, top).GetAwaiter().GetResult()); }
/// <summary> /// Gets the specified managed HSM Pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group that contains the managed HSM pool. /// </param> /// <param name='name'> /// The name of the managed HSM Pool. /// </param> public static ManagedHsm Get(this IManagedHsmsOperations operations, string resourceGroupName, string name) { return(operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult()); }
/// <summary> /// The List operation gets information about the deleted managed HSMs /// associated with the subscription. /// </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 <DeletedManagedHsm> ListDeletedNext(this IManagedHsmsOperations operations, string nextPageLink) { return(operations.ListDeletedNextAsync(nextPageLink).GetAwaiter().GetResult()); }