From a837515fc965574402cd6532678aba04adb424f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:52:52 +0000 Subject: [PATCH] chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault Bumps [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault](https://github.com/Azure/azure-sdk-for-go) from 1.2.0 to 1.3.0. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v1.2...sdk/azcore/v1.3.0) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../keyvault/armkeyvault/CHANGELOG.md | 12 + .../keyvault/armkeyvault/assets.json | 2 +- .../keyvault/armkeyvault/autorest.md | 8 +- .../keyvault/armkeyvault/build.go | 2 +- .../keyvault/armkeyvault/client_factory.go | 39 +- .../keyvault/armkeyvault/constants.go | 49 +- .../keyvault/armkeyvault/keys_client.go | 61 +- .../armkeyvault/managedhsmkeys_client.go | 61 +- .../armkeyvault/managedhsms_client.go | 151 ++- .../mhsmprivateendpointconnections_client.go | 67 +- .../mhsmprivatelinkresources_client.go | 18 +- .../armkeyvault/mhsmregions_client.go | 7 +- .../keyvault/armkeyvault/models.go | 1086 ++++++----------- .../keyvault/armkeyvault/models_serde.go | 280 ++--- .../keyvault/armkeyvault/operations_client.go | 7 +- .../keyvault/armkeyvault/options.go | 283 +++++ .../privateendpointconnections_client.go | 67 +- .../privatelinkresources_client.go | 18 +- .../keyvault/armkeyvault/response_types.go | 49 +- .../keyvault/armkeyvault/secrets_client.go | 62 +- .../keyvault/armkeyvault/time_rfc3339.go | 3 +- .../keyvault/armkeyvault/time_unix.go | 3 +- .../keyvault/armkeyvault/vaults_client.go | 162 ++- vendor/modules.txt | 2 +- 26 files changed, 1280 insertions(+), 1225 deletions(-) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go diff --git a/go.mod b/go.mod index 5ec7e9928..dd3e5920b 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armcontainerregistry v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1 diff --git a/go.sum b/go.sum index 2418efada..b035e6844 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armconta github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.4.0 h1:GYbAJIzQQBmtCx19HQur/hBT8YZxx8l6kyxcQFYMXHc= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.4.0/go.mod h1:su7G1Z0RoXhEJB4P35m34hDFNMEGik0sAUETEUuBeUA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 h1:8d4U82r7ItT1Es91x3eUcAQweih36KWvUha8AZ9X0Rs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0/go.mod h1:/1bkGperHinQbAHMWivoec/Ucu6//iXo6jn5mhmqCVU= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.3.0 h1:VGF4kkQEkeHq0Bp5bHDTMUiQHJRvjmdA6wjn1o2rh+s= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.3.0/go.mod h1:dE6+LTtOjte8Re4RvTi/qQcr+M5HtFAzcR8U08OeHAo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.2.0 h1:iGj7n4SmssnseLryJRs/0lb4Db129ioYOCPSPC+vEsw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.2.0/go.mod h1:qeBrdANBgW4QsU1bF5/9qjrPRwFIt+AnOMxyH5Bwkhk= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md index f9cd65aaa..b0776fae4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 1.3.0 (2023-10-27) +### Features Added + +- New value `ManagedHsmSKUNameCustomB6` added to enum type `ManagedHsmSKUName` +- New enum type `ManagedServiceIdentityType` with values `ManagedServiceIdentityTypeNone`, `ManagedServiceIdentityTypeSystemAssigned`, `ManagedServiceIdentityTypeSystemAssignedUserAssigned`, `ManagedServiceIdentityTypeUserAssigned` +- New struct `ManagedServiceIdentity` +- New struct `UserAssignedIdentity` +- New field `Identity` in struct `MHSMPrivateEndpointConnection` +- New field `Identity` in struct `MHSMPrivateLinkResource` +- New field `Identity` in struct `ManagedHsm` + + ## 1.2.0 (2023-04-28) ### Features Added diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json index 9ae804c30..0849394ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/keyvault/armkeyvault", - "Tag": "go/resourcemanager/keyvault/armkeyvault_283c3f03b2" + "Tag": "go/resourcemanager/keyvault/armkeyvault_5d94ebc7b4" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md index 4692f2f56..15e504d5c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/autorest.md @@ -5,11 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1f22d4dbd99b0fe347ad79e79d4eb1ed44a87291/specification/keyvault/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/keyvault/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/9ec0fcc278aa2128c4fbb2b8a1aa93432d72cce0/specification/keyvault/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.2.0 +module-version: 1.3.0 modelerfour: seal-single-value-enum-by-default: true -tag: package-2023-02 +tag: package-2023-07 ``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go index c3da538ed..ef03d7674 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/keyvault/armkeyvault +//go:generate pwsh ../../../../eng/scripts/build.ps1 -skipBuild -cleanGenerated -format -tidy -generate -removeUnreferencedTypes resourcemanager/keyvault/armkeyvault package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go index ff61f9101..d5f33c14a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/client_factory.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -44,23 +43,23 @@ func (c *ClientFactory) NewKeysClient() *KeysClient { return subClient } -func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { - subClient, _ := NewManagedHsmKeysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { + subClient, _ := NewMHSMPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVaultsClient() *VaultsClient { - subClient, _ := NewVaultsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { + subClient, _ := NewMHSMPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { + subClient, _ := NewMHSMRegionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagedHsmKeysClient() *ManagedHsmKeysClient { + subClient, _ := NewManagedHsmKeysClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -69,27 +68,27 @@ func (c *ClientFactory) NewManagedHsmsClient() *ManagedHsmsClient { return subClient } -func (c *ClientFactory) NewMHSMPrivateEndpointConnectionsClient() *MHSMPrivateEndpointConnectionsClient { - subClient, _ := NewMHSMPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewMHSMPrivateLinkResourcesClient() *MHSMPrivateLinkResourcesClient { - subClient, _ := NewMHSMPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewMHSMRegionsClient() *MHSMRegionsClient { - subClient, _ := NewMHSMRegionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewSecretsClient() *SecretsClient { + subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSecretsClient() *SecretsClient { - subClient, _ := NewSecretsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVaultsClient() *VaultsClient { + subClient, _ := NewVaultsClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go index d6415ed56..92c123908 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/constants.go @@ -3,31 +3,30 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault const ( moduleName = "armkeyvault" - moduleVersion = "v1.2.0" + moduleVersion = "v1.3.0" ) type AccessPolicyUpdateKind string const ( AccessPolicyUpdateKindAdd AccessPolicyUpdateKind = "add" - AccessPolicyUpdateKindReplace AccessPolicyUpdateKind = "replace" AccessPolicyUpdateKindRemove AccessPolicyUpdateKind = "remove" + AccessPolicyUpdateKindReplace AccessPolicyUpdateKind = "replace" ) // PossibleAccessPolicyUpdateKindValues returns the possible values for the AccessPolicyUpdateKind const type. func PossibleAccessPolicyUpdateKindValues() []AccessPolicyUpdateKind { return []AccessPolicyUpdateKind{ AccessPolicyUpdateKindAdd, - AccessPolicyUpdateKindReplace, AccessPolicyUpdateKindRemove, + AccessPolicyUpdateKindReplace, } } @@ -118,15 +117,15 @@ func PossibleCertificatePermissionsValues() []CertificatePermissions { type CreateMode string const ( - CreateModeRecover CreateMode = "recover" CreateModeDefault CreateMode = "default" + CreateModeRecover CreateMode = "recover" ) // PossibleCreateModeValues returns the possible values for the CreateMode const type. func PossibleCreateModeValues() []CreateMode { return []CreateMode{ - CreateModeRecover, CreateModeDefault, + CreateModeRecover, } } @@ -321,15 +320,15 @@ func PossibleKeyPermissionsValues() []KeyPermissions { type KeyRotationPolicyActionType string const ( - KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" KeyRotationPolicyActionTypeNotify KeyRotationPolicyActionType = "notify" + KeyRotationPolicyActionTypeRotate KeyRotationPolicyActionType = "rotate" ) // PossibleKeyRotationPolicyActionTypeValues returns the possible values for the KeyRotationPolicyActionType const type. func PossibleKeyRotationPolicyActionTypeValues() []KeyRotationPolicyActionType { return []KeyRotationPolicyActionType{ - KeyRotationPolicyActionTypeRotate, KeyRotationPolicyActionTypeNotify, + KeyRotationPolicyActionTypeRotate, } } @@ -351,15 +350,37 @@ func PossibleManagedHsmSKUFamilyValues() []ManagedHsmSKUFamily { type ManagedHsmSKUName string const ( - ManagedHsmSKUNameStandardB1 ManagedHsmSKUName = "Standard_B1" ManagedHsmSKUNameCustomB32 ManagedHsmSKUName = "Custom_B32" + ManagedHsmSKUNameCustomB6 ManagedHsmSKUName = "Custom_B6" + ManagedHsmSKUNameStandardB1 ManagedHsmSKUName = "Standard_B1" ) // PossibleManagedHsmSKUNameValues returns the possible values for the ManagedHsmSKUName const type. func PossibleManagedHsmSKUNameValues() []ManagedHsmSKUName { return []ManagedHsmSKUName{ - ManagedHsmSKUNameStandardB1, ManagedHsmSKUNameCustomB32, + ManagedHsmSKUNameCustomB6, + ManagedHsmSKUNameStandardB1, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, } } @@ -477,7 +498,7 @@ func PossibleProvisioningStateValues() []ProvisioningState { } } -// PublicNetworkAccess - Control permission for data plane traffic coming from public networks while private endpoint is enabled. +// PublicNetworkAccess - Control permission to the managed HSM from public networks. type PublicNetworkAccess string const ( @@ -527,15 +548,15 @@ func PossibleSKUFamilyValues() []SKUFamily { type SKUName string const ( - SKUNameStandard SKUName = "standard" SKUNamePremium SKUName = "premium" + SKUNameStandard SKUName = "standard" ) // PossibleSKUNameValues returns the possible values for the SKUName const type. func PossibleSKUNameValues() []SKUName { return []SKUName{ - SKUNameStandard, SKUNamePremium, + SKUNameStandard, } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go index bd55b5b7c..da53437de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/keys_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -50,7 +49,7 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the key vault which contains the key to be created. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -59,18 +58,21 @@ func NewKeysClient(subscriptionID string, credential azcore.TokenCredential, opt // - parameters - The parameters used to create the specified key. // - options - KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. func (client *KeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, vaultName string, keyName string, parameters KeyCreateParameters, options *KeysClientCreateIfNotExistOptions) (KeysClientCreateIfNotExistResponse, error) { + var err error req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, vaultName, keyName, parameters, options) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientCreateIfNotExistResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientCreateIfNotExistResponse{}, err } - return client.createIfNotExistHandleResponse(resp) + resp, err := client.createIfNotExistHandleResponse(httpResp) + return resp, err } // createIfNotExistCreateRequest creates the CreateIfNotExist request. @@ -97,10 +99,13 @@ func (client *KeysClient) createIfNotExistCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createIfNotExistHandleResponse handles the CreateIfNotExist response. @@ -115,24 +120,27 @@ func (client *KeysClient) createIfNotExistHandleResponse(resp *http.Response) (K // Get - Gets the current version of the specified key from the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key to be retrieved. // - keyName - The name of the key to be retrieved. // - options - KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. func (client *KeysClient) Get(ctx context.Context, resourceGroupName string, vaultName string, keyName string, options *KeysClientGetOptions) (KeysClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, keyName, options) if err != nil { return KeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -159,7 +167,7 @@ func (client *KeysClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,25 +185,28 @@ func (client *KeysClient) getHandleResponse(resp *http.Response) (KeysClientGetR // GetVersion - Gets the specified version of the specified key in the specified key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key version to be retrieved. // - keyName - The name of the key version to be retrieved. // - keyVersion - The version of the key to be retrieved. // - options - KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. func (client *KeysClient) GetVersion(ctx context.Context, resourceGroupName string, vaultName string, keyName string, keyVersion string, options *KeysClientGetVersionOptions) (KeysClientGetVersionResponse, error) { + var err error req, err := client.getVersionCreateRequest(ctx, resourceGroupName, vaultName, keyName, keyVersion, options) if err != nil { return KeysClientGetVersionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KeysClientGetVersionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KeysClientGetVersionResponse{}, err } - return client.getVersionHandleResponse(resp) + resp, err := client.getVersionHandleResponse(httpResp) + return resp, err } // getVersionCreateRequest creates the GetVersion request. @@ -226,7 +237,7 @@ func (client *KeysClient) getVersionCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +254,7 @@ func (client *KeysClient) getVersionHandleResponse(resp *http.Response) (KeysCli // NewListPager - Lists the keys in the specified key vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the keys to be retrieved. // - options - KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. @@ -295,7 +306,7 @@ func (client *KeysClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -312,7 +323,7 @@ func (client *KeysClient) listHandleResponse(resp *http.Response) (KeysClientLis // NewListVersionsPager - Lists the versions of the specified key in the specified key vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group which contains the specified key vault. // - vaultName - The name of the vault which contains the key versions to be retrieved. // - keyName - The name of the key versions to be retrieved. @@ -369,7 +380,7 @@ func (client *KeysClient) listVersionsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go index 3288eefd3..98769a577 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsmkeys_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -50,7 +49,7 @@ func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCrede // versions, and does not update existing keys. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -60,18 +59,21 @@ func NewManagedHsmKeysClient(subscriptionID string, credential azcore.TokenCrede // - options - ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist // method. func (client *ManagedHsmKeysClient) CreateIfNotExist(ctx context.Context, resourceGroupName string, name string, keyName string, parameters ManagedHsmKeyCreateParameters, options *ManagedHsmKeysClientCreateIfNotExistOptions) (ManagedHsmKeysClientCreateIfNotExistResponse, error) { + var err error req, err := client.createIfNotExistCreateRequest(ctx, resourceGroupName, name, keyName, parameters, options) if err != nil { return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientCreateIfNotExistResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientCreateIfNotExistResponse{}, err } - return client.createIfNotExistHandleResponse(resp) + resp, err := client.createIfNotExistHandleResponse(httpResp) + return resp, err } // createIfNotExistCreateRequest creates the CreateIfNotExist request. @@ -98,10 +100,13 @@ func (client *ManagedHsmKeysClient) createIfNotExistCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createIfNotExistHandleResponse handles the CreateIfNotExist response. @@ -116,7 +121,7 @@ func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Re // Get - Gets the current version of the specified key from the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -124,18 +129,21 @@ func (client *ManagedHsmKeysClient) createIfNotExistHandleResponse(resp *http.Re // information. // - options - ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. func (client *ManagedHsmKeysClient) Get(ctx context.Context, resourceGroupName string, name string, keyName string, options *ManagedHsmKeysClientGetOptions) (ManagedHsmKeysClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, keyName, options) if err != nil { return ManagedHsmKeysClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -162,7 +170,7 @@ func (client *ManagedHsmKeysClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +188,7 @@ func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (Mana // GetVersion - Gets the specified version of the specified key in the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -190,18 +198,21 @@ func (client *ManagedHsmKeysClient) getHandleResponse(resp *http.Response) (Mana // - options - ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion // method. func (client *ManagedHsmKeysClient) GetVersion(ctx context.Context, resourceGroupName string, name string, keyName string, keyVersion string, options *ManagedHsmKeysClientGetVersionOptions) (ManagedHsmKeysClientGetVersionResponse, error) { + var err error req, err := client.getVersionCreateRequest(ctx, resourceGroupName, name, keyName, keyVersion, options) if err != nil { return ManagedHsmKeysClientGetVersionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmKeysClientGetVersionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmKeysClientGetVersionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmKeysClientGetVersionResponse{}, err } - return client.getVersionHandleResponse(resp) + resp, err := client.getVersionHandleResponse(httpResp) + return resp, err } // getVersionCreateRequest creates the GetVersion request. @@ -232,7 +243,7 @@ func (client *ManagedHsmKeysClient) getVersionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +260,7 @@ func (client *ManagedHsmKeysClient) getVersionHandleResponse(resp *http.Response // NewListPager - Lists the keys in the specified managed HSM. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - options - ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. @@ -301,7 +312,7 @@ func (client *ManagedHsmKeysClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -318,7 +329,7 @@ func (client *ManagedHsmKeysClient) listHandleResponse(resp *http.Response) (Man // NewListVersionsPager - Lists the versions of the specified key in the specified managed HSM. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - name - The name of the Managed HSM Pool within the specified resource group. // - keyName - The name of the key to be created. The value you provide may be copied globally for the purpose of running the @@ -378,7 +389,7 @@ func (client *ManagedHsmKeysClient) listVersionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go index 21d87f4e5..e81314253 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/managedhsms_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -49,23 +48,26 @@ func NewManagedHsmsClient(subscriptionID string, credential azcore.TokenCredenti // CheckMhsmNameAvailability - Checks that the managed hsm name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - mhsmName - The name of the managed hsm. // - options - ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability // method. func (client *ManagedHsmsClient) CheckMhsmNameAvailability(ctx context.Context, mhsmName CheckMhsmNameAvailabilityParameters, options *ManagedHsmsClientCheckMhsmNameAvailabilityOptions) (ManagedHsmsClientCheckMhsmNameAvailabilityResponse, error) { + var err error req, err := client.checkMhsmNameAvailabilityCreateRequest(ctx, mhsmName, options) if err != nil { return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientCheckMhsmNameAvailabilityResponse{}, err } - return client.checkMhsmNameAvailabilityHandleResponse(resp) + resp, err := client.checkMhsmNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkMhsmNameAvailabilityCreateRequest creates the CheckMhsmNameAvailability request. @@ -80,10 +82,13 @@ func (client *ManagedHsmsClient) checkMhsmNameAvailabilityCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, mhsmName) + if err := runtime.MarshalAsJSON(req, mhsmName); err != nil { + return nil, err + } + return req, nil } // checkMhsmNameAvailabilityHandleResponse handles the CheckMhsmNameAvailability response. @@ -98,7 +103,7 @@ func (client *ManagedHsmsClient) checkMhsmNameAvailabilityHandleResponse(resp *h // BeginCreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - parameters - Parameters to create or update the managed HSM Pool @@ -110,7 +115,8 @@ func (client *ManagedHsmsClient) BeginCreateOrUpdate(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedHsmsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedHsmsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -119,20 +125,22 @@ func (client *ManagedHsmsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Create or update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *ManagedHsmsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -155,16 +163,19 @@ func (client *ManagedHsmsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - The name of the managed HSM Pool to delete // - options - ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. @@ -174,7 +185,8 @@ func (client *ManagedHsmsClient) BeginDelete(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedHsmsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedHsmsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -183,20 +195,22 @@ func (client *ManagedHsmsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *ManagedHsmsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -219,7 +233,7 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,23 +242,26 @@ func (client *ManagedHsmsClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - The name of the managed HSM Pool. // - options - ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. func (client *ManagedHsmsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ManagedHsmsClientGetOptions) (ManagedHsmsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ManagedHsmsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ManagedHsmsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -267,7 +284,7 @@ func (client *ManagedHsmsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -285,23 +302,26 @@ func (client *ManagedHsmsClient) getHandleResponse(resp *http.Response) (Managed // GetDeleted - Gets the specified deleted managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - name - The name of the deleted managed HSM. // - location - The location of the deleted managed HSM. // - options - ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. func (client *ManagedHsmsClient) GetDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientGetDeletedOptions) (ManagedHsmsClientGetDeletedResponse, error) { + var err error req, err := client.getDeletedCreateRequest(ctx, name, location, options) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ManagedHsmsClientGetDeletedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ManagedHsmsClientGetDeletedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedHsmsClientGetDeletedResponse{}, err } - return client.getDeletedHandleResponse(resp) + resp, err := client.getDeletedHandleResponse(httpResp) + return resp, err } // getDeletedCreateRequest creates the GetDeleted request. @@ -324,7 +344,7 @@ func (client *ManagedHsmsClient) getDeletedCreateRequest(ctx context.Context, na return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -342,7 +362,7 @@ func (client *ManagedHsmsClient) getDeletedHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - The List operation gets information about the managed HSM Pools associated with the subscription // and within the specified resource group. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - options - ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager // method. @@ -393,7 +413,7 @@ func (client *ManagedHsmsClient) listByResourceGroupCreateRequest(ctx context.Co if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -410,7 +430,7 @@ func (client *ManagedHsmsClient) listByResourceGroupHandleResponse(resp *http.Re // NewListBySubscriptionPager - The List operation gets information about the managed HSM Pools associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager // method. func (client *ManagedHsmsClient) NewListBySubscriptionPager(options *ManagedHsmsClientListBySubscriptionOptions) *runtime.Pager[ManagedHsmsClientListBySubscriptionResponse] { @@ -456,7 +476,7 @@ func (client *ManagedHsmsClient) listBySubscriptionCreateRequest(ctx context.Con if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -473,7 +493,7 @@ func (client *ManagedHsmsClient) listBySubscriptionHandleResponse(resp *http.Res // NewListDeletedPager - The List operation gets information about the deleted managed HSMs associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager // method. func (client *ManagedHsmsClient) NewListDeletedPager(options *ManagedHsmsClientListDeletedOptions) *runtime.Pager[ManagedHsmsClientListDeletedResponse] { @@ -516,7 +536,7 @@ func (client *ManagedHsmsClient) listDeletedCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,7 +554,7 @@ func (client *ManagedHsmsClient) listDeletedHandleResponse(resp *http.Response) // BeginPurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - name - The name of the soft-deleted managed HSM. // - location - The location of the soft-deleted managed HSM. // - options - ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted @@ -545,7 +565,8 @@ func (client *ManagedHsmsClient) BeginPurgeDeleted(ctx context.Context, name str if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedHsmsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedHsmsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -554,20 +575,22 @@ func (client *ManagedHsmsClient) BeginPurgeDeleted(ctx context.Context, name str // PurgeDeleted - Permanently deletes the specified managed HSM. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *ManagedHsmsClient) purgeDeleted(ctx context.Context, name string, location string, options *ManagedHsmsClientBeginPurgeDeletedOptions) (*http.Response, error) { + var err error req, err := client.purgeDeletedCreateRequest(ctx, name, location, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeDeletedCreateRequest creates the PurgeDeleted request. @@ -590,7 +613,7 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -599,7 +622,7 @@ func (client *ManagedHsmsClient) purgeDeletedCreateRequest(ctx context.Context, // BeginUpdate - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - parameters - Parameters to patch the managed HSM Pool @@ -610,7 +633,8 @@ func (client *ManagedHsmsClient) BeginUpdate(ctx context.Context, resourceGroupN if err != nil { return nil, err } - return runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[ManagedHsmsClientUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[ManagedHsmsClientUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -619,20 +643,22 @@ func (client *ManagedHsmsClient) BeginUpdate(ctx context.Context, resourceGroupN // Update - Update a managed HSM Pool in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *ManagedHsmsClient) update(ctx context.Context, resourceGroupName string, name string, parameters ManagedHsm, options *ManagedHsmsClientBeginUpdateOptions) (*http.Response, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, name, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // updateCreateRequest creates the Update request. @@ -655,8 +681,11 @@ func (client *ManagedHsmsClient) updateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go index b8b66a494..21550c25f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -49,7 +48,7 @@ func NewMHSMPrivateEndpointConnectionsClient(subscriptionID string, credential a // BeginDelete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. @@ -61,7 +60,8 @@ func (client *MHSMPrivateEndpointConnectionsClient) BeginDelete(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[MHSMPrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[MHSMPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *MHSMPrivateEndpointConnectionsClient) BeginDelete(ctx context.Cont // Delete - Deletes the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *MHSMPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -110,7 +112,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,25 +121,28 @@ func (client *MHSMPrivateEndpointConnectionsClient) deleteCreateRequest(ctx cont // Get - Gets the specified private endpoint connection associated with the managed HSM Pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. // - options - MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get // method. func (client *MHSMPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *MHSMPrivateEndpointConnectionsClientGetOptions) (MHSMPrivateEndpointConnectionsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -164,7 +169,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +187,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) getHandleResponse(resp *http // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // managed HSM Pool. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager @@ -235,7 +240,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +258,7 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // Put - Updates the specified private endpoint connection associated with the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - privateEndpointConnectionName - Name of the private endpoint connection associated with the managed hsm pool. @@ -261,18 +266,21 @@ func (client *MHSMPrivateEndpointConnectionsClient) listByResourceHandleResponse // - options - MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put // method. func (client *MHSMPrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, properties MHSMPrivateEndpointConnection, options *MHSMPrivateEndpointConnectionsClientPutOptions) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { + var err error req, err := client.putCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, properties, options) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateEndpointConnectionsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. @@ -299,15 +307,21 @@ func (client *MHSMPrivateEndpointConnectionsClient) putCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. func (client *MHSMPrivateEndpointConnectionsClient) putHandleResponse(resp *http.Response) (MHSMPrivateEndpointConnectionsClientPutResponse, error) { result := MHSMPrivateEndpointConnectionsClientPutResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } if val := resp.Header.Get("Retry-After"); val != "" { retryAfter32, err := strconv.ParseInt(val, 10, 32) retryAfter := int32(retryAfter32) @@ -316,9 +330,6 @@ func (client *MHSMPrivateEndpointConnectionsClient) putHandleResponse(resp *http } result.RetryAfter = &retryAfter } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } if err := runtime.UnmarshalAsJSON(resp, &result.MHSMPrivateEndpointConnection); err != nil { return MHSMPrivateEndpointConnectionsClientPutResponse{}, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go index 4bff50b0f..3370d1b05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmprivatelinkresources_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -48,24 +47,27 @@ func NewMHSMPrivateLinkResourcesClient(subscriptionID string, credential azcore. // ListByMHSMResource - Gets the private link resources supported for the managed hsm pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource // method. func (client *MHSMPrivateLinkResourcesClient) ListByMHSMResource(ctx context.Context, resourceGroupName string, name string, options *MHSMPrivateLinkResourcesClientListByMHSMResourceOptions) (MHSMPrivateLinkResourcesClientListByMHSMResourceResponse, error) { + var err error req, err := client.listByMHSMResourceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MHSMPrivateLinkResourcesClientListByMHSMResourceResponse{}, err } - return client.listByMHSMResourceHandleResponse(resp) + resp, err := client.listByMHSMResourceHandleResponse(httpResp) + return resp, err } // listByMHSMResourceCreateRequest creates the ListByMHSMResource request. @@ -88,7 +90,7 @@ func (client *MHSMPrivateLinkResourcesClient) listByMHSMResourceCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go index 64692ec10..f3f2f125c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/mhsmregions_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -47,7 +46,7 @@ func NewMHSMRegionsClient(subscriptionID string, credential azcore.TokenCredenti // NewListByResourcePager - The List operation gets information about the regions associated with the managed HSM Pool. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the managed HSM pool. // - name - Name of the managed HSM Pool // - options - MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager @@ -100,7 +99,7 @@ func (client *MHSMRegionsClient) listByResourceCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go index 27413da2a..edf63b437 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -16,1578 +15,1334 @@ import "time" type AccessPolicyEntry struct { // REQUIRED; The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. // The object ID must be unique for the list of access policies. - ObjectID *string `json:"objectId,omitempty"` + ObjectID *string // REQUIRED; Permissions the identity has for keys, secrets and certificates. - Permissions *Permissions `json:"permissions,omitempty"` + Permissions *Permissions // REQUIRED; The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // Application ID of the client making request on behalf of a principal - ApplicationID *string `json:"applicationId,omitempty"` + ApplicationID *string } type Action struct { // The type of action. - Type *KeyRotationPolicyActionType `json:"type,omitempty"` -} - -// Attributes - The object attributes managed by the KeyVault service. -type Attributes struct { - // Determines whether the object is enabled. - Enabled *bool `json:"enabled,omitempty"` - - // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *time.Time `json:"exp,omitempty"` - - // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *time.Time `json:"nbf,omitempty"` - - // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *time.Time `json:"created,omitempty" azure:"ro"` - - // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *time.Time `json:"updated,omitempty" azure:"ro"` + Type *KeyRotationPolicyActionType } // CheckMhsmNameAvailabilityParameters - The parameters used to check the availability of the managed hsm name. type CheckMhsmNameAvailabilityParameters struct { // REQUIRED; The managed hsm name. - Name *string `json:"name,omitempty"` + Name *string } // CheckMhsmNameAvailabilityResult - The CheckMhsmNameAvailability operation response. type CheckMhsmNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. // If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` + NameAvailable *bool // READ-ONLY; The reason that a managed hsm name could not be used. The reason element is only returned if NameAvailable is // false. - Reason *Reason `json:"reason,omitempty" azure:"ro"` + Reason *Reason } // CheckNameAvailabilityResult - The CheckNameAvailability operation response. type CheckNameAvailabilityResult struct { // READ-ONLY; An error message explaining the Reason value in more detail. - Message *string `json:"message,omitempty" azure:"ro"` + Message *string // READ-ONLY; A boolean value that indicates whether the name is available for you to use. If true, the name is available. // If false, the name has already been taken or is invalid and cannot be used. - NameAvailable *bool `json:"nameAvailable,omitempty" azure:"ro"` + NameAvailable *bool // READ-ONLY; The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. - Reason *Reason `json:"reason,omitempty" azure:"ro"` + Reason *Reason } type DeletedManagedHsm struct { // Properties of the deleted managed HSM - Properties *DeletedManagedHsmProperties `json:"properties,omitempty"` + Properties *DeletedManagedHsmProperties // READ-ONLY; The Azure Resource Manager resource ID for the deleted managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DeletedManagedHsmListResult - List of deleted managed HSM Pools type DeletedManagedHsmListResult struct { // The URL to get the next set of deleted managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of deleted managed HSM Pools. - Value []*DeletedManagedHsm `json:"value,omitempty"` + Value []*DeletedManagedHsm } // DeletedManagedHsmProperties - Properties of the deleted managed HSM. type DeletedManagedHsmProperties struct { // READ-ONLY; The deleted date. - DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` + DeletionDate *time.Time // READ-ONLY; The location of the original managed HSM. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; The resource id of the original managed HSM. - MhsmID *string `json:"mhsmId,omitempty" azure:"ro"` + MhsmID *string // READ-ONLY; Purge protection status of the original managed HSM. - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" azure:"ro"` + PurgeProtectionEnabled *bool // READ-ONLY; The scheduled purged date. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Tags of the original managed HSM. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string } // DeletedVault - Deleted vault information with extended details. type DeletedVault struct { // Properties of the vault - Properties *DeletedVaultProperties `json:"properties,omitempty"` + Properties *DeletedVaultProperties // READ-ONLY; The resource ID for the deleted key vault. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the key vault. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource type of the key vault. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // DeletedVaultListResult - List of vaults type DeletedVaultListResult struct { // The URL to get the next set of deleted vaults. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of deleted vaults. - Value []*DeletedVault `json:"value,omitempty"` + Value []*DeletedVault } // DeletedVaultProperties - Properties of the deleted vault. type DeletedVaultProperties struct { // READ-ONLY; The deleted date. - DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` + DeletionDate *time.Time // READ-ONLY; The location of the original vault. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Purge protection status of the original vault. - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" azure:"ro"` + PurgeProtectionEnabled *bool // READ-ONLY; The scheduled purged date. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Tags of the original vault. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; The resource id of the original vault. - VaultID *string `json:"vaultId,omitempty" azure:"ro"` + VaultID *string } // DimensionProperties - Type of operation: get, read, delete, etc. type DimensionProperties struct { // Display name of dimension. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Name of dimension. - Name *string `json:"name,omitempty"` + Name *string // Property to specify whether the dimension should be exported for Shoebox. - ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` -} - -// Error - The server error. -type Error struct { - // READ-ONLY; The error code. - Code *string `json:"code,omitempty" azure:"ro"` - - // READ-ONLY; The inner error, contains a more specific error code. - InnerError *Error `json:"innererror,omitempty" azure:"ro"` - - // READ-ONLY; The error message. - Message *string `json:"message,omitempty" azure:"ro"` + ToBeExportedForShoebox *bool } // IPRule - A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). - Value *string `json:"value,omitempty"` + Value *string } // Key - The key resource. type Key struct { // REQUIRED; The properties of the key. - Properties *KeyProperties `json:"properties,omitempty"` + Properties *KeyProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // KeyAttributes - The object attributes managed by the Azure Key Vault service. type KeyAttributes struct { // Determines whether or not the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *int64 `json:"exp,omitempty"` + Expires *int64 // Indicates if the private key can be exported. - Exportable *bool `json:"exportable,omitempty"` + Exportable *bool // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *int64 `json:"nbf,omitempty"` + NotBefore *int64 // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object // can be permanently deleted by a privileged user; otherwise, only the system can purge the // object at the end of the retention interval. - RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + RecoveryLevel *DeletionRecoveryLevel // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` + Updated *int64 } // KeyCreateParameters - The parameters used to create a key. type KeyCreateParameters struct { // REQUIRED; The properties of the key to be created. - Properties *KeyProperties `json:"properties,omitempty"` + Properties *KeyProperties // The tags that will be assigned to the key. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // KeyListResult - The page of keys. type KeyListResult struct { // The URL to get the next page of keys. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The key resources. - Value []*Key `json:"value,omitempty"` + Value []*Key } // KeyProperties - The properties of the key. type KeyProperties struct { // The attributes of the key. - Attributes *KeyAttributes `json:"attributes,omitempty"` + Attributes *KeyAttributes // The elliptic curve name. For valid values, see JsonWebKeyCurveName. - CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` - KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + CurveName *JSONWebKeyCurveName + KeyOps []*JSONWebKeyOperation // The key size in bits. For example: 2048, 3072, or 4096 for RSA. - KeySize *int32 `json:"keySize,omitempty"` + KeySize *int32 // The type of the key. For valid values, see JsonWebKeyType. - Kty *JSONWebKeyType `json:"kty,omitempty"` + Kty *JSONWebKeyType // Key release policy in response. It will be used for both output and input. Omitted if empty - ReleasePolicy *KeyReleasePolicy `json:"release_policy,omitempty"` + ReleasePolicy *KeyReleasePolicy // Key rotation policy in response. It will be used for both output and input. Omitted if empty - RotationPolicy *RotationPolicy `json:"rotationPolicy,omitempty"` + RotationPolicy *RotationPolicy // READ-ONLY; The URI to retrieve the current version of the key. - KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + KeyURI *string // READ-ONLY; The URI to retrieve the specific version of the key. - KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` + KeyURIWithVersion *string } type KeyReleasePolicy struct { // Content type and version of key release policy - ContentType *string `json:"contentType,omitempty"` + ContentType *string // Blob encoding the policy rules under which the key can be released. - Data []byte `json:"data,omitempty"` + Data []byte } type KeyRotationPolicyAttributes struct { // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. - ExpiryTime *string `json:"expiryTime,omitempty"` + ExpiryTime *string // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` -} - -// KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. -type KeysClientCreateIfNotExistOptions struct { - // placeholder for future optional parameters -} - -// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. -type KeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. -type KeysClientGetVersionOptions struct { - // placeholder for future optional parameters -} - -// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. -type KeysClientListOptions struct { - // placeholder for future optional parameters -} - -// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. -type KeysClientListVersionsOptions struct { - // placeholder for future optional parameters + Updated *int64 } type LifetimeAction struct { // The action of key rotation policy lifetimeAction. - Action *Action `json:"action,omitempty"` + Action *Action // The trigger of key rotation policy lifetimeAction. - Trigger *Trigger `json:"trigger,omitempty"` + Trigger *Trigger } // LogSpecification - Log specification of operation. type LogSpecification struct { // Blob duration of specification. - BlobDuration *string `json:"blobDuration,omitempty"` + BlobDuration *string // Display name of log specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Name of log specification. - Name *string `json:"name,omitempty"` + Name *string } // MHSMGeoReplicatedRegion - A region that this managed HSM Pool has been extended to. type MHSMGeoReplicatedRegion struct { // A boolean value that indicates whether the region is the primary region or a secondary region. - IsPrimary *bool `json:"isPrimary,omitempty"` + IsPrimary *bool // Name of the geo replicated region. - Name *string `json:"name,omitempty"` + Name *string // READ-ONLY; Provisioning state of the geo replicated region. - ProvisioningState *GeoReplicationRegionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *GeoReplicationRegionProvisioningState } // MHSMIPRule - A rule governing the accessibility of a managed HSM pool from a specific IP address or IP range. type MHSMIPRule struct { // REQUIRED; An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses // that start with 124.56.78). - Value *string `json:"value,omitempty"` + Value *string } // MHSMNetworkRuleSet - A set of rules governing the network accessibility of a managed hsm pool. type MHSMNetworkRuleSet struct { // Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. - Bypass *NetworkRuleBypassOptions `json:"bypass,omitempty"` + Bypass *NetworkRuleBypassOptions // The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property // has been evaluated. - DefaultAction *NetworkRuleAction `json:"defaultAction,omitempty"` + DefaultAction *NetworkRuleAction // The list of IP address rules. - IPRules []*MHSMIPRule `json:"ipRules,omitempty"` + IPRules []*MHSMIPRule // The list of virtual network rules. - VirtualNetworkRules []*MHSMVirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + VirtualNetworkRules []*MHSMVirtualNetworkRule } // MHSMPrivateEndpoint - Private endpoint object properties. type MHSMPrivateEndpoint struct { // READ-ONLY; Full identifier of the private endpoint resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // MHSMPrivateEndpointConnection - Private endpoint connection resource. type MHSMPrivateEndpointConnection struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Resource properties. - Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *MHSMPrivateEndpointConnectionProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MHSMPrivateEndpointConnectionItem - Private endpoint connection item. type MHSMPrivateEndpointConnectionItem struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Id of private endpoint connection. - ID *string `json:"id,omitempty"` + ID *string // Private endpoint connection properties. - Properties *MHSMPrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *MHSMPrivateEndpointConnectionProperties } // MHSMPrivateEndpointConnectionProperties - Properties of the private endpoint connection resource. type MHSMPrivateEndpointConnectionProperties struct { // Properties of the private endpoint object. - PrivateEndpoint *MHSMPrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *MHSMPrivateEndpoint // Approval state of the private link connection. - PrivateLinkServiceConnectionState *MHSMPrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *MHSMPrivateLinkServiceConnectionState // Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} - -// MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete -// method. -type MHSMPrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get -// method. -type MHSMPrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager -// method. -type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { - // placeholder for future optional parameters -} - -// MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put -// method. -type MHSMPrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters + ProvisioningState *PrivateEndpointConnectionProvisioningState } // MHSMPrivateEndpointConnectionsListResult - List of private endpoint connections associated with a managed HSM Pools type MHSMPrivateEndpointConnectionsListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The private endpoint connection associated with a managed HSM Pools. - Value []*MHSMPrivateEndpointConnection `json:"value,omitempty"` + Value []*MHSMPrivateEndpointConnection } // MHSMPrivateLinkResource - A private link resource type MHSMPrivateLinkResource struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Resource properties. - Properties *MHSMPrivateLinkResourceProperties `json:"properties,omitempty"` + Properties *MHSMPrivateLinkResourceProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // MHSMPrivateLinkResourceListResult - A list of private link resources type MHSMPrivateLinkResourceListResult struct { // Array of private link resources - Value []*MHSMPrivateLinkResource `json:"value,omitempty"` + Value []*MHSMPrivateLinkResource } // MHSMPrivateLinkResourceProperties - Properties of a private link resource. type MHSMPrivateLinkResourceProperties struct { // Required DNS zone names of the the private link resource. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string // READ-ONLY; Group identifier of private link resource. - GroupID *string `json:"groupId,omitempty" azure:"ro"` + GroupID *string // READ-ONLY; Required member names of private link resource. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource -// method. -type MHSMPrivateLinkResourcesClientListByMHSMResourceOptions struct { - // placeholder for future optional parameters + RequiredMembers []*string } // MHSMPrivateLinkServiceConnectionState - An object that represents the approval state of the private link connection. type MHSMPrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *ActionsRequired `json:"actionsRequired,omitempty"` + ActionsRequired *ActionsRequired // The reason for approval or rejection. - Description *string `json:"description,omitempty"` + Description *string // Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} - -// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager -// method. -type MHSMRegionsClientListByResourceOptions struct { - // placeholder for future optional parameters + Status *PrivateEndpointServiceConnectionStatus } // MHSMRegionsListResult - List of regions associated with a managed HSM Pools type MHSMRegionsListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The region associated with a managed HSM Pools. - Value []*MHSMGeoReplicatedRegion `json:"value,omitempty"` + Value []*MHSMGeoReplicatedRegion } // MHSMVirtualNetworkRule - A rule governing the accessibility of a managed hsm pool from a specific virtual network. type MHSMVirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. - ID *string `json:"id,omitempty"` + ID *string } // ManagedHSMSecurityDomainProperties - The security domain properties of the managed hsm. type ManagedHSMSecurityDomainProperties struct { // READ-ONLY; Activation Status - ActivationStatus *ActivationStatus `json:"activationStatus,omitempty" azure:"ro"` + ActivationStatus *ActivationStatus // READ-ONLY; Activation Status Message. - ActivationStatusMessage *string `json:"activationStatusMessage,omitempty" azure:"ro"` + ActivationStatusMessage *string } // ManagedHsm - Resource information with extended details. type ManagedHsm struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity + // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` + Location *string // Properties of the managed HSM - Properties *ManagedHsmProperties `json:"properties,omitempty"` + Properties *ManagedHsmProperties // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` + SKU *ManagedHsmSKU // Resource tags - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } type ManagedHsmAction struct { // The type of action. - Type *KeyRotationPolicyActionType `json:"type,omitempty"` -} - -// ManagedHsmError - The error exception. -type ManagedHsmError struct { - // READ-ONLY; The server error. - Error *Error `json:"error,omitempty" azure:"ro"` + Type *KeyRotationPolicyActionType } // ManagedHsmKey - The key resource. type ManagedHsmKey struct { // REQUIRED; The properties of the key. - Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + Properties *ManagedHsmKeyProperties // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ManagedHsmKeyAttributes - The object attributes managed by the Azure Key Vault service. type ManagedHsmKeyAttributes struct { // Determines whether or not the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *int64 `json:"exp,omitempty"` + Expires *int64 // Indicates if the private key can be exported. - Exportable *bool `json:"exportable,omitempty"` + Exportable *bool // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *int64 `json:"nbf,omitempty"` + NotBefore *int64 // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object // can be permanently deleted by a privileged user; otherwise, only the system can purge the // object at the end of the retention interval. - RecoveryLevel *DeletionRecoveryLevel `json:"recoveryLevel,omitempty" azure:"ro"` + RecoveryLevel *DeletionRecoveryLevel // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` + Updated *int64 } // ManagedHsmKeyCreateParameters - The parameters used to create a key. type ManagedHsmKeyCreateParameters struct { // REQUIRED; The properties of the key to be created. - Properties *ManagedHsmKeyProperties `json:"properties,omitempty"` + Properties *ManagedHsmKeyProperties // The tags that will be assigned to the key. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // ManagedHsmKeyListResult - The page of keys. type ManagedHsmKeyListResult struct { // The URL to get the next page of keys. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The key resources. - Value []*ManagedHsmKey `json:"value,omitempty"` + Value []*ManagedHsmKey } // ManagedHsmKeyProperties - The properties of the key. type ManagedHsmKeyProperties struct { // The attributes of the key. - Attributes *ManagedHsmKeyAttributes `json:"attributes,omitempty"` + Attributes *ManagedHsmKeyAttributes // The elliptic curve name. For valid values, see JsonWebKeyCurveName. - CurveName *JSONWebKeyCurveName `json:"curveName,omitempty"` - KeyOps []*JSONWebKeyOperation `json:"keyOps,omitempty"` + CurveName *JSONWebKeyCurveName + KeyOps []*JSONWebKeyOperation // The key size in bits. For example: 2048, 3072, or 4096 for RSA. - KeySize *int32 `json:"keySize,omitempty"` + KeySize *int32 // The type of the key. For valid values, see JsonWebKeyType. - Kty *JSONWebKeyType `json:"kty,omitempty"` + Kty *JSONWebKeyType // Key release policy in response. It will be used for both output and input. Omitted if empty - ReleasePolicy *ManagedHsmKeyReleasePolicy `json:"release_policy,omitempty"` + ReleasePolicy *ManagedHsmKeyReleasePolicy // Key rotation policy in response. It will be used for both output and input. Omitted if empty - RotationPolicy *ManagedHsmRotationPolicy `json:"rotationPolicy,omitempty"` + RotationPolicy *ManagedHsmRotationPolicy // READ-ONLY; The URI to retrieve the current version of the key. - KeyURI *string `json:"keyUri,omitempty" azure:"ro"` + KeyURI *string // READ-ONLY; The URI to retrieve the specific version of the key. - KeyURIWithVersion *string `json:"keyUriWithVersion,omitempty" azure:"ro"` + KeyURIWithVersion *string } type ManagedHsmKeyReleasePolicy struct { // Content type and version of key release policy - ContentType *string `json:"contentType,omitempty"` + ContentType *string // Blob encoding the policy rules under which the key can be released. - Data []byte `json:"data,omitempty"` + Data []byte } type ManagedHsmKeyRotationPolicyAttributes struct { // The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. - ExpiryTime *string `json:"expiryTime,omitempty"` + ExpiryTime *string // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *int64 `json:"created,omitempty" azure:"ro"` + Created *int64 // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *int64 `json:"updated,omitempty" azure:"ro"` -} - -// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist -// method. -type ManagedHsmKeysClientCreateIfNotExistOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. -type ManagedHsmKeysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. -type ManagedHsmKeysClientGetVersionOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. -type ManagedHsmKeysClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager -// method. -type ManagedHsmKeysClientListVersionsOptions struct { - // placeholder for future optional parameters + Updated *int64 } type ManagedHsmLifetimeAction struct { // The action of key rotation policy lifetimeAction. - Action *ManagedHsmAction `json:"action,omitempty"` + Action *ManagedHsmAction // The trigger of key rotation policy lifetimeAction. - Trigger *ManagedHsmTrigger `json:"trigger,omitempty"` + Trigger *ManagedHsmTrigger } // ManagedHsmListResult - List of managed HSM Pools type ManagedHsmListResult struct { // The URL to get the next set of managed HSM Pools. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of managed HSM Pools. - Value []*ManagedHsm `json:"value,omitempty"` + Value []*ManagedHsm } // ManagedHsmProperties - Properties of the managed HSM Pool type ManagedHsmProperties struct { // The create mode to indicate whether the resource is being created or is being recovered from a deleted resource. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this managed HSM pool. Setting this property to true // activates protection against purge for this managed HSM pool and its content - - // only the Managed HSM service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete - // is also enabled. Enabling this functionality is irreversible. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + // only the Managed HSM service may initiate a hard, irrecoverable deletion. Enabling this functionality is irreversible. + EnablePurgeProtection *bool - // Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. If it's not set to any - // value(true or false) when creating new managed HSM pool, it will be set to true - // by default. Once set to true, it cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + // Property to specify whether the 'soft delete' functionality is enabled for this managed HSM pool. Soft delete is enabled + // by default for all managed HSMs and is immutable. + EnableSoftDelete *bool // Array of initial administrators object ids for this managed hsm pool. - InitialAdminObjectIDs []*string `json:"initialAdminObjectIds,omitempty"` + InitialAdminObjectIDs []*string // Rules governing the accessibility of the key vault from specific network locations. - NetworkACLs *MHSMNetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *MHSMNetworkRuleSet - // Control permission for data plane traffic coming from public networks while private endpoint is enabled. - PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // Control permission to the managed HSM from public networks. + PublicNetworkAccess *PublicNetworkAccess // List of all regions associated with the managed hsm pool. - Regions []*MHSMGeoReplicatedRegion `json:"regions,omitempty"` + Regions []*MHSMGeoReplicatedRegion - // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + // Soft deleted data retention days. When you delete an HSM or a key, it will remain recoverable for the configured retention + // period or for a default period of 90 days. It accepts values between 7 and + // 90. + SoftDeleteRetentionInDays *int32 // The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // READ-ONLY; The URI of the managed hsm pool for performing operations on keys. - HsmURI *string `json:"hsmUri,omitempty" azure:"ro"` + HsmURI *string // READ-ONLY; List of private endpoint connections associated with the managed hsm pool. - PrivateEndpointConnections []*MHSMPrivateEndpointConnectionItem `json:"privateEndpointConnections,omitempty" azure:"ro"` + PrivateEndpointConnections []*MHSMPrivateEndpointConnectionItem // READ-ONLY; Provisioning state. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ProvisioningState // READ-ONLY; The scheduled purge date in UTC. - ScheduledPurgeDate *time.Time `json:"scheduledPurgeDate,omitempty" azure:"ro"` + ScheduledPurgeDate *time.Time // READ-ONLY; Managed HSM security domain properties. - SecurityDomainProperties *ManagedHSMSecurityDomainProperties `json:"securityDomainProperties,omitempty" azure:"ro"` + SecurityDomainProperties *ManagedHSMSecurityDomainProperties // READ-ONLY; Resource Status Message. - StatusMessage *string `json:"statusMessage,omitempty" azure:"ro"` -} - -// ManagedHsmResource - Managed HSM resource -type ManagedHsmResource struct { - // The supported Azure location where the managed HSM Pool should be created. - Location *string `json:"location,omitempty"` - - // SKU details - SKU *ManagedHsmSKU `json:"sku,omitempty"` - - // Resource tags - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; The Azure Resource Manager resource ID for the managed HSM Pool. - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the managed HSM Pool. - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; Metadata pertaining to creation and last modification of the key vault resource. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - - // READ-ONLY; The resource type of the managed HSM Pool. - Type *string `json:"type,omitempty" azure:"ro"` + StatusMessage *string } type ManagedHsmRotationPolicy struct { // The attributes of key rotation policy. - Attributes *ManagedHsmKeyRotationPolicyAttributes `json:"attributes,omitempty"` + Attributes *ManagedHsmKeyRotationPolicyAttributes // The lifetimeActions for key rotation action. - LifetimeActions []*ManagedHsmLifetimeAction `json:"lifetimeActions,omitempty"` + LifetimeActions []*ManagedHsmLifetimeAction } // ManagedHsmSKU - SKU details type ManagedHsmSKU struct { // REQUIRED; SKU Family of the managed HSM Pool - Family *ManagedHsmSKUFamily `json:"family,omitempty"` + Family *ManagedHsmSKUFamily // REQUIRED; SKU of the managed HSM Pool - Name *ManagedHsmSKUName `json:"name,omitempty"` + Name *ManagedHsmSKUName } type ManagedHsmTrigger struct { // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. // Eg: 'P90D', 'P1Y'. - TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + TimeAfterCreate *string // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` + TimeBeforeExpiry *string } -// ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate -// method. -type ManagedHsmsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType -// ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. -type ManagedHsmsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity -// ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted -// method. -type ManagedHsmsClientBeginPurgeDeletedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. -type ManagedHsmsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability -// method. -type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. -type ManagedHsmsClientGetDeletedOptions struct { - // placeholder for future optional parameters -} - -// ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. -type ManagedHsmsClientGetOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string -// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager -// method. -type ManagedHsmsClientListByResourceGroupOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager -// method. -type ManagedHsmsClientListBySubscriptionOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. -type ManagedHsmsClientListDeletedOptions struct { - // placeholder for future optional parameters + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string } // MetricSpecification - Metric specification of operation. type MetricSpecification struct { // The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. - AggregationType *string `json:"aggregationType,omitempty"` + AggregationType *string // The dimensions of metric - Dimensions []*DimensionProperties `json:"dimensions,omitempty"` + Dimensions []*DimensionProperties // Display description of metric specification. - DisplayDescription *string `json:"displayDescription,omitempty"` + DisplayDescription *string // Display name of metric specification. - DisplayName *string `json:"displayName,omitempty"` + DisplayName *string // Property to specify whether to fill gap with zero. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + FillGapWithZero *bool // The internal metric name. - InternalMetricName *string `json:"internalMetricName,omitempty"` + InternalMetricName *string // The metric lock aggregation type. - LockAggregationType *string `json:"lockAggregationType,omitempty"` + LockAggregationType *string // Name of metric specification. - Name *string `json:"name,omitempty"` + Name *string // The supported aggregation types for the metrics. - SupportedAggregationTypes []*string `json:"supportedAggregationTypes,omitempty"` + SupportedAggregationTypes []*string // The supported time grain types for the metrics. - SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty"` + SupportedTimeGrainTypes []*string // The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. - Unit *string `json:"unit,omitempty"` + Unit *string } // NetworkRuleSet - A set of rules governing the network accessibility of a vault. type NetworkRuleSet struct { // Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. - Bypass *NetworkRuleBypassOptions `json:"bypass,omitempty"` + Bypass *NetworkRuleBypassOptions // The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property // has been evaluated. - DefaultAction *NetworkRuleAction `json:"defaultAction,omitempty"` + DefaultAction *NetworkRuleAction // The list of IP address rules. - IPRules []*IPRule `json:"ipRules,omitempty"` + IPRules []*IPRule // The list of virtual network rules. - VirtualNetworkRules []*VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + VirtualNetworkRules []*VirtualNetworkRule } // Operation - Key Vault REST API operation definition. type Operation struct { // Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` + Display *OperationDisplay // Property to specify whether the action is a data action. - IsDataAction *bool `json:"isDataAction,omitempty"` + IsDataAction *bool // Operation name: {provider}/{resource}/{operation} - Name *string `json:"name,omitempty"` + Name *string // Properties of operation, include metric specifications. - OperationProperties *OperationProperties `json:"properties,omitempty"` + OperationProperties *OperationProperties // The origin of operations. - Origin *string `json:"origin,omitempty"` + Origin *string } // OperationDisplay - Display metadata associated with the operation. type OperationDisplay struct { // Description of operation. - Description *string `json:"description,omitempty"` + Description *string // Type of operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` + Operation *string // Service provider: Microsoft Key Vault. - Provider *string `json:"provider,omitempty"` + Provider *string // Resource on which the operation is performed etc. - Resource *string `json:"resource,omitempty"` + Resource *string } // OperationListResult - Result of the request to list Storage operations. It contains a list of operations and a URL link // to get the next set of results. type OperationListResult struct { // The URL to get the next set of operations. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // List of Storage operations supported by the Storage resource provider. - Value []*Operation `json:"value,omitempty"` + Value []*Operation } // OperationProperties - Properties of operation, include metric specifications. type OperationProperties struct { // One property of operation, include metric specifications. - ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + ServiceSpecification *ServiceSpecification } // Permissions the identity has for keys, secrets, certificates and storage. type Permissions struct { // Permissions to certificates - Certificates []*CertificatePermissions `json:"certificates,omitempty"` + Certificates []*CertificatePermissions // Permissions to keys - Keys []*KeyPermissions `json:"keys,omitempty"` + Keys []*KeyPermissions // Permissions to secrets - Secrets []*SecretPermissions `json:"secrets,omitempty"` + Secrets []*SecretPermissions // Permissions to storage accounts - Storage []*StoragePermissions `json:"storage,omitempty"` + Storage []*StoragePermissions } // PrivateEndpoint - Private endpoint object properties. type PrivateEndpoint struct { // READ-ONLY; Full identifier of the private endpoint resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string } // PrivateEndpointConnection - Private endpoint connection resource. type PrivateEndpointConnection struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateEndpointConnectionItem - Private endpoint connection item. type PrivateEndpointConnectionItem struct { // Modified whenever there is a change in the state of private endpoint connection. - Etag *string `json:"etag,omitempty"` + Etag *string // Id of private endpoint connection. - ID *string `json:"id,omitempty"` + ID *string // Private endpoint connection properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + Properties *PrivateEndpointConnectionProperties } // PrivateEndpointConnectionListResult - List of private endpoint connections. type PrivateEndpointConnectionListResult struct { // The URL to get the next set of private endpoint connections. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of private endpoint connections. - Value []*PrivateEndpointConnection `json:"value,omitempty"` + Value []*PrivateEndpointConnection } // PrivateEndpointConnectionProperties - Properties of the private endpoint connection resource. type PrivateEndpointConnectionProperties struct { // Properties of the private endpoint object. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + PrivateEndpoint *PrivateEndpoint // Approval state of the private link connection. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState // Provisioning state of the private endpoint connection. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` -} - -// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete -// method. -type PrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager -// method. -type PrivateEndpointConnectionsClientListByResourceOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. -type PrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters + ProvisioningState *PrivateEndpointConnectionProvisioningState } // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // PrivateLinkResourceListResult - A list of private link resources type PrivateLinkResourceListResult struct { // Array of private link resources - Value []*PrivateLinkResource `json:"value,omitempty"` + Value []*PrivateLinkResource } // PrivateLinkResourceProperties - Properties of a private link resource. type PrivateLinkResourceProperties struct { // Required DNS zone names of the the private link resource. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + RequiredZoneNames []*string // READ-ONLY; Group identifier of private link resource. - GroupID *string `json:"groupId,omitempty" azure:"ro"` + GroupID *string // READ-ONLY; Required member names of private link resource. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` -} - -// PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault -// method. -type PrivateLinkResourcesClientListByVaultOptions struct { - // placeholder for future optional parameters + RequiredMembers []*string } // PrivateLinkServiceConnectionState - An object that represents the approval state of the private link connection. type PrivateLinkServiceConnectionState struct { // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *ActionsRequired `json:"actionsRequired,omitempty"` + ActionsRequired *ActionsRequired // The reason for approval or rejection. - Description *string `json:"description,omitempty"` + Description *string // Indicates whether the connection has been approved, rejected or removed by the key vault owner. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` -} - -// ProxyResourceWithoutSystemData - Common fields that are returned in the response for all Azure Resource Manager resources -type ProxyResourceWithoutSystemData struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` - - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` - - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + Status *PrivateEndpointServiceConnectionStatus } // Resource - Key Vault resource type Resource struct { // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // ResourceListResult - List of vault resources. type ResourceListResult struct { // The URL to get the next set of vault resources. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of vault resources. - Value []*Resource `json:"value,omitempty"` + Value []*Resource } type RotationPolicy struct { // The attributes of key rotation policy. - Attributes *KeyRotationPolicyAttributes `json:"attributes,omitempty"` + Attributes *KeyRotationPolicyAttributes // The lifetimeActions for key rotation action. - LifetimeActions []*LifetimeAction `json:"lifetimeActions,omitempty"` + LifetimeActions []*LifetimeAction } // SKU details type SKU struct { // REQUIRED; SKU family name - Family *SKUFamily `json:"family,omitempty"` + Family *SKUFamily // REQUIRED; SKU name to specify whether the key vault is a standard vault or a premium vault. - Name *SKUName `json:"name,omitempty"` + Name *SKUName } // Secret - Resource information with extended details. type Secret struct { // REQUIRED; Properties of the secret - Properties *SecretProperties `json:"properties,omitempty"` + Properties *SecretProperties // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Azure location of the key vault resource. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty" azure:"ro"` + Tags map[string]*string // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // SecretAttributes - The secret management attributes. type SecretAttributes struct { // Determines whether the object is enabled. - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool // Expiry date in seconds since 1970-01-01T00:00:00Z. - Expires *time.Time `json:"exp,omitempty"` + Expires *time.Time // Not before date in seconds since 1970-01-01T00:00:00Z. - NotBefore *time.Time `json:"nbf,omitempty"` + NotBefore *time.Time // READ-ONLY; Creation time in seconds since 1970-01-01T00:00:00Z. - Created *time.Time `json:"created,omitempty" azure:"ro"` + Created *time.Time // READ-ONLY; Last updated time in seconds since 1970-01-01T00:00:00Z. - Updated *time.Time `json:"updated,omitempty" azure:"ro"` + Updated *time.Time } // SecretCreateOrUpdateParameters - Parameters for creating or updating a secret type SecretCreateOrUpdateParameters struct { // REQUIRED; Properties of the secret - Properties *SecretProperties `json:"properties,omitempty"` + Properties *SecretProperties // The tags that will be assigned to the secret. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // SecretListResult - List of secrets type SecretListResult struct { // The URL to get the next set of secrets. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of secrets. - Value []*Secret `json:"value,omitempty"` + Value []*Secret } // SecretPatchParameters - Parameters for patching a secret type SecretPatchParameters struct { // Properties of the secret - Properties *SecretPatchProperties `json:"properties,omitempty"` + Properties *SecretPatchProperties // The tags that will be assigned to the secret. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // SecretPatchProperties - Properties of the secret type SecretPatchProperties struct { // The attributes of the secret. - Attributes *SecretAttributes `json:"attributes,omitempty"` + Attributes *SecretAttributes // The content type of the secret. - ContentType *string `json:"contentType,omitempty"` + ContentType *string // The value of the secret. - Value *string `json:"value,omitempty"` + Value *string } // SecretProperties - Properties of the secret type SecretProperties struct { // The attributes of the secret. - Attributes *SecretAttributes `json:"attributes,omitempty"` + Attributes *SecretAttributes // The content type of the secret. - ContentType *string `json:"contentType,omitempty"` + ContentType *string // The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended // for internal use in ARM deployments. Users should use the data-plane REST // service for interaction with vault secrets. - Value *string `json:"value,omitempty"` + Value *string // READ-ONLY; The URI to retrieve the current version of the secret. - SecretURI *string `json:"secretUri,omitempty" azure:"ro"` + SecretURI *string // READ-ONLY; The URI to retrieve the specific version of the secret. - SecretURIWithVersion *string `json:"secretUriWithVersion,omitempty" azure:"ro"` -} - -// SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. -type SecretsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. -type SecretsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. -type SecretsClientListOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. -type SecretsClientUpdateOptions struct { - // placeholder for future optional parameters + SecretURIWithVersion *string } // ServiceSpecification - One property of operation, include log specifications. type ServiceSpecification struct { // Log specifications of operation. - LogSpecifications []*LogSpecification `json:"logSpecifications,omitempty"` + LogSpecifications []*LogSpecification // Metric specifications of operation. - MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` + MetricSpecifications []*MetricSpecification } // SystemData - Metadata pertaining to creation and last modification of the key vault resource. type SystemData struct { // The timestamp of the key vault resource creation (UTC). - CreatedAt *time.Time `json:"createdAt,omitempty"` + CreatedAt *time.Time // The identity that created the key vault resource. - CreatedBy *string `json:"createdBy,omitempty"` + CreatedBy *string // The type of identity that created the key vault resource. - CreatedByType *IdentityType `json:"createdByType,omitempty"` + CreatedByType *IdentityType // The timestamp of the key vault resource last modification (UTC). - LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` + LastModifiedAt *time.Time // The identity that last modified the key vault resource. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + LastModifiedBy *string // The type of identity that last modified the key vault resource. - LastModifiedByType *IdentityType `json:"lastModifiedByType,omitempty"` + LastModifiedByType *IdentityType } type Trigger struct { // The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. // Eg: 'P90D', 'P1Y'. - TimeAfterCreate *string `json:"timeAfterCreate,omitempty"` + TimeAfterCreate *string // The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty"` + TimeBeforeExpiry *string +} + +// UserAssignedIdentity - User assigned identity properties +type UserAssignedIdentity struct { + // READ-ONLY; The client ID of the assigned identity. + ClientID *string + + // READ-ONLY; The principal ID of the assigned identity. + PrincipalID *string } // Vault - Resource information with extended details. type Vault struct { // REQUIRED; Properties of the vault - Properties *VaultProperties `json:"properties,omitempty"` + Properties *VaultProperties // Azure location of the key vault resource. - Location *string `json:"location,omitempty"` + Location *string // Tags assigned to the key vault resource. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // READ-ONLY; Fully qualified identifier of the key vault resource. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; Name of the key vault resource. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; System metadata for the key vault. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + SystemData *SystemData // READ-ONLY; Resource type of the key vault resource. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // VaultAccessPolicyParameters - Parameters for updating the access policy in a vault type VaultAccessPolicyParameters struct { // REQUIRED; Properties of the access policy - Properties *VaultAccessPolicyProperties `json:"properties,omitempty"` + Properties *VaultAccessPolicyProperties // READ-ONLY; The resource id of the access policy. - ID *string `json:"id,omitempty" azure:"ro"` + ID *string // READ-ONLY; The resource type of the access policy. - Location *string `json:"location,omitempty" azure:"ro"` + Location *string // READ-ONLY; The resource name of the access policy. - Name *string `json:"name,omitempty" azure:"ro"` + Name *string // READ-ONLY; The resource name of the access policy. - Type *string `json:"type,omitempty" azure:"ro"` + Type *string } // VaultAccessPolicyProperties - Properties of the vault access policy type VaultAccessPolicyProperties struct { // REQUIRED; An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same // tenant ID as the key vault's tenant ID. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry } // VaultCheckNameAvailabilityParameters - The parameters used to check the availability of the vault name. type VaultCheckNameAvailabilityParameters struct { // REQUIRED; The vault name. - Name *string `json:"name,omitempty"` + Name *string // CONSTANT; The type of resource, Microsoft.KeyVault/vaults // Field has constant value "Microsoft.KeyVault/vaults", any specified value is ignored. - Type *string `json:"type,omitempty"` + Type *string } // VaultCreateOrUpdateParameters - Parameters for creating or updating a vault type VaultCreateOrUpdateParameters struct { // REQUIRED; The supported Azure location where the key vault should be created. - Location *string `json:"location,omitempty"` + Location *string // REQUIRED; Properties of the vault - Properties *VaultProperties `json:"properties,omitempty"` + Properties *VaultProperties // The tags that will be assigned to the key vault. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // VaultListResult - List of vaults type VaultListResult struct { // The URL to get the next set of vaults. - NextLink *string `json:"nextLink,omitempty"` + NextLink *string // The list of vaults. - Value []*Vault `json:"value,omitempty"` + Value []*Vault } // VaultPatchParameters - Parameters for creating or updating a vault type VaultPatchParameters struct { // Properties of the vault - Properties *VaultPatchProperties `json:"properties,omitempty"` + Properties *VaultPatchProperties // The tags that will be assigned to the key vault. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string } // VaultPatchProperties - Properties of the vault type VaultPatchProperties struct { // An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant // ID as the key vault's tenant ID. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry // The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates // protection against purge for this vault and its content - only the Key Vault // service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling // this functionality is irreversible - that is, the property does not accept // false as its value. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + EnablePurgeProtection *bool // Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) // for authorization of data actions, and the access policies specified in vault // properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any // policy stored on Azure Resource Manager will be ignored. If null or not // specified, the value of this property will not change. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + EnableRbacAuthorization *bool // Property to specify whether the 'soft delete' functionality is enabled for this key vault. Once set to true, it cannot // be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + EnableSoftDelete *bool // Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key // vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + EnabledForDeployment *bool // Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` + EnabledForDiskEncryption *bool // Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` + EnabledForTemplateDeployment *bool // A collection of rules governing the accessibility of the vault from specific network locations. - NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *NetworkRuleSet // Property to specify whether the vault will accept traffic from public internet. If set to 'disabled' all traffic except // private endpoint traffic and that that originates from trusted services will be // blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor // the rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *string // SKU details - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + SoftDeleteRetentionInDays *int32 // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string } // VaultProperties - Properties of the vault type VaultProperties struct { // REQUIRED; SKU details - SKU *SKU `json:"sku,omitempty"` + SKU *SKU // REQUIRED; The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty"` + TenantID *string // An array of 0 to 1024 identities that have access to the key vault. All identities in the array must use the same tenant // ID as the key vault's tenant ID. When createMode is set to recover, access // policies are not required. Otherwise, access policies are required. - AccessPolicies []*AccessPolicyEntry `json:"accessPolicies,omitempty"` + AccessPolicies []*AccessPolicyEntry // The vault's create mode to indicate whether the vault need to be recovered or not. - CreateMode *CreateMode `json:"createMode,omitempty"` + CreateMode *CreateMode // Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates // protection against purge for this vault and its content - only the Key Vault // service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling // this functionality is irreversible - that is, the property does not accept // false as its value. - EnablePurgeProtection *bool `json:"enablePurgeProtection,omitempty"` + EnablePurgeProtection *bool // Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) // for authorization of data actions, and the access policies specified in vault @@ -1595,120 +1350,53 @@ type VaultProperties struct { // policy stored on Azure Resource Manager will be ignored. If null or not // specified, the vault is created with the default value of false. Note that management actions are always authorized with // RBAC. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty"` + EnableRbacAuthorization *bool // Property to specify whether the 'soft delete' functionality is enabled for this key vault. If it's not set to any value(true // or false) when creating new key vault, it will be set to true by default. // Once set to true, it cannot be reverted to false. - EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + EnableSoftDelete *bool // Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key // vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` + EnabledForDeployment *bool // Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` + EnabledForDiskEncryption *bool // Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` + EnabledForTemplateDeployment *bool // Rules governing the accessibility of the key vault from specific network locations. - NetworkACLs *NetworkRuleSet `json:"networkAcls,omitempty"` + NetworkACLs *NetworkRuleSet // Provisioning state of the vault. - ProvisioningState *VaultProvisioningState `json:"provisioningState,omitempty"` + ProvisioningState *VaultProvisioningState // Property to specify whether the vault will accept traffic from public internet. If set to 'disabled' all traffic except // private endpoint traffic and that that originates from trusted services will be // blocked. This will override the set firewall rules, meaning that even if the firewall rules are present we will not honor // the rules. - PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` + PublicNetworkAccess *string // softDelete data retention days. It accepts >=7 and <=90. - SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + SoftDeleteRetentionInDays *int32 // The URI of the vault for performing operations on keys and secrets. - VaultURI *string `json:"vaultUri,omitempty"` + VaultURI *string // READ-ONLY; The resource id of HSM Pool. - HsmPoolResourceID *string `json:"hsmPoolResourceId,omitempty" azure:"ro"` + HsmPoolResourceID *string // READ-ONLY; List of private endpoint connections associated with the key vault. - PrivateEndpointConnections []*PrivateEndpointConnectionItem `json:"privateEndpointConnections,omitempty" azure:"ro"` -} - -// VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method. -type VaultsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted method. -type VaultsClientBeginPurgeDeletedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability method. -type VaultsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. -type VaultsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. -type VaultsClientGetDeletedOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. -type VaultsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager -// method. -type VaultsClientListByResourceGroupOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager -// method. -type VaultsClientListBySubscriptionOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. -type VaultsClientListDeletedOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. -type VaultsClientListOptions struct { - // Maximum number of results to return. - Top *int32 -} - -// VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy method. -type VaultsClientUpdateAccessPolicyOptions struct { - // placeholder for future optional parameters -} - -// VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. -type VaultsClientUpdateOptions struct { - // placeholder for future optional parameters + PrivateEndpointConnections []*PrivateEndpointConnectionItem } // VirtualNetworkRule - A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule struct { // REQUIRED; Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. - ID *string `json:"id,omitempty"` + ID *string // Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` + IgnoreMissingVnetServiceEndpoint *bool } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go index 7f7a5e10c..2efa49ee3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/models_serde.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -84,49 +83,6 @@ func (a *Action) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Attributes. -func (a Attributes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateTimeUnix(objectMap, "created", a.Created) - populate(objectMap, "enabled", a.Enabled) - populateTimeUnix(objectMap, "exp", a.Expires) - populateTimeUnix(objectMap, "nbf", a.NotBefore) - populateTimeUnix(objectMap, "updated", a.Updated) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Attributes. -func (a *Attributes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "created": - err = unpopulateTimeUnix(val, "Created", &a.Created) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - delete(rawMsg, key) - case "exp": - err = unpopulateTimeUnix(val, "Expires", &a.Expires) - delete(rawMsg, key) - case "nbf": - err = unpopulateTimeUnix(val, "NotBefore", &a.NotBefore) - delete(rawMsg, key) - case "updated": - err = unpopulateTimeUnix(val, "Updated", &a.Updated) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type CheckMhsmNameAvailabilityParameters. func (c CheckMhsmNameAvailabilityParameters) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -493,41 +449,6 @@ func (d *DimensionProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Error. -func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", e.Code) - populate(objectMap, "innererror", e.InnerError) - populate(objectMap, "message", e.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Error. -func (e *Error) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "innererror": - err = unpopulate(val, "InnerError", &e.InnerError) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type IPRule. func (i IPRule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1039,6 +960,7 @@ func (m MHSMPrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "etag", m.Etag) populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -1064,6 +986,9 @@ func (m *MHSMPrivateEndpointConnection) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -1198,6 +1123,7 @@ func (m *MHSMPrivateEndpointConnectionsListResult) UnmarshalJSON(data []byte) er func (m MHSMPrivateLinkResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -1220,6 +1146,9 @@ func (m *MHSMPrivateLinkResource) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -1439,6 +1368,7 @@ func (m *ManagedHSMSecurityDomainProperties) UnmarshalJSON(data []byte) error { func (m ManagedHsm) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -1461,6 +1391,9 @@ func (m *ManagedHsm) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) @@ -1517,33 +1450,6 @@ func (m *ManagedHsmAction) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmError. -func (m ManagedHsmError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmError. -func (m *ManagedHsmError) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ManagedHsmKey. func (m ManagedHsmKey) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1970,57 +1876,6 @@ func (m *ManagedHsmProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedHsmResource. -func (m ManagedHsmResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedHsmResource. -func (m *ManagedHsmResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ManagedHsmRotationPolicy. func (m ManagedHsmRotationPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2117,6 +1972,45 @@ func (m *ManagedHsmTrigger) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type MetricSpecification. func (m MetricSpecification) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2725,45 +2619,6 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithoutSystemData. -func (p ProxyResourceWithoutSystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithoutSystemData. -func (p *ProxyResourceWithoutSystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -3273,6 +3128,37 @@ func (t *Trigger) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Vault. func (v Vault) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go index 3b7216f1d..2f0aa4929 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/operations_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -40,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Key Vault Rest API operations. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -78,7 +77,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go new file mode 100644 index 000000000..0f3515424 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/options.go @@ -0,0 +1,283 @@ +//go:build go1.18 +// +build go1.18 + +// 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) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armkeyvault + +// KeysClientCreateIfNotExistOptions contains the optional parameters for the KeysClient.CreateIfNotExist method. +type KeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// KeysClientGetOptions contains the optional parameters for the KeysClient.Get method. +type KeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// KeysClientGetVersionOptions contains the optional parameters for the KeysClient.GetVersion method. +type KeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// KeysClientListOptions contains the optional parameters for the KeysClient.NewListPager method. +type KeysClientListOptions struct { + // placeholder for future optional parameters +} + +// KeysClientListVersionsOptions contains the optional parameters for the KeysClient.NewListVersionsPager method. +type KeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.BeginDelete +// method. +type MHSMPrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// MHSMPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Get +// method. +type MHSMPrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.NewListByResourcePager +// method. +type MHSMPrivateEndpointConnectionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateEndpointConnectionsClientPutOptions contains the optional parameters for the MHSMPrivateEndpointConnectionsClient.Put +// method. +type MHSMPrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// MHSMPrivateLinkResourcesClientListByMHSMResourceOptions contains the optional parameters for the MHSMPrivateLinkResourcesClient.ListByMHSMResource +// method. +type MHSMPrivateLinkResourcesClientListByMHSMResourceOptions struct { + // placeholder for future optional parameters +} + +// MHSMRegionsClientListByResourceOptions contains the optional parameters for the MHSMRegionsClient.NewListByResourcePager +// method. +type MHSMRegionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientCreateIfNotExistOptions contains the optional parameters for the ManagedHsmKeysClient.CreateIfNotExist +// method. +type ManagedHsmKeysClientCreateIfNotExistOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetOptions contains the optional parameters for the ManagedHsmKeysClient.Get method. +type ManagedHsmKeysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientGetVersionOptions contains the optional parameters for the ManagedHsmKeysClient.GetVersion method. +type ManagedHsmKeysClientGetVersionOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListOptions contains the optional parameters for the ManagedHsmKeysClient.NewListPager method. +type ManagedHsmKeysClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmKeysClientListVersionsOptions contains the optional parameters for the ManagedHsmKeysClient.NewListVersionsPager +// method. +type ManagedHsmKeysClientListVersionsOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginCreateOrUpdate +// method. +type ManagedHsmsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginDeleteOptions contains the optional parameters for the ManagedHsmsClient.BeginDelete method. +type ManagedHsmsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginPurgeDeletedOptions contains the optional parameters for the ManagedHsmsClient.BeginPurgeDeleted +// method. +type ManagedHsmsClientBeginPurgeDeletedOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedHsmsClientBeginUpdateOptions contains the optional parameters for the ManagedHsmsClient.BeginUpdate method. +type ManagedHsmsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagedHsmsClientCheckMhsmNameAvailabilityOptions contains the optional parameters for the ManagedHsmsClient.CheckMhsmNameAvailability +// method. +type ManagedHsmsClientCheckMhsmNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientGetDeletedOptions contains the optional parameters for the ManagedHsmsClient.GetDeleted method. +type ManagedHsmsClientGetDeletedOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientGetOptions contains the optional parameters for the ManagedHsmsClient.Get method. +type ManagedHsmsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedHsmsClientListByResourceGroupOptions contains the optional parameters for the ManagedHsmsClient.NewListByResourceGroupPager +// method. +type ManagedHsmsClientListByResourceGroupOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// ManagedHsmsClientListBySubscriptionOptions contains the optional parameters for the ManagedHsmsClient.NewListBySubscriptionPager +// method. +type ManagedHsmsClientListBySubscriptionOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// ManagedHsmsClientListDeletedOptions contains the optional parameters for the ManagedHsmsClient.NewListDeletedPager method. +type ManagedHsmsClientListDeletedOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete +// method. +type PrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager +// method. +type PrivateEndpointConnectionsClientListByResourceOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. +type PrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault +// method. +type PrivateLinkResourcesClientListByVaultOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. +type SecretsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. +type SecretsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. +type SecretsClientListOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. +type SecretsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method. +type VaultsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted method. +type VaultsClientBeginPurgeDeletedOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability method. +type VaultsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. +type VaultsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. +type VaultsClientGetDeletedOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. +type VaultsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager +// method. +type VaultsClientListByResourceGroupOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager +// method. +type VaultsClientListBySubscriptionOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. +type VaultsClientListDeletedOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. +type VaultsClientListOptions struct { + // Maximum number of results to return. + Top *int32 +} + +// VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy method. +type VaultsClientUpdateAccessPolicyOptions struct { + // placeholder for future optional parameters +} + +// VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. +type VaultsClientUpdateOptions struct { + // placeholder for future optional parameters +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go index 5d48db74b..8e519486d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privateendpointconnections_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -49,7 +48,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginDelete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. @@ -61,7 +60,8 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[PrivateEndpointConnectionsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[PrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -70,20 +70,22 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -110,7 +112,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,25 +121,28 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. // - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get // method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, options) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PrivateEndpointConnectionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -164,7 +169,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +187,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // NewListByResourcePager - The List operation gets information about the private endpoint connections associated with the // vault. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - options - PrivateEndpointConnectionsClientListByResourceOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByResourcePager @@ -235,7 +240,7 @@ func (client *PrivateEndpointConnectionsClient) listByResourceCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,7 +258,7 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // Put - Updates the specified private endpoint connection associated with the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - privateEndpointConnectionName - Name of the private endpoint connection associated with the key vault. @@ -261,18 +266,21 @@ func (client *PrivateEndpointConnectionsClient) listByResourceHandleResponse(res // - options - PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put // method. func (client *PrivateEndpointConnectionsClient) Put(ctx context.Context, resourceGroupName string, vaultName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientPutOptions) (PrivateEndpointConnectionsClientPutResponse, error) { + var err error req, err := client.putCreateRequest(ctx, resourceGroupName, vaultName, privateEndpointConnectionName, properties, options) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateEndpointConnectionsClientPutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateEndpointConnectionsClientPutResponse{}, err } - return client.putHandleResponse(resp) + resp, err := client.putHandleResponse(httpResp) + return resp, err } // putCreateRequest creates the Put request. @@ -299,15 +307,21 @@ func (client *PrivateEndpointConnectionsClient) putCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, properties) + if err := runtime.MarshalAsJSON(req, properties); err != nil { + return nil, err + } + return req, nil } // putHandleResponse handles the Put response. func (client *PrivateEndpointConnectionsClient) putHandleResponse(resp *http.Response) (PrivateEndpointConnectionsClientPutResponse, error) { result := PrivateEndpointConnectionsClientPutResponse{} + if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { + result.AzureAsyncOperation = &val + } if val := resp.Header.Get("Retry-After"); val != "" { retryAfter32, err := strconv.ParseInt(val, 10, 32) retryAfter := int32(retryAfter32) @@ -316,9 +330,6 @@ func (client *PrivateEndpointConnectionsClient) putHandleResponse(resp *http.Res } result.RetryAfter = &retryAfter } - if val := resp.Header.Get("Azure-AsyncOperation"); val != "" { - result.AzureAsyncOperation = &val - } if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { return PrivateEndpointConnectionsClientPutResponse{}, err } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go index 731c8aa54..61f7ada62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/privatelinkresources_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -48,24 +47,27 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // ListByVault - Gets the private link resources supported for the key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - Name of the resource group that contains the key vault. // - vaultName - The name of the key vault. // - options - PrivateLinkResourcesClientListByVaultOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByVault // method. func (client *PrivateLinkResourcesClient) ListByVault(ctx context.Context, resourceGroupName string, vaultName string, options *PrivateLinkResourcesClientListByVaultOptions) (PrivateLinkResourcesClientListByVaultResponse, error) { + var err error req, err := client.listByVaultCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PrivateLinkResourcesClientListByVaultResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PrivateLinkResourcesClientListByVaultResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PrivateLinkResourcesClientListByVaultResponse{}, err } - return client.listByVaultHandleResponse(resp) + resp, err := client.listByVaultHandleResponse(httpResp) + return resp, err } // listByVaultCreateRequest creates the ListByVault request. @@ -88,7 +90,7 @@ func (client *PrivateLinkResourcesClient) listByVaultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go index a1fd185c6..efeaaf1c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/response_types.go @@ -3,55 +3,64 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault // KeysClientCreateIfNotExistResponse contains the response from method KeysClient.CreateIfNotExist. type KeysClientCreateIfNotExistResponse struct { + // The key resource. Key } // KeysClientGetResponse contains the response from method KeysClient.Get. type KeysClientGetResponse struct { + // The key resource. Key } // KeysClientGetVersionResponse contains the response from method KeysClient.GetVersion. type KeysClientGetVersionResponse struct { + // The key resource. Key } // KeysClientListResponse contains the response from method KeysClient.NewListPager. type KeysClientListResponse struct { + // The page of keys. KeyListResult } // KeysClientListVersionsResponse contains the response from method KeysClient.NewListVersionsPager. type KeysClientListVersionsResponse struct { + // The page of keys. KeyListResult } // MHSMPrivateEndpointConnectionsClientDeleteResponse contains the response from method MHSMPrivateEndpointConnectionsClient.BeginDelete. type MHSMPrivateEndpointConnectionsClientDeleteResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection } // MHSMPrivateEndpointConnectionsClientGetResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Get. type MHSMPrivateEndpointConnectionsClientGetResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection } // MHSMPrivateEndpointConnectionsClientListByResourceResponse contains the response from method MHSMPrivateEndpointConnectionsClient.NewListByResourcePager. type MHSMPrivateEndpointConnectionsClientListByResourceResponse struct { + // List of private endpoint connections associated with a managed HSM Pools MHSMPrivateEndpointConnectionsListResult } // MHSMPrivateEndpointConnectionsClientPutResponse contains the response from method MHSMPrivateEndpointConnectionsClient.Put. type MHSMPrivateEndpointConnectionsClientPutResponse struct { + // Private endpoint connection resource. MHSMPrivateEndpointConnection + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. AzureAsyncOperation *string @@ -61,46 +70,55 @@ type MHSMPrivateEndpointConnectionsClientPutResponse struct { // MHSMPrivateLinkResourcesClientListByMHSMResourceResponse contains the response from method MHSMPrivateLinkResourcesClient.ListByMHSMResource. type MHSMPrivateLinkResourcesClientListByMHSMResourceResponse struct { + // A list of private link resources MHSMPrivateLinkResourceListResult } // MHSMRegionsClientListByResourceResponse contains the response from method MHSMRegionsClient.NewListByResourcePager. type MHSMRegionsClientListByResourceResponse struct { + // List of regions associated with a managed HSM Pools MHSMRegionsListResult } // ManagedHsmKeysClientCreateIfNotExistResponse contains the response from method ManagedHsmKeysClient.CreateIfNotExist. type ManagedHsmKeysClientCreateIfNotExistResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientGetResponse contains the response from method ManagedHsmKeysClient.Get. type ManagedHsmKeysClientGetResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientGetVersionResponse contains the response from method ManagedHsmKeysClient.GetVersion. type ManagedHsmKeysClientGetVersionResponse struct { + // The key resource. ManagedHsmKey } // ManagedHsmKeysClientListResponse contains the response from method ManagedHsmKeysClient.NewListPager. type ManagedHsmKeysClientListResponse struct { + // The page of keys. ManagedHsmKeyListResult } // ManagedHsmKeysClientListVersionsResponse contains the response from method ManagedHsmKeysClient.NewListVersionsPager. type ManagedHsmKeysClientListVersionsResponse struct { + // The page of keys. ManagedHsmKeyListResult } // ManagedHsmsClientCheckMhsmNameAvailabilityResponse contains the response from method ManagedHsmsClient.CheckMhsmNameAvailability. type ManagedHsmsClientCheckMhsmNameAvailabilityResponse struct { + // The CheckMhsmNameAvailability operation response. CheckMhsmNameAvailabilityResult } // ManagedHsmsClientCreateOrUpdateResponse contains the response from method ManagedHsmsClient.BeginCreateOrUpdate. type ManagedHsmsClientCreateOrUpdateResponse struct { + // Resource information with extended details. ManagedHsm } @@ -116,21 +134,25 @@ type ManagedHsmsClientGetDeletedResponse struct { // ManagedHsmsClientGetResponse contains the response from method ManagedHsmsClient.Get. type ManagedHsmsClientGetResponse struct { + // Resource information with extended details. ManagedHsm } // ManagedHsmsClientListByResourceGroupResponse contains the response from method ManagedHsmsClient.NewListByResourceGroupPager. type ManagedHsmsClientListByResourceGroupResponse struct { + // List of managed HSM Pools ManagedHsmListResult } // ManagedHsmsClientListBySubscriptionResponse contains the response from method ManagedHsmsClient.NewListBySubscriptionPager. type ManagedHsmsClientListBySubscriptionResponse struct { + // List of managed HSM Pools ManagedHsmListResult } // ManagedHsmsClientListDeletedResponse contains the response from method ManagedHsmsClient.NewListDeletedPager. type ManagedHsmsClientListDeletedResponse struct { + // List of deleted managed HSM Pools DeletedManagedHsmListResult } @@ -141,32 +163,40 @@ type ManagedHsmsClientPurgeDeletedResponse struct { // ManagedHsmsClientUpdateResponse contains the response from method ManagedHsmsClient.BeginUpdate. type ManagedHsmsClientUpdateResponse struct { + // Resource information with extended details. ManagedHsm } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete. type PrivateEndpointConnectionsClientDeleteResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListByResourceResponse contains the response from method PrivateEndpointConnectionsClient.NewListByResourcePager. type PrivateEndpointConnectionsClientListByResourceResponse struct { + // List of private endpoint connections. PrivateEndpointConnectionListResult } // PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.Put. type PrivateEndpointConnectionsClientPutResponse struct { + // Private endpoint connection resource. PrivateEndpointConnection + // AzureAsyncOperation contains the information returned from the Azure-AsyncOperation header response. AzureAsyncOperation *string @@ -176,36 +206,43 @@ type PrivateEndpointConnectionsClientPutResponse struct { // PrivateLinkResourcesClientListByVaultResponse contains the response from method PrivateLinkResourcesClient.ListByVault. type PrivateLinkResourcesClientListByVaultResponse struct { + // A list of private link resources PrivateLinkResourceListResult } // SecretsClientCreateOrUpdateResponse contains the response from method SecretsClient.CreateOrUpdate. type SecretsClientCreateOrUpdateResponse struct { + // Resource information with extended details. Secret } // SecretsClientGetResponse contains the response from method SecretsClient.Get. type SecretsClientGetResponse struct { + // Resource information with extended details. Secret } // SecretsClientListResponse contains the response from method SecretsClient.NewListPager. type SecretsClientListResponse struct { + // List of secrets SecretListResult } // SecretsClientUpdateResponse contains the response from method SecretsClient.Update. type SecretsClientUpdateResponse struct { + // Resource information with extended details. Secret } // VaultsClientCheckNameAvailabilityResponse contains the response from method VaultsClient.CheckNameAvailability. type VaultsClientCheckNameAvailabilityResponse struct { + // The CheckNameAvailability operation response. CheckNameAvailabilityResult } // VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.BeginCreateOrUpdate. type VaultsClientCreateOrUpdateResponse struct { + // Resource information with extended details. Vault } @@ -216,31 +253,37 @@ type VaultsClientDeleteResponse struct { // VaultsClientGetDeletedResponse contains the response from method VaultsClient.GetDeleted. type VaultsClientGetDeletedResponse struct { + // Deleted vault information with extended details. DeletedVault } // VaultsClientGetResponse contains the response from method VaultsClient.Get. type VaultsClientGetResponse struct { + // Resource information with extended details. Vault } // VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.NewListByResourceGroupPager. type VaultsClientListByResourceGroupResponse struct { + // List of vaults VaultListResult } // VaultsClientListBySubscriptionResponse contains the response from method VaultsClient.NewListBySubscriptionPager. type VaultsClientListBySubscriptionResponse struct { + // List of vaults VaultListResult } // VaultsClientListDeletedResponse contains the response from method VaultsClient.NewListDeletedPager. type VaultsClientListDeletedResponse struct { + // List of vaults DeletedVaultListResult } // VaultsClientListResponse contains the response from method VaultsClient.NewListPager. type VaultsClientListResponse struct { + // List of vault resources. ResourceListResult } @@ -251,10 +294,12 @@ type VaultsClientPurgeDeletedResponse struct { // VaultsClientUpdateAccessPolicyResponse contains the response from method VaultsClient.UpdateAccessPolicy. type VaultsClientUpdateAccessPolicyResponse struct { + // Parameters for updating the access policy in a vault VaultAccessPolicyParameters } // VaultsClientUpdateResponse contains the response from method VaultsClient.Update. type VaultsClientUpdateResponse struct { + // Resource information with extended details. Vault } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go index cf43971e1..6eb796d08 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/secrets_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -51,7 +50,7 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - secretName - Name of the secret. The value you provide may be copied globally for the purpose of running the service. The @@ -59,18 +58,21 @@ func NewSecretsClient(subscriptionID string, credential azcore.TokenCredential, // - parameters - Parameters to create or update the secret // - options - SecretsClientCreateOrUpdateOptions contains the optional parameters for the SecretsClient.CreateOrUpdate method. func (client *SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretCreateOrUpdateParameters, options *SecretsClientCreateOrUpdateOptions) (SecretsClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecretsClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecretsClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -97,10 +99,13 @@ func (client *SecretsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -116,24 +121,27 @@ func (client *SecretsClient) createOrUpdateHandleResponse(resp *http.Response) ( // REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - secretName - The name of the secret. // - options - SecretsClientGetOptions contains the optional parameters for the SecretsClient.Get method. func (client *SecretsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, secretName string, options *SecretsClientGetOptions) (SecretsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, secretName, options) if err != nil { return SecretsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return SecretsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return SecretsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -160,7 +168,7 @@ func (client *SecretsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -179,7 +187,7 @@ func (client *SecretsClient) getHandleResponse(resp *http.Response) (SecretsClie // use in ARM deployments. Users should use the data-plane REST service for interaction with // vault secrets. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - options - SecretsClientListOptions contains the optional parameters for the SecretsClient.NewListPager method. @@ -234,7 +242,7 @@ func (client *SecretsClient) listCreateRequest(ctx context.Context, resourceGrou if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,25 +261,28 @@ func (client *SecretsClient) listHandleResponse(resp *http.Response) (SecretsCli // Users should use the data-plane REST service for interaction with vault secrets. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - secretName - Name of the secret // - parameters - Parameters to patch the secret // - options - SecretsClientUpdateOptions contains the optional parameters for the SecretsClient.Update method. func (client *SecretsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, secretName string, parameters SecretPatchParameters, options *SecretsClientUpdateOptions) (SecretsClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, secretName, parameters, options) if err != nil { return SecretsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return SecretsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return SecretsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return SecretsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -298,10 +309,13 @@ func (client *SecretsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go index 6b1097513..59d8c8054 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_rfc3339.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go index 569805882..bf0463717 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/time_unix.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault diff --git a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go index b087a90a9..d791972ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault/vaults_client.go @@ -3,9 +3,8 @@ // 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) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armkeyvault @@ -49,23 +48,26 @@ func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, o // CheckNameAvailability - Checks that the vault name is valid and is not already in use. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - vaultName - The name of the vault. // - options - VaultsClientCheckNameAvailabilityOptions contains the optional parameters for the VaultsClient.CheckNameAvailability // method. func (client *VaultsClient) CheckNameAvailability(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters, options *VaultsClientCheckNameAvailabilityOptions) (VaultsClientCheckNameAvailabilityResponse, error) { + var err error req, err := client.checkNameAvailabilityCreateRequest(ctx, vaultName, options) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -80,10 +82,13 @@ func (client *VaultsClient) checkNameAvailabilityCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vaultName) + if err := runtime.MarshalAsJSON(req, vaultName); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -98,7 +103,7 @@ func (client *VaultsClient) checkNameAvailabilityHandleResponse(resp *http.Respo // BeginCreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the server belongs. // - vaultName - Name of the vault // - parameters - Parameters to create or update the vault @@ -110,7 +115,8 @@ func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[VaultsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[VaultsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -119,20 +125,22 @@ func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGro // CreateOrUpdate - Create or update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *VaultsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters, options *VaultsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -155,30 +163,35 @@ func (client *VaultsClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // Delete - Deletes the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault to delete // - options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method. func (client *VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (VaultsClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return VaultsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return VaultsClientDeleteResponse{}, err } return VaultsClientDeleteResponse{}, nil } @@ -203,7 +216,7 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,23 +225,26 @@ func (client *VaultsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - The name of the vault. // - options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method. func (client *VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (VaultsClientGetResponse, error) { + var err error req, err := client.getCreateRequest(ctx, resourceGroupName, vaultName, options) if err != nil { return VaultsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -251,7 +267,7 @@ func (client *VaultsClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,23 +285,26 @@ func (client *VaultsClient) getHandleResponse(resp *http.Response) (VaultsClient // GetDeleted - Gets the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - vaultName - The name of the vault. // - location - The location of the deleted vault. // - options - VaultsClientGetDeletedOptions contains the optional parameters for the VaultsClient.GetDeleted method. func (client *VaultsClient) GetDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientGetDeletedOptions) (VaultsClientGetDeletedResponse, error) { + var err error req, err := client.getDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return VaultsClientGetDeletedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientGetDeletedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return VaultsClientGetDeletedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return VaultsClientGetDeletedResponse{}, err } - return client.getDeletedHandleResponse(resp) + resp, err := client.getDeletedHandleResponse(httpResp) + return resp, err } // getDeletedCreateRequest creates the GetDeleted request. @@ -308,7 +327,7 @@ func (client *VaultsClient) getDeletedCreateRequest(ctx context.Context, vaultNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +344,7 @@ func (client *VaultsClient) getDeletedHandleResponse(resp *http.Response) (Vault // NewListPager - The List operation gets information about the vaults associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - VaultsClientListOptions contains the optional parameters for the VaultsClient.NewListPager method. func (client *VaultsClient) NewListPager(options *VaultsClientListOptions) *runtime.Pager[VaultsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListResponse]{ @@ -389,7 +408,7 @@ func (client *VaultsClient) listHandleResponse(resp *http.Response) (VaultsClien // NewListByResourceGroupPager - The List operation gets information about the vaults associated with the subscription and // within the specified resource group. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - options - VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager // method. @@ -440,7 +459,7 @@ func (client *VaultsClient) listByResourceGroupCreateRequest(ctx context.Context if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -457,7 +476,7 @@ func (client *VaultsClient) listByResourceGroupHandleResponse(resp *http.Respons // NewListBySubscriptionPager - The List operation gets information about the vaults associated with the subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - VaultsClientListBySubscriptionOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionPager // method. func (client *VaultsClient) NewListBySubscriptionPager(options *VaultsClientListBySubscriptionOptions) *runtime.Pager[VaultsClientListBySubscriptionResponse] { @@ -503,7 +522,7 @@ func (client *VaultsClient) listBySubscriptionCreateRequest(ctx context.Context, if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -520,7 +539,7 @@ func (client *VaultsClient) listBySubscriptionHandleResponse(resp *http.Response // NewListDeletedPager - Gets information about the deleted vaults in a subscription. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - options - VaultsClientListDeletedOptions contains the optional parameters for the VaultsClient.NewListDeletedPager method. func (client *VaultsClient) NewListDeletedPager(options *VaultsClientListDeletedOptions) *runtime.Pager[VaultsClientListDeletedResponse] { return runtime.NewPager(runtime.PagingHandler[VaultsClientListDeletedResponse]{ @@ -562,7 +581,7 @@ func (client *VaultsClient) listDeletedCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -580,7 +599,7 @@ func (client *VaultsClient) listDeletedHandleResponse(resp *http.Response) (Vaul // BeginPurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - vaultName - The name of the soft-deleted vault. // - location - The location of the soft-deleted vault. // - options - VaultsClientBeginPurgeDeletedOptions contains the optional parameters for the VaultsClient.BeginPurgeDeleted @@ -591,7 +610,8 @@ func (client *VaultsClient) BeginPurgeDeleted(ctx context.Context, vaultName str if err != nil { return nil, err } - return runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller[VaultsClientPurgeDeletedResponse](resp, client.internal.Pipeline(), nil) + return poller, err } else { return runtime.NewPollerFromResumeToken[VaultsClientPurgeDeletedResponse](options.ResumeToken, client.internal.Pipeline(), nil) } @@ -600,20 +620,22 @@ func (client *VaultsClient) BeginPurgeDeleted(ctx context.Context, vaultName str // PurgeDeleted - Permanently deletes the specified vault. aka Purges the deleted Azure key vault. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 func (client *VaultsClient) purgeDeleted(ctx context.Context, vaultName string, location string, options *VaultsClientBeginPurgeDeletedOptions) (*http.Response, error) { + var err error req, err := client.purgeDeletedCreateRequest(ctx, vaultName, location, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // purgeDeletedCreateRequest creates the PurgeDeleted request. @@ -636,7 +658,7 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -645,24 +667,27 @@ func (client *VaultsClient) purgeDeletedCreateRequest(ctx context.Context, vault // Update - Update a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the server belongs. // - vaultName - Name of the vault // - parameters - Parameters to patch the vault // - options - VaultsClientUpdateOptions contains the optional parameters for the VaultsClient.Update method. func (client *VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters, options *VaultsClientUpdateOptions) (VaultsClientUpdateResponse, error) { + var err error req, err := client.updateCreateRequest(ctx, resourceGroupName, vaultName, parameters, options) if err != nil { return VaultsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VaultsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VaultsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -685,10 +710,13 @@ func (client *VaultsClient) updateCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -703,7 +731,7 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // UpdateAccessPolicy - Update access policies in a key vault in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-02-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the Resource Group to which the vault belongs. // - vaultName - Name of the vault // - operationKind - Name of the operation @@ -711,18 +739,21 @@ func (client *VaultsClient) updateHandleResponse(resp *http.Response) (VaultsCli // - options - VaultsClientUpdateAccessPolicyOptions contains the optional parameters for the VaultsClient.UpdateAccessPolicy // method. func (client *VaultsClient) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters, options *VaultsClientUpdateAccessPolicyOptions) (VaultsClientUpdateAccessPolicyResponse, error) { + var err error req, err := client.updateAccessPolicyCreateRequest(ctx, resourceGroupName, vaultName, operationKind, parameters, options) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return VaultsClientUpdateAccessPolicyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return VaultsClientUpdateAccessPolicyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return VaultsClientUpdateAccessPolicyResponse{}, err } - return client.updateAccessPolicyHandleResponse(resp) + resp, err := client.updateAccessPolicyHandleResponse(httpResp) + return resp, err } // updateAccessPolicyCreateRequest creates the UpdateAccessPolicy request. @@ -749,10 +780,13 @@ func (client *VaultsClient) updateAccessPolicyCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-02-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // updateAccessPolicyHandleResponse handles the UpdateAccessPolicy response. diff --git a/vendor/modules.txt b/vendor/modules.txt index 7ab4cccb3..1f015d15e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -55,7 +55,7 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerregistry/armconta # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.4.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 -# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.2.0 +# github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.3.0 ## explicit; go 1.18 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault # github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.2.0