diff --git a/sdk/security/keyvault/azadmin/CHANGELOG.md b/sdk/security/keyvault/azadmin/CHANGELOG.md index e97f596b4094..4686869e77e8 100644 --- a/sdk/security/keyvault/azadmin/CHANGELOG.md +++ b/sdk/security/keyvault/azadmin/CHANGELOG.md @@ -1,6 +1,6 @@ ## Release History -### 1.4.1-beta.1 (Unreleased) +### 1.5.0 (Unreleased) #### Features Added @@ -9,6 +9,7 @@ #### Bugs Fixed #### Other Changes +* Upgraded to API service version `2025-07-01` ### 1.4.0 (2025-06-12) diff --git a/sdk/security/keyvault/azadmin/assets.json b/sdk/security/keyvault/azadmin/assets.json index 3779fc16f407..45b49180b8cc 100644 --- a/sdk/security/keyvault/azadmin/assets.json +++ b/sdk/security/keyvault/azadmin/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/security/keyvault/azadmin", - "Tag": "go/security/keyvault/azadmin_441ac3d161" + "Tag": "go/security/keyvault/azadmin_7828090213" } diff --git a/sdk/security/keyvault/azadmin/backup/client.go b/sdk/security/keyvault/azadmin/backup/client.go index 2f8fc1a92bb8..d3d54fc68cc6 100644 --- a/sdk/security/keyvault/azadmin/backup/client.go +++ b/sdk/security/keyvault/azadmin/backup/client.go @@ -25,7 +25,7 @@ type Client struct { // BeginFullBackup - Creates a full backup using a user-provided SAS token to an Azure blob storage container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - azureStorageBlobContainerURI - Azure blob shared access signature token pointing to a valid Azure blob container where // full backup needs to be stored. This token needs to be valid for at least next 24 hours from the time of making this call. // - options - BeginFullBackupOptions contains the optional parameters for the Client.BeginFullBackup method. @@ -50,7 +50,7 @@ func (client *Client) BeginFullBackup(ctx context.Context, azureStorageBlobConta // FullBackup - Creates a full backup using a user-provided SAS token to an Azure blob storage container. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 func (client *Client) fullBackup(ctx context.Context, azureStorageBlobContainerURI SASTokenParameters, options *BeginFullBackupOptions) (*http.Response, error) { var err error const operationName = "Client.BeginFullBackup" @@ -80,7 +80,7 @@ func (client *Client) fullBackupCreateRequest(ctx context.Context, azureStorageB return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -94,7 +94,7 @@ func (client *Client) fullBackupCreateRequest(ctx context.Context, azureStorageB // folder // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - restoreBlobDetails - The Azure blob SAS token pointing to a folder where the previous successful full backup was stored. // - options - BeginFullRestoreOptions contains the optional parameters for the Client.BeginFullRestore method. func (client *Client) BeginFullRestore(ctx context.Context, restoreBlobDetails RestoreOperationParameters, options *BeginFullRestoreOptions) (*runtime.Poller[FullRestoreResponse], error) { @@ -105,7 +105,7 @@ func (client *Client) BeginFullRestore(ctx context.Context, restoreBlobDetails R // folder // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 func (client *Client) fullRestore(ctx context.Context, restoreBlobDetails RestoreOperationParameters, options *BeginFullRestoreOptions) (*http.Response, error) { var err error const operationName = "Client.BeginFullRestore" @@ -135,7 +135,7 @@ func (client *Client) fullRestoreCreateRequest(ctx context.Context, restoreBlobD return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -148,7 +148,7 @@ func (client *Client) fullRestoreCreateRequest(ctx context.Context, restoreBlobD // BeginPreFullBackup - Pre-backup operation for checking whether the customer can perform a full backup operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - preBackupOperationParameters - Optional parameters to validate prior to performing a full backup operation. // - options - BeginPreFullBackupOptions contains the optional parameters for the Client.BeginPreFullBackup method. func (client *Client) BeginPreFullBackup(ctx context.Context, preBackupOperationParameters PreBackupOperationParameters, options *BeginPreFullBackupOptions) (*runtime.Poller[PreFullBackupResponse], error) { @@ -172,7 +172,7 @@ func (client *Client) BeginPreFullBackup(ctx context.Context, preBackupOperation // PreFullBackup - Pre-backup operation for checking whether the customer can perform a full backup operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 func (client *Client) preFullBackup(ctx context.Context, preBackupOperationParameters PreBackupOperationParameters, options *BeginPreFullBackupOptions) (*http.Response, error) { var err error const operationName = "Client.BeginPreFullBackup" @@ -202,7 +202,7 @@ func (client *Client) preFullBackupCreateRequest(ctx context.Context, preBackupO return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -215,7 +215,7 @@ func (client *Client) preFullBackupCreateRequest(ctx context.Context, preBackupO // BeginPreFullRestore - Pre-restore operation for checking whether the customer can perform a full restore operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - preRestoreOperationParameters - Optional pre restore parameters to validate prior to performing a full restore operation. // - options - BeginPreFullRestoreOptions contains the optional parameters for the Client.BeginPreFullRestore method. func (client *Client) BeginPreFullRestore(ctx context.Context, preRestoreOperationParameters PreRestoreOperationParameters, options *BeginPreFullRestoreOptions) (*runtime.Poller[PreFullRestoreResponse], error) { @@ -225,7 +225,7 @@ func (client *Client) BeginPreFullRestore(ctx context.Context, preRestoreOperati // PreFullRestore - Pre-restore operation for checking whether the customer can perform a full restore operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 func (client *Client) preFullRestore(ctx context.Context, preRestoreOperationParameters PreRestoreOperationParameters, options *BeginPreFullRestoreOptions) (*http.Response, error) { var err error const operationName = "Client.BeginPreFullRestore" @@ -255,7 +255,7 @@ func (client *Client) preFullRestoreCreateRequest(ctx context.Context, preRestor return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -269,7 +269,7 @@ func (client *Client) preFullRestoreCreateRequest(ctx context.Context, preRestor // stored Azure Blob storage backup folder // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - keyName - The name of the key to be restored from the user supplied backup // - restoreBlobDetails - The Azure blob SAS token pointing to a folder where the previous successful full backup was stored // - options - BeginSelectiveKeyRestoreOptions contains the optional parameters for the Client.BeginSelectiveKeyRestore method. @@ -281,7 +281,7 @@ func (client *Client) BeginSelectiveKeyRestore(ctx context.Context, keyName stri // Azure Blob storage backup folder // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 func (client *Client) selectiveKeyRestore(ctx context.Context, keyName string, restoreBlobDetails SelectiveKeyRestoreOperationParameters, options *BeginSelectiveKeyRestoreOptions) (*http.Response, error) { var err error const operationName = "Client.BeginSelectiveKeyRestore" @@ -315,7 +315,7 @@ func (client *Client) selectiveKeyRestoreCreateRequest(ctx context.Context, keyN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/security/keyvault/azadmin/backup/testdata/_metadata.json b/sdk/security/keyvault/azadmin/backup/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azadmin/backup/testdata/_metadata.json +++ b/sdk/security/keyvault/azadmin/backup/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azadmin/backup/tsp-location.yaml b/sdk/security/keyvault/azadmin/backup/tsp-location.yaml index 9059d0892a17..c998ff5065bd 100644 --- a/sdk/security/keyvault/azadmin/backup/tsp-location.yaml +++ b/sdk/security/keyvault/azadmin/backup/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.BackupRestore -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: 39b2bb6b46f241309c56ad31a88aaee910578036 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common/ diff --git a/sdk/security/keyvault/azadmin/internal/version.go b/sdk/security/keyvault/azadmin/internal/version.go index cfb0b2fd4274..967a6d061228 100644 --- a/sdk/security/keyvault/azadmin/internal/version.go +++ b/sdk/security/keyvault/azadmin/internal/version.go @@ -5,5 +5,5 @@ package internal const ( ModuleName = "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin" - Version = "v1.4.1-beta.1" + Version = "v1.5.0" ) diff --git a/sdk/security/keyvault/azadmin/rbac/client.go b/sdk/security/keyvault/azadmin/rbac/client.go index fa9ce05f46ad..a2496d535adf 100644 --- a/sdk/security/keyvault/azadmin/rbac/client.go +++ b/sdk/security/keyvault/azadmin/rbac/client.go @@ -25,7 +25,7 @@ type Client struct { // CreateOrUpdateRoleDefinition - Creates or updates a custom role definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role definition to create or update. Managed HSM only supports '/'. // - roleDefinitionName - The name of the role definition to create or update. It can be any valid GUID. // - parameters - Parameters for the role definition. @@ -66,7 +66,7 @@ func (client *Client) createOrUpdateRoleDefinitionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -88,7 +88,7 @@ func (client *Client) createOrUpdateRoleDefinitionHandleResponse(resp *http.Resp // CreateRoleAssignment - Creates a role assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role assignment to create. // - roleAssignmentName - The name of the role assignment to create. It can be any valid GUID. // - parameters - Parameters for the role assignment. @@ -128,7 +128,7 @@ func (client *Client) createRoleAssignmentCreateRequest(ctx context.Context, sco return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -150,7 +150,7 @@ func (client *Client) createRoleAssignmentHandleResponse(resp *http.Response) (C // DeleteRoleAssignment - Deletes a role assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role assignment to delete. // - roleAssignmentName - The name of the role assignment to delete. // - options - DeleteRoleAssignmentOptions contains the optional parameters for the Client.DeleteRoleAssignment method. @@ -189,7 +189,7 @@ func (client *Client) deleteRoleAssignmentCreateRequest(ctx context.Context, sco return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,7 +207,7 @@ func (client *Client) deleteRoleAssignmentHandleResponse(resp *http.Response) (D // DeleteRoleDefinition - Deletes a custom role definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role definition to delete. Managed HSM only supports '/'. // - roleDefinitionName - The name (GUID) of the role definition to delete. // - options - DeleteRoleDefinitionOptions contains the optional parameters for the Client.DeleteRoleDefinition method. @@ -246,7 +246,7 @@ func (client *Client) deleteRoleDefinitionCreateRequest(ctx context.Context, sco return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *Client) deleteRoleDefinitionHandleResponse(resp *http.Response) (D // GetRoleAssignment - Get the specified role assignment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role assignment. // - roleAssignmentName - The name of the role assignment to get. // - options - GetRoleAssignmentOptions contains the optional parameters for the Client.GetRoleAssignment method. @@ -303,7 +303,7 @@ func (client *Client) getRoleAssignmentCreateRequest(ctx context.Context, scope return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -321,7 +321,7 @@ func (client *Client) getRoleAssignmentHandleResponse(resp *http.Response) (GetR // GetRoleDefinition - Get the specified role definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role definition to get. Managed HSM only supports '/'. // - roleDefinitionName - The name of the role definition to get. // - options - GetRoleDefinitionOptions contains the optional parameters for the Client.GetRoleDefinition method. @@ -360,7 +360,7 @@ func (client *Client) getRoleDefinitionCreateRequest(ctx context.Context, scope return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +377,7 @@ func (client *Client) getRoleDefinitionHandleResponse(resp *http.Response) (GetR // NewListRoleAssignmentsPager - Gets role assignments for a scope. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role assignments. // - options - ListRoleAssignmentsOptions contains the optional parameters for the Client.NewListRoleAssignmentsPager method. func (client *Client) NewListRoleAssignmentsPager(scope RoleScope, options *ListRoleAssignmentsOptions) *runtime.Pager[ListRoleAssignmentsResponse] { @@ -415,7 +415,7 @@ func (client *Client) listRoleAssignmentsCreateRequest(ctx context.Context, scop if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -432,7 +432,7 @@ func (client *Client) listRoleAssignmentsHandleResponse(resp *http.Response) (Li // NewListRoleDefinitionsPager - Get all role definitions that are applicable at scope and above. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - scope - The scope of the role definition. // - options - ListRoleDefinitionsOptions contains the optional parameters for the Client.NewListRoleDefinitionsPager method. func (client *Client) NewListRoleDefinitionsPager(scope RoleScope, options *ListRoleDefinitionsOptions) *runtime.Pager[ListRoleDefinitionsResponse] { @@ -470,7 +470,7 @@ func (client *Client) listRoleDefinitionsCreateRequest(ctx context.Context, scop if options != nil && options.Filter != nil { reqQP.Set("$filter", *options.Filter) } - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/security/keyvault/azadmin/rbac/testdata/_metadata.json b/sdk/security/keyvault/azadmin/rbac/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azadmin/rbac/testdata/_metadata.json +++ b/sdk/security/keyvault/azadmin/rbac/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azadmin/rbac/tsp-location.yaml b/sdk/security/keyvault/azadmin/rbac/tsp-location.yaml index 7e6c1d00da13..b35592c274d9 100644 --- a/sdk/security/keyvault/azadmin/rbac/tsp-location.yaml +++ b/sdk/security/keyvault/azadmin/rbac/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.RBAC -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: 39b2bb6b46f241309c56ad31a88aaee910578036 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common diff --git a/sdk/security/keyvault/azadmin/settings/client.go b/sdk/security/keyvault/azadmin/settings/client.go index dc2288feee82..9971779a8b3d 100644 --- a/sdk/security/keyvault/azadmin/settings/client.go +++ b/sdk/security/keyvault/azadmin/settings/client.go @@ -27,7 +27,7 @@ type Client struct { // Retrieves the setting object of a specified setting name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - settingName - The name of the account setting. Must be a valid settings option. // - options - GetSettingOptions contains the optional parameters for the Client.GetSetting method. func (client *Client) GetSetting(ctx context.Context, settingName string, options *GetSettingOptions) (GetSettingResponse, error) { @@ -64,7 +64,7 @@ func (client *Client) getSettingCreateRequest(ctx context.Context, settingName s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -84,7 +84,7 @@ func (client *Client) getSettingHandleResponse(resp *http.Response) (GetSettingR // Retrieves a list of all the available account settings that can be configured. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - GetSettingsOptions contains the optional parameters for the Client.GetSettings method. func (client *Client) GetSettings(ctx context.Context, options *GetSettingsOptions) (GetSettingsResponse, error) { var err error @@ -116,7 +116,7 @@ func (client *Client) getSettingsCreateRequest(ctx context.Context, _ *GetSettin return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -136,7 +136,7 @@ func (client *Client) getSettingsHandleResponse(resp *http.Response) (GetSetting // Description of the pool setting to be updated // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - settingName - The name of the account setting. Must be a valid settings option. // - parameters - The parameters to update an account setting. // - options - UpdateSettingOptions contains the optional parameters for the Client.UpdateSetting method. @@ -174,7 +174,7 @@ func (client *Client) updateSettingCreateRequest(ctx context.Context, settingNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/security/keyvault/azadmin/settings/testdata/_metadata.json b/sdk/security/keyvault/azadmin/settings/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azadmin/settings/testdata/_metadata.json +++ b/sdk/security/keyvault/azadmin/settings/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azadmin/settings/tsp-location.yaml b/sdk/security/keyvault/azadmin/settings/tsp-location.yaml index a35d7328ecf4..36b41d641cbc 100644 --- a/sdk/security/keyvault/azadmin/settings/tsp-location.yaml +++ b/sdk/security/keyvault/azadmin/settings/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.Settings -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: 39b2bb6b46f241309c56ad31a88aaee910578036 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common diff --git a/sdk/security/keyvault/azcertificates/CHANGELOG.md b/sdk/security/keyvault/azcertificates/CHANGELOG.md index 7cc940a9b6a5..a7d81a336bde 100644 --- a/sdk/security/keyvault/azcertificates/CHANGELOG.md +++ b/sdk/security/keyvault/azcertificates/CHANGELOG.md @@ -1,14 +1,16 @@ # Release History -## 1.4.1-beta.1 (Unreleased) +## 1.5.0 (Unreleased) ### Features Added +* Added support for IP addresses and URIs in `SubjectAlternativeNames` through new `IPAddresses` and `Uris` fields ### Breaking Changes ### Bugs Fixed ### Other Changes +* Upgraded to API service version `2025-07-01` ## 1.4.0 (2025-06-12) diff --git a/sdk/security/keyvault/azcertificates/assets.json b/sdk/security/keyvault/azcertificates/assets.json index aa33214b6b38..78ad635234ca 100644 --- a/sdk/security/keyvault/azcertificates/assets.json +++ b/sdk/security/keyvault/azcertificates/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/security/keyvault/azcertificates", - "Tag": "go/security/keyvault/azcertificates_ca46832b76" + "Tag": "go/security/keyvault/azcertificates_d7cf8d07c6" } diff --git a/sdk/security/keyvault/azcertificates/client.go b/sdk/security/keyvault/azcertificates/client.go index ccecbe4fec10..2e51d2cdd7d0 100644 --- a/sdk/security/keyvault/azcertificates/client.go +++ b/sdk/security/keyvault/azcertificates/client.go @@ -29,7 +29,7 @@ type Client struct { // downloaded. This operation requires the certificates/backup permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - options - BackupCertificateOptions contains the optional parameters for the Client.BackupCertificate method. func (client *Client) BackupCertificate(ctx context.Context, name string, options *BackupCertificateOptions) (BackupCertificateResponse, error) { @@ -66,7 +66,7 @@ func (client *Client) backupCertificateCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -86,7 +86,7 @@ func (client *Client) backupCertificateHandleResponse(resp *http.Response) (Back // If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. The value you provide may be copied globally for the purpose of running the service. // The value provided should not include personally identifiable or sensitive information. // - parameters - The parameters to create a certificate. @@ -125,7 +125,7 @@ func (client *Client) createCertificateCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -150,7 +150,7 @@ func (client *Client) createCertificateHandleResponse(resp *http.Response) (Crea // individual versions of a certificate object. This operation requires the certificates/delete permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - options - DeleteCertificateOptions contains the optional parameters for the Client.DeleteCertificate method. func (client *Client) DeleteCertificate(ctx context.Context, name string, options *DeleteCertificateOptions) (DeleteCertificateResponse, error) { @@ -187,7 +187,7 @@ func (client *Client) deleteCertificateCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -208,7 +208,7 @@ func (client *Client) deleteCertificateHandleResponse(resp *http.Response) (Dele // no longer created. This operation requires the certificates/update permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - options - DeleteCertificateOperationOptions contains the optional parameters for the Client.DeleteCertificateOperation // method. @@ -246,7 +246,7 @@ func (client *Client) deleteCertificateOperationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -267,7 +267,7 @@ func (client *Client) deleteCertificateOperationHandleResponse(resp *http.Respon // permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - DeleteContactsOptions contains the optional parameters for the Client.DeleteContacts method. func (client *Client) DeleteContacts(ctx context.Context, options *DeleteContactsOptions) (DeleteContactsResponse, error) { var err error @@ -299,7 +299,7 @@ func (client *Client) deleteContactsCreateRequest(ctx context.Context, _ *Delete return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -320,7 +320,7 @@ func (client *Client) deleteContactsHandleResponse(resp *http.Response) (DeleteC // requires the certificates/manageissuers/deleteissuers permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the issuer. // - options - DeleteIssuerOptions contains the optional parameters for the Client.DeleteIssuer method. func (client *Client) DeleteIssuer(ctx context.Context, name string, options *DeleteIssuerOptions) (DeleteIssuerResponse, error) { @@ -357,7 +357,7 @@ func (client *Client) deleteIssuerCreateRequest(ctx context.Context, name string return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -377,7 +377,7 @@ func (client *Client) deleteIssuerHandleResponse(resp *http.Response) (DeleteIss // Gets information about a specific certificate. This operation requires the certificates/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate in the given vault. // - version - The version of the certificate. This URI fragment is optional. If not specified, the latest version of the certificate // is returned. @@ -417,7 +417,7 @@ func (client *Client) getCertificateCreateRequest(ctx context.Context, name stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -437,7 +437,7 @@ func (client *Client) getCertificateHandleResponse(resp *http.Response) (GetCert // Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - options - GetCertificateOperationOptions contains the optional parameters for the Client.GetCertificateOperation method. func (client *Client) GetCertificateOperation(ctx context.Context, name string, options *GetCertificateOperationOptions) (GetCertificateOperationResponse, error) { @@ -474,7 +474,7 @@ func (client *Client) getCertificateOperationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -495,7 +495,7 @@ func (client *Client) getCertificateOperationHandleResponse(resp *http.Response) // operation requires the certificates/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate in a given key vault. // - options - GetCertificatePolicyOptions contains the optional parameters for the Client.GetCertificatePolicy method. func (client *Client) GetCertificatePolicy(ctx context.Context, name string, options *GetCertificatePolicyOptions) (GetCertificatePolicyResponse, error) { @@ -532,7 +532,7 @@ func (client *Client) getCertificatePolicyCreateRequest(ctx context.Context, nam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -553,7 +553,7 @@ func (client *Client) getCertificatePolicyHandleResponse(resp *http.Response) (G // operation requires the certificates/managecontacts permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - GetContactsOptions contains the optional parameters for the Client.GetContacts method. func (client *Client) GetContacts(ctx context.Context, options *GetContactsOptions) (GetContactsResponse, error) { var err error @@ -585,7 +585,7 @@ func (client *Client) getContactsCreateRequest(ctx context.Context, _ *GetContac return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -607,7 +607,7 @@ func (client *Client) getContactsHandleResponse(resp *http.Response) (GetContact // permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate // - options - GetDeletedCertificateOptions contains the optional parameters for the Client.GetDeletedCertificate method. func (client *Client) GetDeletedCertificate(ctx context.Context, name string, options *GetDeletedCertificateOptions) (GetDeletedCertificateResponse, error) { @@ -644,7 +644,7 @@ func (client *Client) getDeletedCertificateCreateRequest(ctx context.Context, na return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -665,7 +665,7 @@ func (client *Client) getDeletedCertificateHandleResponse(resp *http.Response) ( // operation requires the certificates/manageissuers/getissuers permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the issuer. // - options - GetIssuerOptions contains the optional parameters for the Client.GetIssuer method. func (client *Client) GetIssuer(ctx context.Context, name string, options *GetIssuerOptions) (GetIssuerResponse, error) { @@ -702,7 +702,7 @@ func (client *Client) getIssuerCreateRequest(ctx context.Context, name string, _ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -724,7 +724,7 @@ func (client *Client) getIssuerHandleResponse(resp *http.Response) (GetIssuerRes // PEM file must contain the key as well as x509 certificates. Key Vault will only accept a key in PKCS#8 format. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. The value you provide may be copied globally for the purpose of running the service. // The value provided should not include personally identifiable or sensitive information. // - parameters - The parameters to import the certificate. @@ -763,7 +763,7 @@ func (client *Client) importCertificateCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -787,7 +787,7 @@ func (client *Client) importCertificateHandleResponse(resp *http.Response) (Impo // The GetCertificates operation returns the set of certificates resources in the specified key vault. This operation requires // the certificates/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListCertificatePropertiesOptions contains the optional parameters for the Client.NewListCertificatePropertiesPager // method. func (client *Client) NewListCertificatePropertiesPager(options *ListCertificatePropertiesOptions) *runtime.Pager[ListCertificatePropertiesResponse] { @@ -821,7 +821,7 @@ func (client *Client) listCertificatePropertiesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") if options != nil && options.IncludePending != nil { reqQP.Set("includePending", strconv.FormatBool(*options.IncludePending)) } @@ -844,7 +844,7 @@ func (client *Client) listCertificatePropertiesHandleResponse(resp *http.Respons // The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This operation requires // the certificates/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - options - ListCertificatePropertiesVersionsOptions contains the optional parameters for the Client.NewListCertificatePropertiesVersionsPager // method. @@ -883,7 +883,7 @@ func (client *Client) listCertificatePropertiesVersionsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -905,7 +905,7 @@ func (client *Client) listCertificatePropertiesVersionsHandleResponse(resp *http // for recovery or purging. This operation includes deletion-specific information. This operation requires the certificates/get/list // permission. This operation can only be enabled on soft-delete enabled vaults. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListDeletedCertificatePropertiesOptions contains the optional parameters for the Client.NewListDeletedCertificatePropertiesPager // method. func (client *Client) NewListDeletedCertificatePropertiesPager(options *ListDeletedCertificatePropertiesOptions) *runtime.Pager[ListDeletedCertificatePropertiesResponse] { @@ -939,7 +939,7 @@ func (client *Client) listDeletedCertificatePropertiesCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") if options != nil && options.IncludePending != nil { reqQP.Set("includePending", strconv.FormatBool(*options.IncludePending)) } @@ -962,7 +962,7 @@ func (client *Client) listDeletedCertificatePropertiesHandleResponse(resp *http. // The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault. This operation // requires the certificates/manageissuers/getissuers permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListIssuerPropertiesOptions contains the optional parameters for the Client.NewListIssuerPropertiesPager method. func (client *Client) NewListIssuerPropertiesPager(options *ListIssuerPropertiesOptions) *runtime.Pager[ListIssuerPropertiesResponse] { return runtime.NewPager(runtime.PagingHandler[ListIssuerPropertiesResponse]{ @@ -995,7 +995,7 @@ func (client *Client) listIssuerPropertiesCreateRequest(ctx context.Context, _ * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1016,7 +1016,7 @@ func (client *Client) listIssuerPropertiesHandleResponse(resp *http.Response) (L // in the service. This operation requires the certificates/create permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - parameters - The parameters to merge certificate. // - options - MergeCertificateOptions contains the optional parameters for the Client.MergeCertificate method. @@ -1054,7 +1054,7 @@ func (client *Client) mergeCertificateCreateRequest(ctx context.Context, name st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1080,7 +1080,7 @@ func (client *Client) mergeCertificateHandleResponse(resp *http.Response) (Merge // the certificate/purge permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate // - options - PurgeDeletedCertificateOptions contains the optional parameters for the Client.PurgeDeletedCertificate method. func (client *Client) PurgeDeletedCertificate(ctx context.Context, name string, options *PurgeDeletedCertificateOptions) (PurgeDeletedCertificateResponse, error) { @@ -1116,7 +1116,7 @@ func (client *Client) purgeDeletedCertificateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -1128,7 +1128,7 @@ func (client *Client) purgeDeletedCertificateCreateRequest(ctx context.Context, // This operation requires the certificates/recover permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the deleted certificate // - options - RecoverDeletedCertificateOptions contains the optional parameters for the Client.RecoverDeletedCertificate method. func (client *Client) RecoverDeletedCertificate(ctx context.Context, name string, options *RecoverDeletedCertificateOptions) (RecoverDeletedCertificateResponse, error) { @@ -1165,7 +1165,7 @@ func (client *Client) recoverDeletedCertificateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1185,7 +1185,7 @@ func (client *Client) recoverDeletedCertificateHandleResponse(resp *http.Respons // Restores a backed up certificate, and all its versions, to a vault. This operation requires the certificates/restore permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - parameters - The parameters to restore the certificate. // - options - RestoreCertificateOptions contains the optional parameters for the Client.RestoreCertificate method. func (client *Client) RestoreCertificate(ctx context.Context, parameters RestoreCertificateParameters, options *RestoreCertificateOptions) (RestoreCertificateResponse, error) { @@ -1218,7 +1218,7 @@ func (client *Client) restoreCertificateCreateRequest(ctx context.Context, param return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1242,7 +1242,7 @@ func (client *Client) restoreCertificateHandleResponse(resp *http.Response) (Res // Sets the certificate contacts for the specified key vault. This operation requires the certificates/managecontacts permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - contacts - The contacts for the key vault certificate. // - options - SetContactsOptions contains the optional parameters for the Client.SetContacts method. func (client *Client) SetContacts(ctx context.Context, contacts Contacts, options *SetContactsOptions) (SetContactsResponse, error) { @@ -1275,7 +1275,7 @@ func (client *Client) setContactsCreateRequest(ctx context.Context, contacts Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1300,7 +1300,7 @@ func (client *Client) setContactsHandleResponse(resp *http.Response) (SetContact // permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the issuer. The value you provide may be copied globally for the purpose of running the service. The // value provided should not include personally identifiable or sensitive information. // - parameter - Certificate issuer set parameter. @@ -1339,7 +1339,7 @@ func (client *Client) setIssuerCreateRequest(ctx context.Context, name string, p return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1364,7 +1364,7 @@ func (client *Client) setIssuerHandleResponse(resp *http.Response) (SetIssuerRes // certificate's attributes. This operation requires the certificates/update permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate in the given key vault. // - version - The version of the certificate. // - parameters - The parameters for certificate update. @@ -1404,7 +1404,7 @@ func (client *Client) updateCertificateCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1428,7 +1428,7 @@ func (client *Client) updateCertificateHandleResponse(resp *http.Response) (Upda // Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate. // - certificateOperation - The certificate operation response. // - options - UpdateCertificateOperationOptions contains the optional parameters for the Client.UpdateCertificateOperation @@ -1467,7 +1467,7 @@ func (client *Client) updateCertificateOperationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1492,7 +1492,7 @@ func (client *Client) updateCertificateOperationHandleResponse(resp *http.Respon // permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the certificate in the given vault. // - certificatePolicy - The policy for the certificate. // - options - UpdateCertificatePolicyOptions contains the optional parameters for the Client.UpdateCertificatePolicy method. @@ -1530,7 +1530,7 @@ func (client *Client) updateCertificatePolicyCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1555,7 +1555,7 @@ func (client *Client) updateCertificatePolicyHandleResponse(resp *http.Response) // the certificates/setissuers permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the issuer. // - parameter - Certificate issuer update parameter. // - options - UpdateIssuerOptions contains the optional parameters for the Client.UpdateIssuer method. @@ -1593,7 +1593,7 @@ func (client *Client) updateIssuerCreateRequest(ctx context.Context, name string return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/security/keyvault/azcertificates/client_test.go b/sdk/security/keyvault/azcertificates/client_test.go index 83b40a7ff0df..5cb2674e2f5f 100644 --- a/sdk/security/keyvault/azcertificates/client_test.go +++ b/sdk/security/keyvault/azcertificates/client_test.go @@ -700,3 +700,39 @@ func TestAPIVersion(t *testing.T) { _, err = client.GetCertificate(context.Background(), "name", "", nil) require.NoError(t, err) } + +func TestSubjectAlternativeNames(t *testing.T) { + client := startTest(t) + + // Test certificate with all SAN fields including new IPAddresses and Uris + certName := getName(t, "allsans") + policy := azcertificates.CertificatePolicy{ + IssuerParameters: &azcertificates.IssuerParameters{Name: to.Ptr("self")}, + X509CertificateProperties: &azcertificates.X509CertificateProperties{ + Subject: to.Ptr("CN=SANTest"), + SubjectAlternativeNames: &azcertificates.SubjectAlternativeNames{ + DNSNames: []*string{to.Ptr("localhost"), to.Ptr("example.com")}, + Emails: []*string{to.Ptr("admin@example.com")}, + IPAddresses: []*string{to.Ptr("192.168.1.1"), to.Ptr("2001:0db8::1")}, // IPv4 and IPv6 + URIs: []*string{to.Ptr("https://example.com"), to.Ptr("https://test.com/path")}, + UserPrincipalNames: []*string{to.Ptr("user@domain.com")}, + }, + }, + } + + // Create certificate and verify SANs are preserved + createParams := azcertificates.CreateCertificateParameters{CertificatePolicy: &policy} + testSerde(t, &createParams) + _, err := client.CreateCertificate(ctx, certName, createParams, nil) + require.NoError(t, err) + pollCertOperation(t, client, certName) + defer cleanUpCert(t, client, certName) + + // Verify all SANs are retrieved correctly + getResp, err := client.GetCertificate(ctx, certName, "", nil) + require.NoError(t, err) + require.NotNil(t, getResp.Policy) + require.NotNil(t, getResp.Policy.X509CertificateProperties) + require.NotNil(t, getResp.Policy.X509CertificateProperties.SubjectAlternativeNames) + testSerde(t, getResp.Policy.X509CertificateProperties.SubjectAlternativeNames) +} diff --git a/sdk/security/keyvault/azcertificates/models.go b/sdk/security/keyvault/azcertificates/models.go index 07ed24d3bc83..f2f3d5b88cd1 100644 --- a/sdk/security/keyvault/azcertificates/models.go +++ b/sdk/security/keyvault/azcertificates/models.go @@ -477,6 +477,12 @@ type SubjectAlternativeNames struct { // Email addresses. Emails []*string + // IP addresses; supports IPv4 and IPv6. + IPAddresses []*string + + // Uniform Resource Identifiers. + URIs []*string + // User Principal Names. UserPrincipalNames []*string } diff --git a/sdk/security/keyvault/azcertificates/models_serde.go b/sdk/security/keyvault/azcertificates/models_serde.go index 99f5f7fbda5e..9576bff6e829 100644 --- a/sdk/security/keyvault/azcertificates/models_serde.go +++ b/sdk/security/keyvault/azcertificates/models_serde.go @@ -1236,6 +1236,8 @@ func (s SubjectAlternativeNames) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "dns_names", s.DNSNames) populate(objectMap, "emails", s.Emails) + populate(objectMap, "ipAddresses", s.IPAddresses) + populate(objectMap, "uris", s.URIs) populate(objectMap, "upns", s.UserPrincipalNames) return json.Marshal(objectMap) } @@ -1255,6 +1257,12 @@ func (s *SubjectAlternativeNames) UnmarshalJSON(data []byte) error { case "emails": err = unpopulate(val, "Emails", &s.Emails) delete(rawMsg, key) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &s.IPAddresses) + delete(rawMsg, key) + case "uris": + err = unpopulate(val, "URIs", &s.URIs) + delete(rawMsg, key) case "upns": err = unpopulate(val, "UserPrincipalNames", &s.UserPrincipalNames) delete(rawMsg, key) diff --git a/sdk/security/keyvault/azcertificates/testdata/_metadata.json b/sdk/security/keyvault/azcertificates/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azcertificates/testdata/_metadata.json +++ b/sdk/security/keyvault/azcertificates/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azcertificates/tsp-location.yaml b/sdk/security/keyvault/azcertificates/tsp-location.yaml index f9f96de8429f..ab147ec3db04 100644 --- a/sdk/security/keyvault/azcertificates/tsp-location.yaml +++ b/sdk/security/keyvault/azcertificates/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.Certificates -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: d40d1693f5cba246f7999a01380bb5c029f2c395 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common diff --git a/sdk/security/keyvault/azcertificates/version.go b/sdk/security/keyvault/azcertificates/version.go index 07f1acd08335..88fd9948db89 100644 --- a/sdk/security/keyvault/azcertificates/version.go +++ b/sdk/security/keyvault/azcertificates/version.go @@ -5,5 +5,5 @@ package azcertificates const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates" - version = "v1.4.1-beta.1" + version = "v1.5.0" ) diff --git a/sdk/security/keyvault/azkeys/CHANGELOG.md b/sdk/security/keyvault/azkeys/CHANGELOG.md index 0f38a3b3d8b4..cde982047404 100644 --- a/sdk/security/keyvault/azkeys/CHANGELOG.md +++ b/sdk/security/keyvault/azkeys/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.1-beta.1 (Unreleased) +## 1.5.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +* Upgraded to API service version `2025-07-01` ## 1.4.0 (2025-06-12) diff --git a/sdk/security/keyvault/azkeys/assets.json b/sdk/security/keyvault/azkeys/assets.json index 80352ce5e233..7723f05f470f 100644 --- a/sdk/security/keyvault/azkeys/assets.json +++ b/sdk/security/keyvault/azkeys/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/security/keyvault/azkeys", - "Tag": "go/security/keyvault/azkeys_c896478356" + "Tag": "go/security/keyvault/azkeys_a5ee0529fb" } diff --git a/sdk/security/keyvault/azkeys/client.go b/sdk/security/keyvault/azkeys/client.go index d76005ea3a98..db1f57cd4b1b 100644 --- a/sdk/security/keyvault/azkeys/client.go +++ b/sdk/security/keyvault/azkeys/client.go @@ -34,7 +34,7 @@ type Client struct { // in an EU geographical area. This operation requires the key/backup permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - options - BackupKeyOptions contains the optional parameters for the Client.BackupKey method. func (client *Client) BackupKey(ctx context.Context, name string, options *BackupKeyOptions) (BackupKeyResponse, error) { @@ -71,7 +71,7 @@ func (client *Client) backupKeyCreateRequest(ctx context.Context, name string, _ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -92,7 +92,7 @@ func (client *Client) backupKeyHandleResponse(resp *http.Response) (BackupKeyRes // Key Vault creates a new version of the key. It requires the keys/create permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name for the new key. The system will generate the version name for the new key. The value you provide may be // copied globally for the purpose of running the service. The value provided should not include personally identifiable or // sensitive information. @@ -132,7 +132,7 @@ func (client *Client) createKeyCreateRequest(ctx context.Context, name string, p return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -161,7 +161,7 @@ func (client *Client) createKeyHandleResponse(resp *http.Response) (CreateKeyRes // an HMAC, for example. See https://learn.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for the decryption operation. @@ -201,7 +201,7 @@ func (client *Client) decryptCreateRequest(ctx context.Context, name string, ver return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -227,7 +227,7 @@ func (client *Client) decryptHandleResponse(resp *http.Response) (DecryptRespons // This operation requires the keys/delete permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key to delete. // - options - DeleteKeyOptions contains the optional parameters for the Client.DeleteKey method. func (client *Client) DeleteKey(ctx context.Context, name string, options *DeleteKeyOptions) (DeleteKeyResponse, error) { @@ -264,7 +264,7 @@ func (client *Client) deleteKeyCreateRequest(ctx context.Context, name string, _ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -289,7 +289,7 @@ func (client *Client) deleteKeyHandleResponse(resp *http.Response) (DeleteKeyRes // key material. This operation requires the keys/encrypt permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for the encryption operation. @@ -329,7 +329,7 @@ func (client *Client) encryptCreateRequest(ctx context.Context, name string, ver return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -354,7 +354,7 @@ func (client *Client) encryptHandleResponse(resp *http.Response) (EncryptRespons // it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - options - GetDeletedKeyOptions contains the optional parameters for the Client.GetDeletedKey method. func (client *Client) GetDeletedKey(ctx context.Context, name string, options *GetDeletedKeyOptions) (GetDeletedKeyResponse, error) { @@ -391,7 +391,7 @@ func (client *Client) getDeletedKeyCreateRequest(ctx context.Context, name strin return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -412,7 +412,7 @@ func (client *Client) getDeletedKeyHandleResponse(resp *http.Response) (GetDelet // in the response. This operation requires the keys/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key to get. // - version - Adding the version parameter retrieves a specific version of a key. This URI fragment is optional. If not specified, // the latest version of the key is returned. @@ -452,7 +452,7 @@ func (client *Client) getKeyCreateRequest(ctx context.Context, name string, vers return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -473,7 +473,7 @@ func (client *Client) getKeyHandleResponse(resp *http.Response) (GetKeyResponse, // permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key to retrieve attestation for. // - version - Adding the version parameter retrieves attestation blob for specific version of a key. This URI fragment is optional. // If not specified, the latest version of the key attestation blob is returned. @@ -513,7 +513,7 @@ func (client *Client) getKeyAttestationCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,7 +534,7 @@ func (client *Client) getKeyAttestationHandleResponse(resp *http.Response) (GetK // requires the keys/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key in a given key vault. // - options - GetKeyRotationPolicyOptions contains the optional parameters for the Client.GetKeyRotationPolicy method. func (client *Client) GetKeyRotationPolicy(ctx context.Context, name string, options *GetKeyRotationPolicyOptions) (GetKeyRotationPolicyResponse, error) { @@ -571,7 +571,7 @@ func (client *Client) getKeyRotationPolicyCreateRequest(ctx context.Context, nam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -591,7 +591,7 @@ func (client *Client) getKeyRotationPolicyHandleResponse(resp *http.Response) (G // Get the requested number of bytes containing random values from a managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - parameters - The request object to get random bytes. // - options - GetRandomBytesOptions contains the optional parameters for the Client.GetRandomBytes method. func (client *Client) GetRandomBytes(ctx context.Context, parameters GetRandomBytesParameters, options *GetRandomBytesOptions) (GetRandomBytesResponse, error) { @@ -624,7 +624,7 @@ func (client *Client) getRandomBytesCreateRequest(ctx context.Context, parameter return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -649,7 +649,7 @@ func (client *Client) getRandomBytesHandleResponse(resp *http.Response) (GetRand // Key Vault creates a new version of the key. This operation requires the keys/import permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - Name for the imported key. The value you provide may be copied globally for the purpose of running the service. // The value provided should not include personally identifiable or sensitive information. // - parameters - The parameters to import a key. @@ -688,7 +688,7 @@ func (client *Client) importKeyCreateRequest(ctx context.Context, name string, p return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -714,7 +714,7 @@ func (client *Client) importKeyHandleResponse(resp *http.Response) (ImportKeyRes // for soft-delete. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete // enabled vault. This operation requires the keys/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListDeletedKeyPropertiesOptions contains the optional parameters for the Client.NewListDeletedKeyPropertiesPager // method. func (client *Client) NewListDeletedKeyPropertiesPager(options *ListDeletedKeyPropertiesOptions) *runtime.Pager[ListDeletedKeyPropertiesResponse] { @@ -748,7 +748,7 @@ func (client *Client) listDeletedKeyPropertiesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -769,7 +769,7 @@ func (client *Client) listDeletedKeyPropertiesHandleResponse(resp *http.Response // The LIST operation is applicable to all key types, however only the base key identifier, attributes, and tags are provided // in the response. Individual versions of a key are not listed in the response. This operation requires the keys/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListKeyPropertiesOptions contains the optional parameters for the Client.NewListKeyPropertiesPager method. func (client *Client) NewListKeyPropertiesPager(options *ListKeyPropertiesOptions) *runtime.Pager[ListKeyPropertiesResponse] { return runtime.NewPager(runtime.PagingHandler[ListKeyPropertiesResponse]{ @@ -802,7 +802,7 @@ func (client *Client) listKeyPropertiesCreateRequest(ctx context.Context, _ *Lis return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -821,7 +821,7 @@ func (client *Client) listKeyPropertiesHandleResponse(resp *http.Response) (List // // The full key identifier, attributes, and tags are provided in the response. This operation requires the keys/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - options - ListKeyPropertiesVersionsOptions contains the optional parameters for the Client.NewListKeyPropertiesVersionsPager // method. @@ -860,7 +860,7 @@ func (client *Client) listKeyPropertiesVersionsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -881,7 +881,7 @@ func (client *Client) listKeyPropertiesVersionsHandleResponse(resp *http.Respons // vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key // - options - PurgeDeletedKeyOptions contains the optional parameters for the Client.PurgeDeletedKey method. func (client *Client) PurgeDeletedKey(ctx context.Context, name string, options *PurgeDeletedKeyOptions) (PurgeDeletedKeyResponse, error) { @@ -917,7 +917,7 @@ func (client *Client) purgeDeletedKeyCreateRequest(ctx context.Context, name str return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -929,7 +929,7 @@ func (client *Client) purgeDeletedKeyCreateRequest(ctx context.Context, name str // the inverse of the delete operation on soft-delete enabled vaults. This operation requires the keys/recover permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the deleted key. // - options - RecoverDeletedKeyOptions contains the optional parameters for the Client.RecoverDeletedKey method. func (client *Client) RecoverDeletedKey(ctx context.Context, name string, options *RecoverDeletedKeyOptions) (RecoverDeletedKeyResponse, error) { @@ -966,7 +966,7 @@ func (client *Client) recoverDeletedKeyCreateRequest(ctx context.Context, name s return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -987,7 +987,7 @@ func (client *Client) recoverDeletedKeyHandleResponse(resp *http.Response) (Reco // the keys/release permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key to get. // - version - Adding the version parameter retrieves a specific version of a key. // - parameters - The parameters for the key release operation. @@ -1027,7 +1027,7 @@ func (client *Client) releaseCreateRequest(ctx context.Context, name string, ver return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1058,7 +1058,7 @@ func (client *Client) releaseHandleResponse(resp *http.Response) (ReleaseRespons // Vault. This operation requires the keys/restore permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - parameters - The parameters to restore the key. // - options - RestoreKeyOptions contains the optional parameters for the Client.RestoreKey method. func (client *Client) RestoreKey(ctx context.Context, parameters RestoreKeyParameters, options *RestoreKeyOptions) (RestoreKeyResponse, error) { @@ -1091,7 +1091,7 @@ func (client *Client) restoreKeyCreateRequest(ctx context.Context, parameters Re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1115,7 +1115,7 @@ func (client *Client) restoreKeyHandleResponse(resp *http.Response) (RestoreKeyR // The operation will rotate the key based on the key policy. It requires the keys/rotate permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of key to be rotated. The system will generate a new version in the specified key. // - options - RotateKeyOptions contains the optional parameters for the Client.RotateKey method. func (client *Client) RotateKey(ctx context.Context, name string, options *RotateKeyOptions) (RotateKeyResponse, error) { @@ -1152,7 +1152,7 @@ func (client *Client) rotateKeyCreateRequest(ctx context.Context, name string, _ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1173,7 +1173,7 @@ func (client *Client) rotateKeyHandleResponse(resp *http.Response) (RotateKeyRes // private portion of the key. This operation requires the keys/sign permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for the signing operation. @@ -1213,7 +1213,7 @@ func (client *Client) signCreateRequest(ctx context.Context, name string, versio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1239,7 +1239,7 @@ func (client *Client) signHandleResponse(resp *http.Response) (SignResponse, err // since it uses the private portion of the key. This operation requires the keys/unwrapKey permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for the key operation. @@ -1279,7 +1279,7 @@ func (client *Client) unwrapKeyCreateRequest(ctx context.Context, name string, v return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1305,7 +1305,7 @@ func (client *Client) unwrapKeyHandleResponse(resp *http.Response) (UnwrapKeyRes // key itself cannot be changed. This operation requires the keys/update permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of key to update. // - version - The version of the key to update. // - parameters - The parameters of the key to update. @@ -1345,7 +1345,7 @@ func (client *Client) updateKeyCreateRequest(ctx context.Context, name string, v return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1369,7 +1369,7 @@ func (client *Client) updateKeyHandleResponse(resp *http.Response) (UpdateKeyRes // Set specified members in the key policy. Leave others as undefined. This operation requires the keys/update permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key in the given vault. // - keyRotationPolicy - The policy for the key. // - options - UpdateKeyRotationPolicyOptions contains the optional parameters for the Client.UpdateKeyRotationPolicy method. @@ -1407,7 +1407,7 @@ func (client *Client) updateKeyRotationPolicyCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1434,7 +1434,7 @@ func (client *Client) updateKeyRotationPolicyHandleResponse(resp *http.Response) // This operation requires the keys/verify permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for verify operations. @@ -1474,7 +1474,7 @@ func (client *Client) verifyCreateRequest(ctx context.Context, name string, vers return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -1502,7 +1502,7 @@ func (client *Client) verifyHandleResponse(resp *http.Response) (VerifyResponse, // requires the keys/wrapKey permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the key. // - version - The version of the key. // - parameters - The parameters for wrap operation. @@ -1542,7 +1542,7 @@ func (client *Client) wrapKeyCreateRequest(ctx context.Context, name string, ver return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/security/keyvault/azkeys/client_test.go b/sdk/security/keyvault/azkeys/client_test.go index 9c585d7b4ba2..2c8f863831a3 100644 --- a/sdk/security/keyvault/azkeys/client_test.go +++ b/sdk/security/keyvault/azkeys/client_test.go @@ -160,6 +160,8 @@ func TestCRUD(t *testing.T) { testSerde(t, &getResp.KeyBundle) if mhsm { + t.Skip("Skipping MHSM attestation until it supports 2025-07-01") + getAttResp, err := client.GetKeyAttestation(context.Background(), keyName, "", nil) require.NoError(t, err) require.Equal(t, createResp.Key.KID.Name(), getAttResp.Key.KID.Name()) diff --git a/sdk/security/keyvault/azkeys/test-resources.json b/sdk/security/keyvault/azkeys/test-resources.json index b0d7b1e4bdd1..6ed05da5e973 100644 --- a/sdk/security/keyvault/azkeys/test-resources.json +++ b/sdk/security/keyvault/azkeys/test-resources.json @@ -183,7 +183,8 @@ "networkAcls": "[variables('networkAcls')]", "supportsHttpsTrafficOnly": true, "encryption": "[variables('encryption')]", - "accessTier": "Hot" + "accessTier": "Hot", + "allowSharedKeyAccess": false } }, { diff --git a/sdk/security/keyvault/azkeys/testdata/_metadata.json b/sdk/security/keyvault/azkeys/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azkeys/testdata/_metadata.json +++ b/sdk/security/keyvault/azkeys/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azkeys/tsp-location.yaml b/sdk/security/keyvault/azkeys/tsp-location.yaml index 671b6e9f47ea..603ffbb8d210 100644 --- a/sdk/security/keyvault/azkeys/tsp-location.yaml +++ b/sdk/security/keyvault/azkeys/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.Keys -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: 39b2bb6b46f241309c56ad31a88aaee910578036 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common diff --git a/sdk/security/keyvault/azkeys/version.go b/sdk/security/keyvault/azkeys/version.go index bd15147aac9b..49374159daa1 100644 --- a/sdk/security/keyvault/azkeys/version.go +++ b/sdk/security/keyvault/azkeys/version.go @@ -5,5 +5,5 @@ package azkeys const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys" - version = "v1.4.1-beta.1" + version = "v1.5.0" ) diff --git a/sdk/security/keyvault/azsecrets/CHANGELOG.md b/sdk/security/keyvault/azsecrets/CHANGELOG.md index 97b0f276b776..dbe2a022ee07 100644 --- a/sdk/security/keyvault/azsecrets/CHANGELOG.md +++ b/sdk/security/keyvault/azsecrets/CHANGELOG.md @@ -1,14 +1,18 @@ # Release History -## 1.4.1-beta.1 (Unreleased) +## 1.5.0 (Unreleased) ### Features Added +* Added `PreviousVersion` field to `Secret` and `DeletedSecret` models for certificate version tracking +* Added `OutContentType` parameter to `GetSecretOptions` for content type conversion support +* Added `ContentType` constants for PEM and PFX formats ### Breaking Changes ### Bugs Fixed ### Other Changes +* Upgraded to API service version `2025-07-01` ## 1.4.0 (2025-06-12) diff --git a/sdk/security/keyvault/azsecrets/assets.json b/sdk/security/keyvault/azsecrets/assets.json index e7740cd5700a..c07a68d12b1c 100644 --- a/sdk/security/keyvault/azsecrets/assets.json +++ b/sdk/security/keyvault/azsecrets/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/security/keyvault/azsecrets", - "Tag": "go/security/keyvault/azsecrets_36fc5040a1" + "Tag": "go/security/keyvault/azsecrets_dca7fa190b" } diff --git a/sdk/security/keyvault/azsecrets/client.go b/sdk/security/keyvault/azsecrets/client.go index 89f7d792ea37..9928699ee834 100644 --- a/sdk/security/keyvault/azsecrets/client.go +++ b/sdk/security/keyvault/azsecrets/client.go @@ -28,7 +28,7 @@ type Client struct { // This operation requires the secrets/backup permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - options - BackupSecretOptions contains the optional parameters for the Client.BackupSecret method. func (client *Client) BackupSecret(ctx context.Context, name string, options *BackupSecretOptions) (BackupSecretResponse, error) { @@ -65,7 +65,7 @@ func (client *Client) backupSecretCreateRequest(ctx context.Context, name string return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -86,7 +86,7 @@ func (client *Client) backupSecretHandleResponse(resp *http.Response) (BackupSec // of a secret. This operation requires the secrets/delete permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - options - DeleteSecretOptions contains the optional parameters for the Client.DeleteSecret method. func (client *Client) DeleteSecret(ctx context.Context, name string, options *DeleteSecretOptions) (DeleteSecretResponse, error) { @@ -123,7 +123,7 @@ func (client *Client) deleteSecretCreateRequest(ctx context.Context, name string return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -144,7 +144,7 @@ func (client *Client) deleteSecretHandleResponse(resp *http.Response) (DeleteSec // the secrets/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - options - GetDeletedSecretOptions contains the optional parameters for the Client.GetDeletedSecret method. func (client *Client) GetDeletedSecret(ctx context.Context, name string, options *GetDeletedSecretOptions) (GetDeletedSecretResponse, error) { @@ -181,7 +181,7 @@ func (client *Client) getDeletedSecretCreateRequest(ctx context.Context, name st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ func (client *Client) getDeletedSecretHandleResponse(resp *http.Response) (GetDe // The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - version - The version of the secret. This URI fragment is optional. If not specified, the latest version of the secret // is returned. @@ -229,7 +229,7 @@ func (client *Client) GetSecret(ctx context.Context, name string, version string } // getSecretCreateRequest creates the GetSecret request. -func (client *Client) getSecretCreateRequest(ctx context.Context, name string, version string, _ *GetSecretOptions) (*policy.Request, error) { +func (client *Client) getSecretCreateRequest(ctx context.Context, name string, version string, options *GetSecretOptions) (*policy.Request, error) { urlPath := "/secrets/{secret-name}/{secret-version}" if name == "" { return nil, errors.New("parameter name cannot be empty") @@ -241,7 +241,10 @@ func (client *Client) getSecretCreateRequest(ctx context.Context, name string, v return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") + if options != nil && options.OutContentType != nil { + reqQP.Set("outContentType", string(*options.OutContentType)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,7 +264,7 @@ func (client *Client) getSecretHandleResponse(resp *http.Response) (GetSecretRes // The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft-delete. This // operation requires the secrets/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListDeletedSecretPropertiesOptions contains the optional parameters for the Client.NewListDeletedSecretPropertiesPager // method. func (client *Client) NewListDeletedSecretPropertiesPager(options *ListDeletedSecretPropertiesOptions) *runtime.Pager[ListDeletedSecretPropertiesResponse] { @@ -295,7 +298,7 @@ func (client *Client) listDeletedSecretPropertiesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,7 +319,7 @@ func (client *Client) listDeletedSecretPropertiesHandleResponse(resp *http.Respo // are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list // permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - options - ListSecretPropertiesOptions contains the optional parameters for the Client.NewListSecretPropertiesPager method. func (client *Client) NewListSecretPropertiesPager(options *ListSecretPropertiesOptions) *runtime.Pager[ListSecretPropertiesResponse] { return runtime.NewPager(runtime.PagingHandler[ListSecretPropertiesResponse]{ @@ -349,7 +352,7 @@ func (client *Client) listSecretPropertiesCreateRequest(ctx context.Context, _ * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +372,7 @@ func (client *Client) listSecretPropertiesHandleResponse(resp *http.Response) (L // The full secret identifier and attributes are provided in the response. No values are returned for the secrets. This operations // requires the secrets/list permission. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - options - ListSecretPropertiesVersionsOptions contains the optional parameters for the Client.NewListSecretPropertiesVersionsPager // method. @@ -408,7 +411,7 @@ func (client *Client) listSecretPropertiesVersionsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +432,7 @@ func (client *Client) listSecretPropertiesVersionsHandleResponse(resp *http.Resp // can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - options - PurgeDeletedSecretOptions contains the optional parameters for the Client.PurgeDeletedSecret method. func (client *Client) PurgeDeletedSecret(ctx context.Context, name string, options *PurgeDeletedSecretOptions) (PurgeDeletedSecretResponse, error) { @@ -465,7 +468,7 @@ func (client *Client) purgeDeletedSecretCreateRequest(ctx context.Context, name return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() return req, nil } @@ -476,7 +479,7 @@ func (client *Client) purgeDeletedSecretCreateRequest(ctx context.Context, name // This operation requires the secrets/recover permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the deleted secret. // - options - RecoverDeletedSecretOptions contains the optional parameters for the Client.RecoverDeletedSecret method. func (client *Client) RecoverDeletedSecret(ctx context.Context, name string, options *RecoverDeletedSecretOptions) (RecoverDeletedSecretResponse, error) { @@ -513,7 +516,7 @@ func (client *Client) recoverDeletedSecretCreateRequest(ctx context.Context, nam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -533,7 +536,7 @@ func (client *Client) recoverDeletedSecretHandleResponse(resp *http.Response) (R // Restores a backed up secret, and all its versions, to a vault. This operation requires the secrets/restore permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - parameters - The parameters to restore the secret. // - options - RestoreSecretOptions contains the optional parameters for the Client.RestoreSecret method. func (client *Client) RestoreSecret(ctx context.Context, parameters RestoreSecretParameters, options *RestoreSecretOptions) (RestoreSecretResponse, error) { @@ -566,7 +569,7 @@ func (client *Client) restoreSecretCreateRequest(ctx context.Context, parameters return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -591,7 +594,7 @@ func (client *Client) restoreSecretHandleResponse(resp *http.Response) (RestoreS // version of that secret. This operation requires the secrets/set permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. The value you provide may be copied globally for the purpose of running the service. The // value provided should not include personally identifiable or sensitive information. // - parameters - The parameters for setting the secret. @@ -630,7 +633,7 @@ func (client *Client) setSecretCreateRequest(ctx context.Context, name string, p return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -655,7 +658,7 @@ func (client *Client) setSecretHandleResponse(resp *http.Response) (SetSecretRes // request are left unchanged. The value of a secret itself cannot be changed. This operation requires the secrets/set permission. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 7.6 +// Generated from API version 2025-07-01 // - name - The name of the secret. // - version - The version of the secret. // - parameters - The parameters for update secret operation. @@ -695,7 +698,7 @@ func (client *Client) updateSecretPropertiesCreateRequest(ctx context.Context, n return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "7.6") + reqQP.Set("api-version", "2025-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/security/keyvault/azsecrets/client_test.go b/sdk/security/keyvault/azsecrets/client_test.go index 77dbc0c1dfde..ccf58d62c878 100644 --- a/sdk/security/keyvault/azsecrets/client_test.go +++ b/sdk/security/keyvault/azsecrets/client_test.go @@ -5,6 +5,7 @@ package azsecrets_test import ( "context" + "encoding/json" "fmt" "net/http" "strings" @@ -383,7 +384,7 @@ func TestRecover(t *testing.T) { } func TestAPIVersion(t *testing.T) { - apiVersion := "7.3" + apiVersion := "2025-07-01" var requireVersion = func(req *http.Request) bool { version := req.URL.Query().Get("api-version") require.Equal(t, version, apiVersion) @@ -409,3 +410,38 @@ func TestAPIVersion(t *testing.T) { _, err = client.GetSecret(context.Background(), "name", "", nil) require.NoError(t, err) } + +func TestPreviousVersion(t *testing.T) { + tests := []struct { + name string + jsonBody string + expected *string + }{ + {name: "no previousVersion", jsonBody: `{"kid":"https://vault/secret/secret-name"}`, expected: nil}, + {name: "with previousVersion", jsonBody: `{"kid":"https://vault/secret/secret-name","previousVersion":"dummyVersion"}`, expected: to.Ptr("dummyVersion")}, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var s azsecrets.Secret + err := json.Unmarshal([]byte(tc.jsonBody), &s) + require.NoError(t, err) + if tc.expected == nil { + require.Nil(t, s.PreviousVersion) + } else { + require.NotNil(t, s.PreviousVersion) + require.Equal(t, *tc.expected, *s.PreviousVersion) + } + + var ds azsecrets.DeletedSecret + err = json.Unmarshal([]byte(tc.jsonBody), &ds) + require.NoError(t, err) + if tc.expected == nil { + require.Nil(t, ds.PreviousVersion) + } else { + require.NotNil(t, ds.PreviousVersion) + require.Equal(t, *tc.expected, *ds.PreviousVersion) + } + }) + } +} diff --git a/sdk/security/keyvault/azsecrets/constants.go b/sdk/security/keyvault/azsecrets/constants.go new file mode 100644 index 000000000000..1ac14d313183 --- /dev/null +++ b/sdk/security/keyvault/azsecrets/constants.go @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package azsecrets + +// ContentType - The media type (MIME type). +type ContentType string + +const ( + // ContentTypePEM - The PEM file format. + ContentTypePEM ContentType = "application/x-pem-file" + // ContentTypePFX - The PKCS#12 file format. + ContentTypePFX ContentType = "application/x-pkcs12" +) + +// PossibleContentTypeValues returns the possible values for the ContentType const type. +func PossibleContentTypeValues() []ContentType { + return []ContentType{ + ContentTypePEM, + ContentTypePFX, + } +} diff --git a/sdk/security/keyvault/azsecrets/fake/internal.go b/sdk/security/keyvault/azsecrets/fake/internal.go index 7425b6a669e2..d768e4760998 100644 --- a/sdk/security/keyvault/azsecrets/fake/internal.go +++ b/sdk/security/keyvault/azsecrets/fake/internal.go @@ -7,6 +7,7 @@ package fake import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "net/http" + "reflect" "sync" ) @@ -32,6 +33,13 @@ func contains[T comparable](s []T, v T) bool { return false } +func getOptional[T any](v T) *T { + if reflect.ValueOf(v).IsZero() { + return nil + } + return &v +} + func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, diff --git a/sdk/security/keyvault/azsecrets/fake/server.go b/sdk/security/keyvault/azsecrets/fake/server.go index c9fb7cb96c9c..0f8530ae7458 100644 --- a/sdk/security/keyvault/azsecrets/fake/server.go +++ b/sdk/security/keyvault/azsecrets/fake/server.go @@ -253,6 +253,7 @@ func (s *ServerTransport) dispatchGetSecret(req *http.Request) (*http.Response, if len(matches) < 3 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } + qp := req.URL.Query() nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("secret_name")]) if err != nil { return nil, err @@ -261,7 +262,18 @@ func (s *ServerTransport) dispatchGetSecret(req *http.Request) (*http.Response, if err != nil { return nil, err } - respr, errRespr := s.srv.GetSecret(req.Context(), nameParam, versionParam, nil) + outContentTypeUnescaped, err := url.QueryUnescape(qp.Get("outContentType")) + if err != nil { + return nil, err + } + outContentTypeParam := getOptional(azsecrets.ContentType(outContentTypeUnescaped)) + var options *azsecrets.GetSecretOptions + if outContentTypeParam != nil { + options = &azsecrets.GetSecretOptions{ + OutContentType: outContentTypeParam, + } + } + respr, errRespr := s.srv.GetSecret(req.Context(), nameParam, versionParam, options) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } diff --git a/sdk/security/keyvault/azsecrets/models.go b/sdk/security/keyvault/azsecrets/models.go index f6474eebbf4e..ff9cfd168162 100644 --- a/sdk/security/keyvault/azsecrets/models.go +++ b/sdk/security/keyvault/azsecrets/models.go @@ -24,6 +24,10 @@ type DeletedSecret struct { // The secret id. ID *ID + // The version of the previous certificate, if applicable. Applies only to certificates created after June 1, 2025. Certificates + // created before this date are not retroactively updated. + PreviousVersion *string + // The url of the recovery object, used to identify and recover the deleted secret. RecoveryID *string @@ -103,6 +107,10 @@ type Secret struct { // The secret id. ID *ID + // The version of the previous certificate, if applicable. Applies only to certificates created after June 1, 2025. Certificates + // created before this date are not retroactively updated. + PreviousVersion *string + // Application specific metadata in the form of key-value pairs. Tags map[string]*string diff --git a/sdk/security/keyvault/azsecrets/models_serde.go b/sdk/security/keyvault/azsecrets/models_serde.go index e62c48357f92..7fe6d5349f4b 100644 --- a/sdk/security/keyvault/azsecrets/models_serde.go +++ b/sdk/security/keyvault/azsecrets/models_serde.go @@ -52,6 +52,7 @@ func (d DeletedSecret) MarshalJSON() ([]byte, error) { populate(objectMap, "id", d.ID) populate(objectMap, "kid", d.KID) populate(objectMap, "managed", d.Managed) + populate(objectMap, "previousVersion", d.PreviousVersion) populate(objectMap, "recoveryId", d.RecoveryID) populateTimeUnix(objectMap, "scheduledPurgeDate", d.ScheduledPurgeDate) populate(objectMap, "tags", d.Tags) @@ -86,6 +87,9 @@ func (d *DeletedSecret) UnmarshalJSON(data []byte) error { case "managed": err = unpopulate(val, "Managed", &d.Managed) delete(rawMsg, key) + case "previousVersion": + err = unpopulate(val, "PreviousVersion", &d.PreviousVersion) + delete(rawMsg, key) case "recoveryId": err = unpopulate(val, "RecoveryID", &d.RecoveryID) delete(rawMsg, key) @@ -231,6 +235,7 @@ func (s Secret) MarshalJSON() ([]byte, error) { populate(objectMap, "id", s.ID) populate(objectMap, "kid", s.KID) populate(objectMap, "managed", s.Managed) + populate(objectMap, "previousVersion", s.PreviousVersion) populate(objectMap, "tags", s.Tags) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -260,6 +265,9 @@ func (s *Secret) UnmarshalJSON(data []byte) error { case "managed": err = unpopulate(val, "Managed", &s.Managed) delete(rawMsg, key) + case "previousVersion": + err = unpopulate(val, "PreviousVersion", &s.PreviousVersion) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &s.Tags) delete(rawMsg, key) diff --git a/sdk/security/keyvault/azsecrets/options.go b/sdk/security/keyvault/azsecrets/options.go index f97b83ec5305..a82512146409 100644 --- a/sdk/security/keyvault/azsecrets/options.go +++ b/sdk/security/keyvault/azsecrets/options.go @@ -21,7 +21,10 @@ type GetDeletedSecretOptions struct { // GetSecretOptions contains the optional parameters for the Client.GetSecret method. type GetSecretOptions struct { - // placeholder for future optional parameters + // The media type (MIME type) of the certificate. If a supported format is specified, the certificate content is converted + // to the requested format. Currently, only PFX to PEM conversion is supported. If an unsupported format is specified, the + // request is rejected. If not specified, the certificate is returned in its original format without conversion. + OutContentType *ContentType } // ListDeletedSecretPropertiesOptions contains the optional parameters for the Client.NewListDeletedSecretPropertiesPager diff --git a/sdk/security/keyvault/azsecrets/testdata/_metadata.json b/sdk/security/keyvault/azsecrets/testdata/_metadata.json index 7826d4cbc7ae..2df4d87535b7 100644 --- a/sdk/security/keyvault/azsecrets/testdata/_metadata.json +++ b/sdk/security/keyvault/azsecrets/testdata/_metadata.json @@ -1,4 +1,4 @@ { - "apiVersion": "7.6", + "apiVersion": "2025-07-01", "emitterVersion": "0.8.2" } \ No newline at end of file diff --git a/sdk/security/keyvault/azsecrets/tsp-location.yaml b/sdk/security/keyvault/azsecrets/tsp-location.yaml index 5b1de3571e16..83210536612b 100644 --- a/sdk/security/keyvault/azsecrets/tsp-location.yaml +++ b/sdk/security/keyvault/azsecrets/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/keyvault/Security.KeyVault.Secrets -commit: 5972de983d771213d53b3e5908dbe992191890ef +commit: 39b2bb6b46f241309c56ad31a88aaee910578036 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/keyvault/Security.KeyVault.Common/ diff --git a/sdk/security/keyvault/azsecrets/version.go b/sdk/security/keyvault/azsecrets/version.go index 9ae2fcbc203c..c8749b6c6a57 100644 --- a/sdk/security/keyvault/azsecrets/version.go +++ b/sdk/security/keyvault/azsecrets/version.go @@ -5,5 +5,5 @@ package azsecrets const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets" - version = "v1.4.1-beta.1" + version = "v1.5.0" )