diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md index b917429847d20..88488c893d850 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md @@ -1,21 +1,11 @@ # Release History -## 4.5.0-beta.1 (Unreleased) +## 4.5.0 (2024-10-14) ### Features Added -- Added support for service API version `7.6-preview.1`. -- Added new methods `StartPreRestoreAsync`, `StartPreRestore`, `StartPreBackupAsync`, and `StartPreBackupAsync` to the `KeyVaultBackupClient`. - Support for Continuous Access Evaluation (CAE). -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -- The default service version is now "V7_6_Preview_1". - ## 4.4.0 (2024-02-14) Changes from both the last release and the last beta include: @@ -89,8 +79,8 @@ The following changes are only breaking from the previous beta. They are not bre ### Breaking Changes - Verify the challenge resource matches the vault domain. - This should affect few customers who can set `KeyVaultAdministrationClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + This should affect few customers who can set `KeyVaultAdministrationClientOptions.DisableChallengeResourceVerification` to `true` to disable. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.1.0 (2022-03-24) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md index dc452003b702a..c05c0ad094bde 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md @@ -141,16 +141,10 @@ A `KeyVaultAccessControlClient` provides both synchronous and asynchronous opera A `KeyVaultBackupClient` provides both synchronous and asynchronous operations for performing full key backups, full key restores, and selective key restores. -### PreBackupOperation -A `PreBackupOperation` represents a long-running operation that checks if it is possible to perform a full key backup. - ### BackupOperation A `BackupOperation` represents a long running operation for a full key backup. -### PreRestoreOperation -A `PreRestoreOperation` represents a long-running operation that checks if it is possible to perform a full key restore from a backup. - ### RestoreOperation A `RestoreOperation` represents a long running operation for both a full key and selective key restore. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs index 0c1a09a9ad6f5..32a5847b1b3e6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs @@ -43,7 +43,7 @@ public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredenti } public partial class KeyVaultAdministrationClientOptions : Azure.Core.ClientOptions { - public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_6_Preview_1) { } + public KeyVaultAdministrationClientOptions(Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion version = Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Administration.KeyVaultAdministrationClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -52,7 +52,6 @@ public enum ServiceVersion V7_3 = 2, V7_4 = 3, V7_5 = 4, - V7_6_Preview_1 = 5, } } public static partial class KeyVaultAdministrationModelFactory @@ -80,10 +79,6 @@ public KeyVaultBackupClient(System.Uri vaultUri, Azure.Core.TokenCredential cred public virtual System.Uri VaultUri { get { throw null; } } public virtual Azure.Security.KeyVault.Administration.KeyVaultBackupOperation StartBackup(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartBackupAsync(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.KeyVaultPreBackupOperation StartPreBackup(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartPreBackupAsync(System.Uri blobStorageUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Security.KeyVault.Administration.KeyVaultPreRestoreOperation StartPreRestore(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartPreRestoreAsync(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Security.KeyVault.Administration.KeyVaultRestoreOperation StartRestore(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartRestoreAsync(System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Security.KeyVault.Administration.KeyVaultSelectiveKeyRestoreOperation StartSelectiveKeyRestore(string keyName, System.Uri folderUri, string sasToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -170,38 +165,6 @@ public KeyVaultPermission() { } public System.Collections.Generic.IList NotActions { get { throw null; } } public System.Collections.Generic.IList NotDataActions { get { throw null; } } } - public partial class KeyVaultPreBackupOperation : Azure.Operation - { - protected KeyVaultPreBackupOperation() { } - public KeyVaultPreBackupOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.KeyVaultBackupResult Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } - } - public partial class KeyVaultPreRestoreOperation : Azure.Operation - { - protected KeyVaultPreRestoreOperation() { } - public KeyVaultPreRestoreOperation(Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id) { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public override bool HasCompleted { get { throw null; } } - public override bool HasValue { get { throw null; } } - public override string Id { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public override Azure.Security.KeyVault.Administration.KeyVaultRestoreResult Value { get { throw null; } } - public override Azure.Response GetRawResponse() { throw null; } - public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } - } public partial class KeyVaultRestoreOperation : Azure.Operation { protected KeyVaultRestoreOperation() { } @@ -374,13 +337,3 @@ public readonly partial struct KeyVaultSettingValue public override string ToString() { throw null; } } } -namespace Azure.Security.KeyVault.Administration.Models -{ - public partial class PreBackupOperationParameters - { - public PreBackupOperationParameters() { } - public string StorageResourceUri { get { throw null; } set { } } - public string Token { get { throw null; } set { } } - public bool? UseManagedIdentity { get { throw null; } set { } } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json index 28336ec072ed2..3072779aaa8ae 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Administration", - "Tag": "net/keyvault/Azure.Security.KeyVault.Administration_2b51d5440c" + "Tag": "net/keyvault/Azure.Security.KeyVault.Administration_4951f6b8e1" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj index 47d5304b45058..dbf379509d59e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj @@ -3,7 +3,7 @@ This is the Microsoft Azure Key Vault Administration client library Microsoft Azure.Security.KeyVault.Administration client library - 4.5.0-beta.1 + 4.5.0 4.4.0 Microsoft Azure Key Vault Administration;$(PackageCommonTags) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs deleted file mode 100644 index e98c641e04228..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullBackupHeaders.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration -{ - internal partial class AzureSecurityKeyVaultAdministrationPreFullBackupHeaders - { - private readonly Response _response; - public AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(Response response) - { - _response = response; - } - /// The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. - public long? RetryAfter => _response.Headers.TryGetValue("Retry-After", out long? value) ? value : null; - /// The URI to poll for completion status. - public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs deleted file mode 100644 index f706130099577..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration -{ - internal partial class AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders - { - private readonly Response _response; - public AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(Response response) - { - _response = response; - } - /// The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. - public long? RetryAfter => _response.Headers.TryGetValue("Retry-After", out long? value) ? value : null; - /// The URI to poll for completion status. - public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs index 794f0d4189865..b30181ba2e982 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs @@ -28,7 +28,7 @@ internal partial class BackupRestoreRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public BackupRestoreRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public BackupRestoreRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -104,75 +104,6 @@ public ResponseWithHeaders } } - internal HttpMessage CreatePreFullBackupRequest(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(vaultBaseUrl, false); - uri.AppendPath("/prebackup", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (preBackupOperationParameters != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(preBackupOperationParameters); - request.Content = content; - } - return message; - } - - /// Pre-backup operation for checking whether the customer can perform a full backup operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional parameters to validate prior to performing a full backup operation. - /// The cancellation token to use. - /// is null. - public async Task> PreFullBackupAsync(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullBackupRequest(vaultBaseUrl, preBackupOperationParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Pre-backup operation for checking whether the customer can perform a full backup operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional parameters to validate prior to performing a full backup operation. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders PreFullBackup(string vaultBaseUrl, PreBackupOperationParameters preBackupOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullBackupRequest(vaultBaseUrl, preBackupOperationParameters); - _pipeline.Send(message, cancellationToken); - var headers = new AzureSecurityKeyVaultAdministrationPreFullBackupHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateFullBackupStatusRequest(string vaultBaseUrl, string jobId) { var message = _pipeline.CreateMessage(); @@ -253,75 +184,6 @@ public Response FullBackupStatus(string vaultBaseUrl, } } - internal HttpMessage CreatePreFullRestoreOperationRequest(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(vaultBaseUrl, false); - uri.AppendPath("/prerestore", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (preRestoreOperationParameters != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(preRestoreOperationParameters); - request.Content = content; - } - return message; - } - - /// Pre-restore operation for checking whether the customer can perform a full restore operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional pre restore parameters to validate prior to performing a full restore operation. - /// The cancellation token to use. - /// is null. - public async Task> PreFullRestoreOperationAsync(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullRestoreOperationRequest(vaultBaseUrl, preRestoreOperationParameters); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Pre-restore operation for checking whether the customer can perform a full restore operation. - /// The vault name, for example https://myvault.vault.azure.net. - /// Optional pre restore parameters to validate prior to performing a full restore operation. - /// The cancellation token to use. - /// is null. - public ResponseWithHeaders PreFullRestoreOperation(string vaultBaseUrl, PreRestoreOperationParameters preRestoreOperationParameters = null, CancellationToken cancellationToken = default) - { - if (vaultBaseUrl == null) - { - throw new ArgumentNullException(nameof(vaultBaseUrl)); - } - - using var message = CreatePreFullRestoreOperationRequest(vaultBaseUrl, preRestoreOperationParameters); - _pipeline.Send(message, cancellationToken); - var headers = new AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders(message.Response); - switch (message.Response.Status) - { - case 202: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateFullRestoreOperationRequest(string vaultBaseUrl, RestoreOperationParameters restoreBlobDetails) { var message = _pipeline.CreateMessage(); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs deleted file mode 100644 index e1ce1dc319935..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration.Models -{ - public partial class PreBackupOperationParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StorageResourceUri)) - { - writer.WritePropertyName("storageResourceUri"u8); - writer.WriteStringValue(StorageResourceUri); - } - if (Optional.IsDefined(Token)) - { - writer.WritePropertyName("token"u8); - writer.WriteStringValue(Token); - } - if (Optional.IsDefined(UseManagedIdentity)) - { - writer.WritePropertyName("useManagedIdentity"u8); - writer.WriteBooleanValue(UseManagedIdentity.Value); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs deleted file mode 100644 index c12e9e3d32652..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreBackupOperationParameters.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Security.KeyVault.Administration.Models -{ - /// The PreBackupOperationParameters. - public partial class PreBackupOperationParameters - { - /// Initializes a new instance of . - public PreBackupOperationParameters() - { - } - - /// Initializes a new instance of . - /// Azure Blob storage container Uri. - /// The SAS token pointing to an Azure Blob storage container. - /// Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. - internal PreBackupOperationParameters(string storageResourceUri, string token, bool? useManagedIdentity) - { - StorageResourceUri = storageResourceUri; - Token = token; - UseManagedIdentity = useManagedIdentity; - } - - /// Azure Blob storage container Uri. - public string StorageResourceUri { get; set; } - /// The SAS token pointing to an Azure Blob storage container. - public string Token { get; set; } - /// Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. - public bool? UseManagedIdentity { get; set; } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs deleted file mode 100644 index 45d6d2d44270a..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration.Models -{ - internal partial class PreRestoreOperationParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SasTokenParameters)) - { - writer.WritePropertyName("sasTokenParameters"u8); - writer.WriteObjectValue(SasTokenParameters); - } - if (Optional.IsDefined(FolderToRestore)) - { - writer.WritePropertyName("folderToRestore"u8); - writer.WriteStringValue(FolderToRestore); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs deleted file mode 100644 index f2985849bc639..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/PreRestoreOperationParameters.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Security.KeyVault.Administration.Models -{ - /// The PreRestoreOperationParameters. - internal partial class PreRestoreOperationParameters - { - /// Initializes a new instance of . - public PreRestoreOperationParameters() - { - } - - /// Initializes a new instance of . - /// - /// The Folder name of the blob where the previous successful full backup was stored. - internal PreRestoreOperationParameters(SASTokenParameter sasTokenParameters, string folderToRestore) - { - SasTokenParameters = sasTokenParameters; - FolderToRestore = folderToRestore; - } - - /// Gets or sets the sas token parameters. - public SASTokenParameter SasTokenParameters { get; set; } - /// The Folder name of the blob where the previous successful full backup was stored. - public string FolderToRestore { get; set; } - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs index 60475edd03da5..8cdf96815723c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs @@ -28,7 +28,7 @@ internal partial class RoleAssignmentsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public RoleAssignmentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public RoleAssignmentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs index 9b47b644ea830..6221ad1e783cb 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs @@ -28,7 +28,7 @@ internal partial class RoleDefinitionsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public RoleDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public RoleDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs index 924e65f68b0fa..7a898bfb4b4b5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/SettingsRestClient.cs @@ -28,7 +28,7 @@ internal partial class SettingsRestClient /// The HTTP pipeline for sending and receiving REST requests and responses. /// Api Version. /// , or is null. - public SettingsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.6-preview.1") + public SettingsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string apiVersion = "7.5") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs index 8e2144f9ac424..baf00abf0c86e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAdministrationClientOptions.cs @@ -18,7 +18,7 @@ public class KeyVaultAdministrationClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -46,11 +46,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 4, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 5, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -88,7 +83,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs index 9c3ea0d922c13..36a06b4f3bec3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultBackupClient.cs @@ -123,80 +123,6 @@ public virtual KeyVaultBackupOperation StartBackup(Uri blobStorageUri, string sa } } - /// - /// Initiates a pre-backup check on the Key Vault. This operation checks if it is possible to back up the entire collection of keys from a Key Vault. - /// - /// The for the blob storage resource. - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the asynchronous operation. - public virtual async Task StartPreBackupAsync(Uri blobStorageUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(blobStorageUri, nameof(blobStorageUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartPreBackupAsync)}"); - scope.Start(); - try - { - var response = await _restClient.PreFullBackupAsync( - VaultUri.AbsoluteUri, - new PreBackupOperationParameters( - blobStorageUri.AbsoluteUri, - sasToken, - useManagedIdentity: sasToken == null - ), - cancellationToken).ConfigureAwait(false); - - // Should this return a KeyVaultBackupOperation? - return new KeyVaultPreBackupOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Initiates a pre-backup check on the Key Vault. This operation checks if it is possible to back up the entire collection of keys from a Key Vault. - /// - /// The for the blob storage resource. - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the operation. - public virtual KeyVaultPreBackupOperation StartPreBackup(Uri blobStorageUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(blobStorageUri, nameof(blobStorageUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartPreBackup)}"); - scope.Start(); - try - { - var response = _restClient.PreFullBackup( - VaultUri.AbsoluteUri, - new PreBackupOperationParameters( - blobStorageUri.AbsoluteUri, - sasToken, - useManagedIdentity: sasToken == null - ), - cancellationToken); - - // Should this return a KeyVaultBackupOperation? - return new KeyVaultPreBackupOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - /// /// Initiates a full key restore of the Key Vault. /// @@ -237,89 +163,6 @@ public virtual async Task StartRestoreAsync(Uri folder } } - /// - /// Initiate a pre-restore check on a Key Vault. This operation checks if it is possible to restore the entire collection of keys from a Key Vault. - /// - /// - /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . - /// An example Uri may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. - /// - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A representing the result of the asynchronous operation. - public virtual async Task StartPreRestoreAsync(Uri folderUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(folderUri, nameof(folderUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); - scope.Start(); - try - { - // Get the folder name from the backupBlobUri returned from a previous BackupOperation - ParseFolderName(folderUri, out string containerUriString, out string folderName); - - var response = await _restClient.PreFullRestoreOperationAsync( - VaultUri.AbsoluteUri, - new PreRestoreOperationParameters( - new SASTokenParameter(containerUriString, sasToken), - folderUri.AbsoluteUri - ), - cancellationToken).ConfigureAwait(false); - - return new KeyVaultPreRestoreOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Initiate a pre-restore check on a Key Vault. This operation checks if it is possible to restore the entire collection of keys from a Key Vault. - /// - /// - /// The for the blob storage resource, including the path to the blob container where the backup resides. - /// This would be the exact value that is returned as the result of a . - /// An example Uri path may look like the following: https://contoso.blob.core.windows.net/backup/mhsm-contoso-2020090117323313. - /// - /// Optional Shared Access Signature (SAS) token to authorize access to the blob. If null, Managed Identity will be used to authenticate instead. - /// A controlling the request lifetime. - /// or is null. - /// The server returned an error. See for details returned from the server. - /// A to wait on this long-running operation. - public virtual KeyVaultPreRestoreOperation StartPreRestore(Uri folderUri, string sasToken = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(folderUri, nameof(folderUri)); - Argument.AssertNotNull(sasToken, nameof(sasToken)); - - using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultBackupClient)}.{nameof(StartRestore)}"); - scope.Start(); - try - { - // Get the folder name from the backupBlobUri returned from a previous BackupOperation - ParseFolderName(folderUri, out string containerUriString, out string folderName); - - var response = _restClient.PreFullRestoreOperation( - VaultUri.AbsoluteUri, - new PreRestoreOperationParameters( - new SASTokenParameter(containerUriString, sasToken), - folderUri.AbsoluteUri - ), - cancellationToken); - return new KeyVaultPreRestoreOperation(this, response); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - /// /// Initiates a full key restore of the Key Vault. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs deleted file mode 100644 index 92ed12ee8f5ae..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreBackupOperation.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; -using System.Threading.Tasks; -using System.Threading; -using Azure.Core.Pipeline; - -namespace Azure.Security.KeyVault.Administration -{ - /// - /// A long-running operation for or . - /// - public class KeyVaultPreBackupOperation : Operation - { - /// - /// The number of seconds recommended by the service to delay before checking on completion status. - /// - internal long? _retryAfterSeconds; - private readonly KeyVaultBackupClient _client; - private Response _response; - private FullBackupDetailsInternal _value; - private readonly string _id; - private RequestFailedException _requestFailedException; - - /// - /// Creates an instance of a KeyVaultPreBackupOperation from a previously started operation. , , - /// , or must be called - /// to re-populate the details of this operation. - /// - /// An instance of . - /// The from a previous . - /// or is null. - /// is empty. - public KeyVaultPreBackupOperation(KeyVaultBackupClient client, string id) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - Argument.AssertNotNull(client, nameof(client)); - - _client = client; - _id = id; - } - - /// - /// Initializes a new instance of a KeyVaultPreBackupOperation. - /// - /// An instance of . - /// The returned from or . - /// The server operation does not contains an Id - internal KeyVaultPreBackupOperation(KeyVaultBackupClient client, ResponseWithHeaders response) - { - _client = client; - _response = response; - _retryAfterSeconds = response.Headers.RetryAfter; - _id = response.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); - } - - /// - /// Initializes a new instance of a KeyVaultPreBackupOperation for mocking purposes. - /// - /// The that will be returned from . - /// The that will be returned from . - /// An instance of . - /// , , or is null. - internal KeyVaultPreBackupOperation(FullBackupDetailsInternal value, Response response, KeyVaultBackupClient client) - { - Argument.AssertNotNull(value, nameof(value)); - Argument.AssertNotNull(response, nameof(response)); - Argument.AssertNotNull(client, nameof(client)); - - _response = response; - _value = value; - _id = value.JobId; - _client = client; - } - - /// Initializes a new instance of for mocking. - protected KeyVaultPreBackupOperation() { } - - /// - /// The start time of the backup operation. - /// - public DateTimeOffset? StartTime => _value?.StartTime; - - /// - /// The end time of the backup operation. - /// - public DateTimeOffset? EndTime => _value?.EndTime; - - /// - public override string Id => _id; - - /// - /// Gets the of the backup operation. - /// You should await before attempting to use a key in this pending state. - /// - public override KeyVaultBackupResult Value - { - get - { -#pragma warning disable CA1065 // Do not raise exceptions in unexpected locations - if (!HasCompleted) - { - throw new InvalidOperationException("The operation is not complete."); - } - if (_requestFailedException != null) - { - throw _requestFailedException; - } -#pragma warning restore CA1065 // Do not raise exceptions in unexpected locations - return new KeyVaultBackupResult(new Uri(_value.AzureStorageBlobContainerUri), _value.StartTime.Value, _value.EndTime.Value); - } - } - - /// - public override bool HasCompleted => _value?.EndTime.HasValue ?? false; - - /// - public override bool HasValue => _response != null && _value?.Error == null && HasCompleted; - - /// - public override Response GetRawResponse() => _response; - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => - UpdateStatusAsync(false, cancellationToken).EnsureCompleted(); - - /// - public override async ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => - await UpdateStatusAsync(true, cancellationToken).ConfigureAwait(false); - - private async ValueTask UpdateStatusAsync(bool async, CancellationToken cancellationToken = default) - { - if (!HasCompleted) - { - try - { - Response response = async ? - await _client.GetBackupDetailsAsync(Id, cancellationToken).ConfigureAwait(false) - : _client.GetBackupDetails(Id, cancellationToken); - - _value = response.Value; - _response = response.GetRawResponse(); - } - catch (RequestFailedException ex) - { - _requestFailedException = ex; - throw; - } - catch (Exception ex) - { - _requestFailedException = new RequestFailedException("Unexpected failure", ex); - throw _requestFailedException; - } - - if (_value != null && _value.EndTime.HasValue && _value.Error != null) - { - _requestFailedException = _response != null ? - new RequestFailedException(_response) - : new RequestFailedException($"{_value.Error.Message}\nInnerError: {_value.Error.InnerError}\nCode: {_value.Error.Code}"); - throw _requestFailedException; - } - } - - return GetRawResponse(); - } - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => - _retryAfterSeconds.HasValue ? this.DefaultWaitForCompletionAsync(TimeSpan.FromSeconds(_retryAfterSeconds.Value), cancellationToken) : - this.DefaultWaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => - this.DefaultWaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs deleted file mode 100644 index f0e236b47af77..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPreRestoreOperation.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Security.KeyVault.Administration.Models; - -namespace Azure.Security.KeyVault.Administration -{ - /// - /// A long-running operation for or . - /// - public class KeyVaultPreRestoreOperation : Operation - { - internal readonly RestoreOperationInternal _operationInternal; - - /// - /// Creates an instance of a KeyVaultPreRestoreOperation from a previously started operation. , , - /// , or must be called - /// to re-populate the details of this operation. - /// - /// An instance of . - /// The from a previous . - /// or is null. - /// is empty. - public KeyVaultPreRestoreOperation(KeyVaultBackupClient client, string id) - { - Argument.AssertNotNull(client, nameof(client)); - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - _operationInternal = new RestoreOperationInternal(client, id); - } - - /// - /// Initializes a new instance of the class. - /// - /// An instance of . - /// The returned from or . - /// or is null. - internal KeyVaultPreRestoreOperation(KeyVaultBackupClient client, ResponseWithHeaders response) - { - Argument.AssertNotNull(client, nameof(client)); - Argument.AssertNotNull(response, nameof(response)); - - _operationInternal = new RestoreOperationInternal(client, response); - } - - /// - /// Initializes a new instance of a KeyVaultPreRestoreOperation for mocking purposes. - /// - /// The that will be used to populate various properties. - /// The that will be returned from . - /// An instance of . - /// or or is null. - internal KeyVaultPreRestoreOperation(RestoreDetailsInternal value, Response response, KeyVaultBackupClient client) - { - Argument.AssertNotNull(value, nameof(value)); - Argument.AssertNotNull(response, nameof(response)); - Argument.AssertNotNull(client, nameof(client)); - - _operationInternal = new RestoreOperationInternal(value, response, client); - } - - /// Initializes a new instance of for mocking. - protected KeyVaultPreRestoreOperation() {} - - /// - /// The start time of the restore operation. - /// - public DateTimeOffset? StartTime => _operationInternal.StartTime; - - /// - /// The end time of the restore operation. - /// - public DateTimeOffset? EndTime => _operationInternal.EndTime; - - /// - public override string Id => _operationInternal.Id; - /// - public override KeyVaultRestoreResult Value => _operationInternal.Value; - - /// - public override bool HasCompleted => _operationInternal.HasCompleted; - - /// - public override bool HasValue => _operationInternal.HasValue; - - /// - public override Response GetRawResponse() => _operationInternal.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operationInternal.UpdateStatus(cancellationToken); - - /// - public override async ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => await _operationInternal.UpdateStatusAsync(cancellationToken).ConfigureAwait(false); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => - _operationInternal.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => - _operationInternal.WaitForCompletionAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs index dba73a3eb4438..aa3687c4c5f46 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/OperationHeadersExtensions.cs @@ -16,24 +16,6 @@ public static string JobId(this AzureSecurityKeyVaultAdministrationFullBackupHea return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); } - /// - /// Extracts the operation JobId from the AzureAsyncOperation. - /// - /// The operation JobId. - public static string JobId(this AzureSecurityKeyVaultAdministrationPreFullBackupHeaders header) - { - return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); - } - - /// - /// Extracts the operation JobId from the AzureAsyncOperation. - /// - /// The operation JobId. - public static string JobId(this AzureSecurityKeyVaultAdministrationPreFullRestoreOperationHeaders header) - { - return GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation); - } - /// /// Extracts the operation JobId from the AzureAsyncOperation. /// diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs deleted file mode 100644 index aac8dd35968d8..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/PreRestoreOperationParameters.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Security.KeyVault.Administration.Models -{ - // Transform the PreBackupOperationParameters model to an internal class. - internal partial class PreRestoreOperationParameters - { } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs index bfb7d460b44bd..dfff9a1866469 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RestoreOperationInternal.cs @@ -65,11 +65,6 @@ internal RestoreOperationInternal(KeyVaultBackupClient client, ResponseWithHeade _id = selectiveRestoreHeaders.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); _retryAfterSeconds = selectiveRestoreHeaders.Headers.RetryAfter; } - else if (response is ResponseWithHeaders preRestoreHeaders) - { - _id = preRestoreHeaders.Headers.JobId() ?? throw new InvalidOperationException("The response does not contain an Id"); - _retryAfterSeconds = (int)preRestoreHeaders.Headers.RetryAfter; - } else { throw new ArgumentException("Invalid header type", nameof(response)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md index 58678e5a06528..4135789b16a20 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md @@ -9,9 +9,9 @@ Run `dotnet build /t:GenerateCode` in src directory to re-generate. ``` yaml title: Azure.Security.KeyVault.Administration input-file: -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/rbac.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/backuprestore.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/8af9817c15d688c941cda106758045b5deb9a069/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.6-preview.1/settings.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/rbac.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/backuprestore.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7452e1cc7db72fbc6cd9539b390d8b8e5c2a1864/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/settings.json namespace: Azure.Security.KeyVault.Administration generation1-convenience-client: true include-csproj: disable diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs index 57860b6ff99bb..9cd66922f4728 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AdministrationTestBase.cs @@ -16,7 +16,6 @@ namespace Azure.Security.KeyVault.Administration.Tests /// Base class for recorded Administration tests. /// [ClientTestFixture( - KeyVaultAdministrationClientOptions.ServiceVersion.V7_6_Preview_1, KeyVaultAdministrationClientOptions.ServiceVersion.V7_5, KeyVaultAdministrationClientOptions.ServiceVersion.V7_4, KeyVaultAdministrationClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs index bc4e404c519cc..17087ce4e5519 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs @@ -50,36 +50,6 @@ public async Task BackupAndRestore() Assert.That(restoreOperation.HasValue, Is.True); } - [RecordedTest] - [Ignore("Service preview is not available yet.")] - public async Task PreBackupAndPreRestore() - { - var source = new CancellationTokenSource(Timeout); - - UriBuilder builder = new UriBuilder(TestEnvironment.StorageUri); - builder.Path = BlobContainerName; - - // Start the pre-backup operation. - KeyVaultPreBackupOperation preBackupOperation = await Client.StartPreBackupAsync(builder.Uri, "?" + SasToken, source.Token); - - KeyVaultBackupResult preBackupResult = await preBackupOperation.WaitForCompletionAsync(source.Token); - - await WaitForOperationAsync(); - - Assert.That(source.IsCancellationRequested, Is.False); - Assert.That(preBackupResult, Is.Not.Null); - Assert.That(preBackupOperation.HasValue, Is.True); - - // Start the pre-restore operation. - KeyVaultPreRestoreOperation preRestoreOperation = await Client.StartPreRestoreAsync(preBackupResult.FolderUri, "?" + SasToken, source.Token); - KeyVaultRestoreResult preRestoreResult = await preRestoreOperation.WaitForCompletionAsync(source.Token); - await WaitForOperationAsync(); - - Assert.That(source.IsCancellationRequested, Is.False); - Assert.That(preRestoreResult, Is.Not.Null); - Assert.That(preRestoreOperation.HasValue, Is.True); - } - [RecordedTest] [LiveOnly] [Ignore("https://github.com/Azure/azure-sdk-for-net/issues/35614")] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs index b070f3048b934..139819a4b0991 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs @@ -71,61 +71,6 @@ public async Task BackupAndRestoreSampleAsync() await WaitForOperationAsync(); } - [RecordedTest] - [AsyncOnly] - [Ignore("Service preview is not available yet")] - public async Task PreBackupAndPreRestoreSampleAsync() - { - var blobStorageUrl = TestEnvironment.StorageUri; - var blobContainerName = BlobContainerName; - var sasToken = "?" + SasToken; - - // Create a Uri with the storage container - UriBuilder builder = new UriBuilder(blobStorageUrl) - { - Path = blobContainerName, - }; - - // Check for backup readiness. - KeyVaultPreBackupOperation backupOperation = await Client.StartPreBackupAsync(builder.Uri, sasToken); - - // Wait for completion of the PreBackupOperation. - Response backupResult = await backupOperation.WaitForCompletionAsync(); - - // Check if the PreBackupOperation has completed successfully. - Uri folderUri = backupOperation.HasValue ? backupResult.Value.FolderUri : null; - - if (folderUri is null) - { - Console.WriteLine($"Backup operation failed. Status: {backupOperation.GetRawResponse().Status}, Reason: {backupOperation.GetRawResponse().ReasonPhrase}"); - } - - Assert.That(folderUri, Is.Not.Null); - Assert.That(backupOperation.HasValue, Is.True); - - await WaitForOperationAsync(); - - // Check for restore readiness using the backupBlobUri returned from a previous BackupOperation. - KeyVaultPreRestoreOperation preRestoreOperation = await Client.StartPreRestoreAsync(folderUri, sasToken); - - // Wait for completion of the PreRestoreOperation. - Response preRestoreResult = await preRestoreOperation.WaitForCompletionAsync(); - - // Check if the PreRestoreOperation has completed successfully. - if (preRestoreOperation.HasValue) - { - Console.WriteLine($"Pre-restore operation completed successfully. Status: {preRestoreOperation.GetRawResponse().Status}"); - } - else - { - Console.WriteLine($"Pre-restore operation failed. Status: {preRestoreOperation.GetRawResponse().Status}, Reason: {preRestoreOperation.GetRawResponse().ReasonPhrase}"); - } - - Assert.That(preRestoreOperation.HasValue, Is.True); - Assert.That(preRestoreResult.Value.StartTime, Is.Not.EqualTo(default)); - Assert.That(preRestoreResult.Value.EndTime, Is.Not.EqualTo(default)); - } - [RecordedTest] [SyncOnly] public async Task BackupAndRestoreSampleSync() diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md index 35ad51f55b5a5..9204d1b021f6b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/CHANGELOG.md @@ -1,17 +1,10 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.7.0 (2024-10-14) ### Features Added -- Support for Continuous Access Evaluation (CAE). - -### Breaking Changes - -### Bugs Fixed - -### Other Changes -- The default service version is now "V7_6_Preview_1". +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -20,7 +13,7 @@ Changes from both the last release and the last beta include: ### Features Added - Added `CertificateProperties.X509ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. - `CertificateProperties.X509Thumbprint` has been hidden but is still available. + `CertificateProperties.X509Thumbprint` has been hidden but is still available. ### Breaking Changes @@ -49,7 +42,7 @@ Changes from both the last release and the last beta include: ### Features Added - Added `CertificateProperties.X509ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. - `CertificateProperties.X509Thumbprint` has been hidden but is still available. + `CertificateProperties.X509Thumbprint` has been hidden but is still available. ### Breaking Changes @@ -97,8 +90,8 @@ Changes from both the last release and the last beta include: ### Breaking Changes - Verify the challenge resource matches the vault domain. - This should affect few customers who can set `CertificateClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + This should affect few customers who can set `CertificateClientOptions.DisableChallengeResourceVerification` to `true` to disable. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs index f24667ced66e8..8ba696e10ee1a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/api/Azure.Security.KeyVault.Certificates.netstandard2.0.cs @@ -73,7 +73,7 @@ public CertificateClient(System.Uri vaultUri, Azure.Core.TokenCredential credent } public partial class CertificateClientOptions : Azure.Core.ClientOptions { - public CertificateClientOptions(Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion version = Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion.V7_6_Preview_1) { } + public CertificateClientOptions(Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion version = Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Certificates.CertificateClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -84,7 +84,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public partial class CertificateContact diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json index ceae51646e6a2..3d555e91ec263 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Certificates", - "Tag": "net/keyvault/Azure.Security.KeyVault.Certificates_11a73707a2" + "Tag": "net/keyvault/Azure.Security.KeyVault.Certificates_320abaee9a" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj index f72af4af5a1c7..93e06f9742797 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/Azure.Security.KeyVault.Certificates.csproj @@ -3,7 +3,7 @@ This is the Microsoft Azure Key Vault Certificates client library Microsoft Azure.Security.KeyVault.Certificates client library - 4.7.0-beta.1 + 4.7.0 4.6.0 Microsoft Azure Key Vault Certificates;$(PackageCommonTags) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs index d90bf176b648c..b63f82c4cf569 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/src/CertificateClientOptions.cs @@ -16,7 +16,7 @@ public class CertificateClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version V7_6_Preview_1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs index 6620b70d41c54..b38b255f8363b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/tests/CertificatesTestBase.cs @@ -13,7 +13,6 @@ namespace Azure.Security.KeyVault.Certificates.Tests { [ClientTestFixture( - CertificateClientOptions.ServiceVersion.V7_6_Preview_1, CertificateClientOptions.ServiceVersion.V7_5, CertificateClientOptions.ServiceVersion.V7_4, CertificateClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md index 1b20dcc967a67..e4762b5bfac1f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/CHANGELOG.md @@ -1,17 +1,10 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.7.0 (2024-10-14) ### Features Added -- Support for Continuous Access Evaluation (CAE). - -### Breaking Changes - -### Bugs Fixed - -### Other Changes -- The default service version is now "V7_6_Preview_1". +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -109,7 +102,7 @@ The following changes are only breaking from the previous beta. They are not bre - Verify the challenge resource matches the vault domain. This should affect few customers who can set `KeyClientOptions.DisableChallengeResourceVerification` or `CryptographyClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) @@ -400,7 +393,7 @@ Changes from both the last release and the last beta include: Version 4.0.0-preview.1 is the first preview of our efforts to create a user-friendly client library for Azure Key Vault. For more information about preview releases of other Azure SDK libraries, please visit -. +https://aka.ms/azure-sdk-preview1-net. This library is not a direct replacement for `Microsoft.Azure.KeyVault`. Applications using that library would require code changes to use `Azure.Security.KeyVault.Keys`. @@ -425,7 +418,7 @@ only). [Azure Identity documentation](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity) for more information -### `Microsoft.Azure.KeyVault` features not implemented in this release +### `Microsoft.Azure.KeyVault` features not implemented in this release: - Certificate management APIs - Cryptographic operations, e.g. sign, un/wrap, verify, en- and diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs index 77b3469313e9c..c33c46631e8aa 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/api/Azure.Security.KeyVault.Keys.netstandard2.0.cs @@ -159,7 +159,7 @@ public KeyClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azu } public partial class KeyClientOptions : Azure.Core.ClientOptions { - public KeyClientOptions(Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion.V7_6_Preview_1) { } + public KeyClientOptions(Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Keys.KeyClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -170,7 +170,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -430,7 +429,7 @@ public CryptographyClient(System.Uri keyId, Azure.Core.TokenCredential credentia } public partial class CryptographyClientOptions : Azure.Core.ClientOptions { - public CryptographyClientOptions(Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion.V7_6_Preview_1) { } + public CryptographyClientOptions(Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion version = Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -441,7 +440,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public partial class DecryptParameters diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json index 23e1dd31e6317..59c5d87f82ee4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Keys", - "Tag": "net/keyvault/Azure.Security.KeyVault.Keys_5dc33e5113" + "Tag": "net/keyvault/Azure.Security.KeyVault.Keys_a8557a0a67" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj index 6fbfcee10509d..f46346836fbb8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Azure.Security.KeyVault.Keys.csproj @@ -3,7 +3,7 @@ This is the Microsoft Azure Key Vault Keys client library Microsoft Azure.Security.KeyVault.Keys client library - 4.7.0-beta.1 + 4.7.0 4.6.0 Microsoft Azure Key Vault Keys;$(PackageCommonTags) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs index e4e3d9f681054..ebc5f47514f5a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/Cryptography/CryptographyClientOptions.cs @@ -16,7 +16,7 @@ public class CryptographyClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs index 53af4ace6a14d..0a423f9734386 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyClientOptions.cs @@ -16,7 +16,7 @@ public class KeyClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client @@ -54,11 +54,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version V7_6_Preview_1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -99,7 +94,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs index 34499114c71d5..8b6baff2d3254 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyRotationLifetimeAction.cs @@ -37,7 +37,6 @@ internal KeyRotationLifetimeAction() /// /// Gets the that will be executed. - /// The value is compared case-insensitively by the service. /// public KeyRotationPolicyAction Action { get; private set; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs index a2dd49ddea8ce..5de9d50e622d6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/tests/KeysTestBase.cs @@ -13,7 +13,6 @@ namespace Azure.Security.KeyVault.Keys.Tests { [ClientTestFixture( - KeyClientOptions.ServiceVersion.V7_6_Preview_1, KeyClientOptions.ServiceVersion.V7_5, KeyClientOptions.ServiceVersion.V7_4, KeyClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md index 07b929203c42c..a94fb18396a97 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/CHANGELOG.md @@ -1,17 +1,10 @@ # Release History -## 4.7.0-beta.1 (Unreleased) +## 4.7.0 (2024-10-14) ### Features Added -- Support for Continuous Access Evaluation (CAE). - -### Breaking Changes - -### Bugs Fixed - -### Other Changes -- The default service version is now "V7_6_Preview_1". +- Support for Continuous Access Evaluation (CAE). ## 4.6.0 (2024-02-14) @@ -77,7 +70,7 @@ Changes from both the last release and the last beta include: - Verify the challenge resource matches the vault domain. This should affect few customers who can set `SecretClientOptions.DisableChallengeResourceVerification` to `true` to disable. - See for more information. + See https://aka.ms/azsdk/blog/vault-uri for more information. ## 4.3.0 (2022-03-24) @@ -221,14 +214,14 @@ Changes from both the last release and the last beta include: - `SecretClient.DeleteSecret` has been renamed to `SecretClient.StartDeleteSecret` and now returns a `DeleteSecretOperation` to track this long-running operation. - `SecretClient.RecoverDeletedSecret` has been renamed to `SecretClient.StartRecoverDeletedSecret` and now returns a `RecoverDeletedSecretOperation` to track this long-running operation. -### Major changes +### Major changes - Updated to work with the 1.0.0 release versions of Azure.Core and Azure.Identity. - `KeyModelFactory` added to create mocks of model types for testing. ## 4.0.0-preview.5 (2019-10-07) -### Breaking changes +### Breaking changes - `SecretBase` has been renamed to `SecretProperties`. - `Secret` and `DeletedSecret` no longer extend `SecretProperties`, but instead contain a `SecretProperties` property named `Properties`. @@ -237,10 +230,9 @@ Changes from both the last release and the last beta include: - All methods in `SecretClient` now include the word "Secret" consistent with `KeyClient` and `CertificateClient`. ## 4.0.0-preview.1 (2019-06-28) - Version 4.0.0-preview.1 is the first preview of our efforts to create a user-friendly client library for Azure Key Vault. For more information about preview releases of other Azure SDK libraries, please visit -. +https://aka.ms/azure-sdk-preview1-net. This library is not a direct replacement for `Microsoft.Azure.KeyVault`. Applications using that library would require code changes to use `Azure.Security.KeyVault.Secrets`. @@ -251,10 +243,9 @@ and demonstrate the new API. ### Major changes from `Microsoft.Azure.KeyVault` - - Packages scoped by functionality - - `Azure.Security.KeyVault.Secrets` contains a client for secret operations. - - `Azure.Security.KeyVault.Keys` contains a client for key operations. + - `Azure.Security.KeyVault.Secrets` contains a client for secret operations. + - `Azure.Security.KeyVault.Keys` contains a client for key operations. - Client instances are scoped to vaults (an instance interacts with one vault only). - Asynchronous and synchronous APIs in the `Azure.Security.KeyVault.Secrets` package. @@ -265,8 +256,7 @@ only). [Azure Identity documentation](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity) for more information -### `Microsoft.Azure.KeyVault` features not implemented in this release - +### `Microsoft.Azure.KeyVault` features not implemented in this release: - Certificate management APIs - National cloud support. This release supports public global cloud vaults, e.g. https://{vault-name}.vault.azure.net diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs index fffa9c1137641..c231ef8a47bd2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/api/Azure.Security.KeyVault.Secrets.netstandard2.0.cs @@ -95,7 +95,7 @@ public SecretClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, } public partial class SecretClientOptions : Azure.Core.ClientOptions { - public SecretClientOptions(Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion version = Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion.V7_6_Preview_1) { } + public SecretClientOptions(Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion version = Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion.V7_5) { } public bool DisableChallengeResourceVerification { get { throw null; } set { } } public Azure.Security.KeyVault.Secrets.SecretClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion @@ -106,7 +106,6 @@ public enum ServiceVersion V7_3 = 3, V7_4 = 4, V7_5 = 5, - V7_6_Preview_1 = 6, } } public static partial class SecretModelFactory diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json b/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json index 2f5fc05d04bfe..73d76b643745d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/keyvault/Azure.Security.KeyVault.Secrets", - "Tag": "net/keyvault/Azure.Security.KeyVault.Secrets_835634e403" + "Tag": "net/keyvault/Azure.Security.KeyVault.Secrets_18b0beab8a" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj index 7e2e83c781131..836ccac18e577 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Azure.Security.KeyVault.Secrets.csproj @@ -3,7 +3,7 @@ This is the Microsoft Azure Key Vault Secrets client library Microsoft Azure.Security.KeyVault.Secrets client library - 4.7.0-beta.1 + 4.7.0 4.6.0 Microsoft Azure Key Vault Secrets;$(PackageCommonTags) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs index 66dc3d1b60723..86022586ccb4f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/src/SecretClientOptions.cs @@ -16,7 +16,7 @@ public class SecretClientOptions : ClientOptions /// For more information, see /// Key Vault versions. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V7_6_Preview_1; + internal const ServiceVersion LatestVersion = ServiceVersion.V7_5; /// /// The versions of Azure Key Vault supported by this client library. @@ -53,11 +53,6 @@ public enum ServiceVersion /// The Key Vault API version 7.5. /// V7_5 = 5, - - /// - /// The Key Vault API version 7.6-preview.1. - /// - V7_6_Preview_1 = 6, #pragma warning restore CA1707 // Identifiers should not contain underscores } @@ -97,7 +92,6 @@ internal string GetVersionString() ServiceVersion.V7_3 => "7.3", ServiceVersion.V7_4 => "7.4", ServiceVersion.V7_5 => "7.5", - ServiceVersion.V7_6_Preview_1 => "7.6-preview.1", _ => throw new ArgumentException(Version.ToString()), }; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs index 1b5f7577b81ca..4b3f24fe846f4 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/tests/SecretsTestBase.cs @@ -14,7 +14,6 @@ namespace Azure.Security.KeyVault.Secrets.Tests { [ClientTestFixture( - SecretClientOptions.ServiceVersion.V7_6_Preview_1, SecretClientOptions.ServiceVersion.V7_5, SecretClientOptions.ServiceVersion.V7_4, SecretClientOptions.ServiceVersion.V7_3, diff --git a/sdk/keyvault/test-resources.json b/sdk/keyvault/test-resources.json index f8d5d93e57113..6f70888a84511 100644 --- a/sdk/keyvault/test-resources.json +++ b/sdk/keyvault/test-resources.json @@ -283,44 +283,40 @@ } } ], - "outputs": { - "AZURE_KEYVAULT_URL": { - "type": "string", - "value": "[reference(variables('kvName')).vaultUri]" - }, - "AZURE_MANAGEDHSM_URL": { - "type": "string", - "condition": "[parameters('enableHsm')]", - "value": "[reference(variables('hsmName')).hsmUri]" - }, - "KEYVAULT_SKU": { - "type": "string", - "value": "[reference(parameters('baseName')).sku.name]" - }, - "CLIENT_OBJECTID": { - "type": "string", - "value": "[parameters('testApplicationOid')]" - }, - "BLOB_STORAGE_ACCOUNT_NAME": { - "type": "string", - "value": "[variables('primaryAccountName')]" - }, - "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { - "type": "string", - "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" - }, - "BLOB_CONTAINER_NAME": { - "type": "string", - "value": "[variables('blobContainerName')]" - }, - "AZURE_KEYVAULT_ATTESTATION_URL": { - "type": "string", - "condition": "[parameters('enableAttestation')]", - "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" - }, - "KEYVAULT_TENANT_ID": { - "type": "string", - "value": "[parameters('tenantId')]" + "outputs": { + "AZURE_KEYVAULT_URL": { + "type": "string", + "value": "[reference(variables('kvName')).vaultUri]" + }, + "AZURE_MANAGEDHSM_URL": { + "type": "string", + "condition": "[parameters('enableHsm')]", + "value": "[reference(variables('hsmName')).hsmUri]" + }, + "KEYVAULT_SKU": { + "type": "string", + "value": "[reference(parameters('baseName')).sku.name]" + }, + "CLIENT_OBJECTID": { + "type": "string", + "value": "[parameters('testApplicationOid')]" + }, + "BLOB_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('primaryAccountName')]" + }, + "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]" + }, + "BLOB_CONTAINER_NAME" : { + "type": "string", + "value": "[variables('blobContainerName')]" + }, + "AZURE_KEYVAULT_ATTESTATION_URL": { + "type": "string", + "condition": "[parameters('enableAttestation')]", + "value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]" + } } - } }