diff --git a/pkg/azclient/Makefile b/pkg/azclient/Makefile index 0fdd6f3632..5b19682d4c 100644 --- a/pkg/azclient/Makefile +++ b/pkg/azclient/Makefile @@ -92,6 +92,7 @@ generatecode: build ## Generate client $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource Interface --client-name InterfacesClient --verbs get,createorupdate,delete,list --expand --ratelimitkey interfaceRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource LoadBalancer --client-name LoadBalancersClient --verbs get,createorupdate,delete,list --expand --ratelimitkey loadBalancerRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PrivateEndpoint --client-name PrivateEndpointsClient --verbs get,createorupdate --expand --ratelimitkey privateEndpointRateLimit + $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PrivateEndpoint --subresource PrivateDNSZoneGroup --client-name PrivateDNSZoneGroupsClient --verbs get,createorupdate,delete $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PublicIPAddress --client-name PublicIPAddressesClient --verbs get,createorupdate,delete,list --expand --ratelimitkey publicIPAddressRateLimit $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource PublicIPPrefix --client-name PublicIPPrefixesClient --verbs get,createorupdate,delete,list --expand $(TYPESCAFFOLD) --package github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6 --package-alias armnetwork --resource RouteTable --client-name RouteTablesClient --verbs get,createorupdate,delete,list --ratelimitkey routeTableRateLimit diff --git a/pkg/azclient/client-gen/generator/gentest_action.go b/pkg/azclient/client-gen/generator/gentest_action.go index e54f3be0e2..c346e3b235 100644 --- a/pkg/azclient/client-gen/generator/gentest_action.go +++ b/pkg/azclient/client-gen/generator/gentest_action.go @@ -68,8 +68,17 @@ func (g Generator) generateTestSuite(ctx *genall.GenerationContext, root *loader importList["github.com/onsi/gomega"] = map[string]struct{}{} importList["github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"] = make(map[string]struct{}) importList["sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils"] = make(map[string]struct{}) - - // return DumpHeaderToWriter(ctx, root, root.Name+"_suite_test.go", headerText, importList, &outContent) + file, err := ctx.Open(root, root.Name+"_suite_test.go") + if err != nil { + return err + } + defer file.Close() + if err := DumpHeaderToWriter(ctx, file, g.HeaderFile, importList, root.Name); err != nil { + return err + } + if err := TestSuiteTemplate.Execute(file, markerConf); err != nil { + root.AddError(err) + } return nil } diff --git a/pkg/azclient/factory.go b/pkg/azclient/factory.go index d7c3ee4710..d648910681 100644 --- a/pkg/azclient/factory.go +++ b/pkg/azclient/factory.go @@ -31,6 +31,7 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/ipgroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -74,6 +75,7 @@ type ClientFactory interface { GetIPGroupClient() ipgroupclient.Interface GetLoadBalancerClient() loadbalancerclient.Interface GetManagedClusterClient() managedclusterclient.Interface + GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface GetPrivateEndpointClient() privateendpointclient.Interface GetPrivateLinkServiceClient() privatelinkserviceclient.Interface GetPrivateZoneClient() privatezoneclient.Interface diff --git a/pkg/azclient/factory_gen.go b/pkg/azclient/factory_gen.go index e4f6076cbe..435fde8019 100644 --- a/pkg/azclient/factory_gen.go +++ b/pkg/azclient/factory_gen.go @@ -39,6 +39,7 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/policy/ratelimit" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -81,6 +82,7 @@ type ClientFactoryImpl struct { ipgroupclientInterface ipgroupclient.Interface loadbalancerclientInterface loadbalancerclient.Interface managedclusterclientInterface managedclusterclient.Interface + privatednszonegroupclientInterface privatednszonegroupclient.Interface privateendpointclientInterface privateendpointclient.Interface privatelinkserviceclientInterface privatelinkserviceclient.Interface privatezoneclientInterface privatezoneclient.Interface @@ -199,6 +201,12 @@ func NewClientFactory(config *ClientFactoryConfig, armConfig *ARMClientConfig, c return nil, err } + //initialize privatednszonegroupclient + factory.privatednszonegroupclientInterface, err = factory.createPrivateDNSZoneGroupClient(config.SubscriptionID) + if err != nil { + return nil, err + } + //initialize privateendpointclient factory.privateendpointclientInterface, err = factory.createPrivateEndpointClient(config.SubscriptionID) if err != nil { @@ -752,6 +760,25 @@ func (factory *ClientFactoryImpl) GetManagedClusterClient() managedclusterclient return factory.managedclusterclientInterface } +func (factory *ClientFactoryImpl) createPrivateDNSZoneGroupClient(subscription string) (privatednszonegroupclient.Interface, error) { + //initialize privatednszonegroupclient + options, err := GetDefaultResourceClientOption(factory.armConfig, factory.facotryConfig) + if err != nil { + return nil, err + } + + for _, optionMutFn := range factory.clientOptionsMutFn { + if optionMutFn != nil { + optionMutFn(options) + } + } + return privatednszonegroupclient.New(subscription, factory.cred, options) +} + +func (factory *ClientFactoryImpl) GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface { + return factory.privatednszonegroupclientInterface +} + func (factory *ClientFactoryImpl) createPrivateEndpointClient(subscription string) (privateendpointclient.Interface, error) { //initialize privateendpointclient options, err := GetDefaultResourceClientOption(factory.armConfig, factory.facotryConfig) diff --git a/pkg/azclient/factory_test.go b/pkg/azclient/factory_test.go index a17bbe5c86..63ea45f0b9 100644 --- a/pkg/azclient/factory_test.go +++ b/pkg/azclient/factory_test.go @@ -115,6 +115,13 @@ var _ = ginkgo.Describe("Factory", func() { client := factory.GetManagedClusterClient() gomega.Expect(client).NotTo(gomega.BeNil()) }) + ginkgo.It("should create factory instance without painc - PrivateDNSZoneGroup", func() { + factory, err := NewClientFactory(nil, nil, nil) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(factory).NotTo(gomega.BeNil()) + client := factory.GetPrivateDNSZoneGroupClient() + gomega.Expect(client).NotTo(gomega.BeNil()) + }) ginkgo.It("should create factory instance without painc - PrivateEndpoint", func() { factory, err := NewClientFactory(nil, nil, nil) gomega.Expect(err).NotTo(gomega.HaveOccurred()) diff --git a/pkg/azclient/managedclusterclient/testdata/ManagedCluster.yaml b/pkg/azclient/managedclusterclient/testdata/ManagedCluster.yaml index 643196cab2..1fca31f5c9 100644 --- a/pkg/azclient/managedclusterclient/testdata/ManagedCluster.yaml +++ b/pkg/azclient/managedclusterclient/testdata/ManagedCluster.yaml @@ -77,8 +77,8 @@ interactions: Content-Type: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: PUT response: proto: HTTP/2.0 @@ -86,7 +86,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 3228 + content_length: 3230 uncompressed: false body: |- { @@ -100,10 +100,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -119,13 +119,13 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "nodeLabels": {}, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -196,7 +196,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -219,7 +219,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "3228" + - "3230" Content-Type: - application/json Expires: @@ -252,7 +252,7 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2017-08-31&c=c&h=h&s=s&t=t method: GET response: @@ -307,8 +307,8 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -316,7 +316,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 3853 + content_length: 3855 uncompressed: false body: |- { @@ -330,10 +330,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -349,12 +349,12 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -437,7 +437,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -458,7 +458,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "3853" + - "3855" Content-Type: - application/json Expires: @@ -493,8 +493,8 @@ interactions: Accept: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -502,7 +502,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 3853 + content_length: 3855 uncompressed: false body: |- { @@ -516,10 +516,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -535,12 +535,12 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -623,7 +623,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -644,7 +644,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "3853" + - "3855" Content-Type: - application/json Expires: @@ -679,8 +679,8 @@ interactions: Accept: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResourcenotfound?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResourcenotfound?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -734,8 +734,8 @@ interactions: Content-Type: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: PUT response: proto: HTTP/2.0 @@ -743,7 +743,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 3905 + content_length: 3907 uncompressed: false body: |- { @@ -757,10 +757,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -777,13 +777,13 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "nodeLabels": {}, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -866,7 +866,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -889,7 +889,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "3905" + - "3907" Content-Type: - application/json Expires: @@ -903,7 +903,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: - - "11999" + - "12000" status: 200 OK code: 200 duration: 200ms @@ -922,7 +922,7 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2017-08-31&c=c&h=h&s=s&t=t method: GET response: @@ -977,8 +977,8 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -986,7 +986,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 3885 + content_length: 3887 uncompressed: false body: |- { @@ -1000,10 +1000,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -1020,12 +1020,12 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -1108,7 +1108,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -1129,7 +1129,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "3885" + - "3887" Content-Type: - application/json Expires: @@ -1164,8 +1164,8 @@ interactions: Accept: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -1173,7 +1173,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 4435 + content_length: 4439 uncompressed: false body: |- { @@ -1189,10 +1189,10 @@ interactions: "code": "Running" }, "kubernetesVersion": "1.29", - "currentKubernetesVersion": "1.29.9", + "currentKubernetesVersion": "1.29.10", "dnsPrefix": "aks-cit-ManagedClustertestResourcednsPrefix", - "fqdn": "aks-cit-managedclustertestresourcednsprefix-76oauh09.hcp.eastus.azmk8s.io", - "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-76oauh09.portal.hcp.eastus.azmk8s.io", + "fqdn": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.hcp.eastus.azmk8s.io", + "azurePortalFQDN": "aks-cit-managedclustertestresourcednsprefix-3fvmxigx.portal.hcp.eastus.azmk8s.io", "agentPoolProfiles": [ { "name": "agentpool1", @@ -1209,12 +1209,12 @@ interactions: "code": "Running" }, "orchestratorVersion": "1.29", - "currentOrchestratorVersion": "1.29.9", + "currentOrchestratorVersion": "1.29.10", "enableNodePublicIP": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202410.15.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202411.12.0", "upgradeSettings": { "maxSurge": "10%" }, @@ -1297,7 +1297,7 @@ interactions: "enabled": false }, "workloadAutoScalerProfile": {}, - "resourceUID": "672391aa9ecf720001e72578", + "resourceUID": "674966dfbc7b0d0001630c2d", "metricsProfile": { "costAnalysis": { "enabled": false @@ -1315,13 +1315,13 @@ interactions: } } ], - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?%24skipToken=9855795\u0026api-version=2024-08-01\u0026skipToken=9855795" + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?%24skipToken=10064527\u0026api-version=2024-09-01\u0026skipToken=10064527" } headers: Cache-Control: - no-cache Content-Length: - - "4435" + - "4439" Content-Type: - application/json Expires: @@ -1335,7 +1335,7 @@ interactions: X-Content-Type-Options: - nosniff X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: - - "16498" + - "16499" status: 200 OK code: 200 duration: 200ms @@ -1354,8 +1354,8 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?%24skipToken=9855795&api-version=2024-08-01&skipToken=9855795 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters?%24skipToken=10064527&api-version=2024-09-01&skipToken=10064527 method: GET response: proto: HTTP/2.0 @@ -1408,8 +1408,8 @@ interactions: Accept: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedClusternotfound/providers/Microsoft.ContainerService/managedClusters?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedClusternotfound/providers/Microsoft.ContainerService/managedClusters?api-version=2024-09-01 method: GET response: proto: HTTP/2.0 @@ -1459,8 +1459,8 @@ interactions: Accept: - application/json User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-08-01 + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-ManagedCluster/providers/Microsoft.ContainerService/managedClusters/testResource?api-version=2024-09-01 method: DELETE response: proto: HTTP/2.0 @@ -1510,7 +1510,7 @@ interactions: form: {} headers: User-Agent: - - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.2.0 (go1.23.2; linux) + - ccm-ManagedCluster-clien azsdk-go-armcontainerservice/v6.3.0 (go1.23.2; linux) url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2017-08-31&c=c&h=h&s=s&t=t method: GET response: @@ -1519,7 +1519,7 @@ interactions: proto_minor: 0 transfer_encoding: [] trailer: {} - content_length: 165 + content_length: 164 uncompressed: false body: |- { @@ -1532,7 +1532,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "165" + - "164" Content-Type: - application/json Expires: diff --git a/pkg/azclient/mock_azclient/interface.go b/pkg/azclient/mock_azclient/interface.go index 2120e1ab8f..f79f885c0d 100644 --- a/pkg/azclient/mock_azclient/interface.go +++ b/pkg/azclient/mock_azclient/interface.go @@ -44,6 +44,7 @@ import ( ipgroupclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/ipgroupclient" loadbalancerclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/loadbalancerclient" managedclusterclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/managedclusterclient" + privatednszonegroupclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatednszonegroupclient" privateendpointclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privateendpointclient" privatelinkserviceclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatelinkserviceclient" privatezoneclient "sigs.k8s.io/cloud-provider-azure/pkg/azclient/privatezoneclient" @@ -363,6 +364,20 @@ func (mr *MockClientFactoryMockRecorder) GetManagedClusterClient() *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManagedClusterClient", reflect.TypeOf((*MockClientFactory)(nil).GetManagedClusterClient)) } +// GetPrivateDNSZoneGroupClient mocks base method. +func (m *MockClientFactory) GetPrivateDNSZoneGroupClient() privatednszonegroupclient.Interface { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPrivateDNSZoneGroupClient") + ret0, _ := ret[0].(privatednszonegroupclient.Interface) + return ret0 +} + +// GetPrivateDNSZoneGroupClient indicates an expected call of GetPrivateDNSZoneGroupClient. +func (mr *MockClientFactoryMockRecorder) GetPrivateDNSZoneGroupClient() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateDNSZoneGroupClient", reflect.TypeOf((*MockClientFactory)(nil).GetPrivateDNSZoneGroupClient)) +} + // GetPrivateEndpointClient mocks base method. func (m *MockClientFactory) GetPrivateEndpointClient() privateendpointclient.Interface { m.ctrl.T.Helper() diff --git a/pkg/azclient/privatednszonegroupclient/custom_test.go b/pkg/azclient/privatednszonegroupclient/custom_test.go new file mode 100644 index 0000000000..cd0b4ba20f --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/custom_test.go @@ -0,0 +1,261 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ + +// Code generated by client-gen. DO NOT EDIT. +package privatednszonegroupclient + +import ( + "context" + "time" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + armprivatedns "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns" + . "github.com/onsi/gomega" +) + +var ( + networkClientFactory *armnetwork.ClientFactory + privateDNSFactory *armprivatedns.ClientFactory + loadBalancersClient *armnetwork.LoadBalancersClient + pipClient *armnetwork.PublicIPAddressesClient + vnetClient *armnetwork.VirtualNetworksClient + privatelinkserviceClient *armnetwork.PrivateLinkServicesClient + privateendpointclient *armnetwork.PrivateEndpointsClient + privatezoneclient *armprivatedns.PrivateZonesClient + vnetLinkClient *armprivatedns.VirtualNetworkLinksClient +) +var ( + pipName string = "pip1" + pipResource *armnetwork.PublicIPAddress + lbName string = "lb1" + lbResource *armnetwork.LoadBalancer + vnetName string = "vnet1" + vnetResource *armnetwork.VirtualNetwork + plsName string = "pls1" + plsResource *armnetwork.PrivateLinkService + privateEndpoint *armnetwork.PrivateEndpoint + privateZone *armprivatedns.PrivateZone + virtualnetworklink *armprivatedns.VirtualNetworkLink +) + +func init() { + additionalTestCases = func() { + } + + beforeAllFunc = func(ctx context.Context) { + networkClientFactory, err = armnetwork.NewClientFactory(subscriptionID, recorder.TokenCredential(), &arm.ClientOptions{ + ClientOptions: policy.ClientOptions{ + Transport: recorder.HTTPClient(), + }, + }) + Expect(err).NotTo(HaveOccurred()) + privateDNSFactory, err = armprivatedns.NewClientFactory(subscriptionID, recorder.TokenCredential(), &arm.ClientOptions{ + ClientOptions: policy.ClientOptions{ + Transport: recorder.HTTPClient(), + }, + }) + Expect(err).NotTo(HaveOccurred()) + pipClient = networkClientFactory.NewPublicIPAddressesClient() + poller, err := pipClient.BeginCreateOrUpdate(ctx, resourceGroupName, pipName, armnetwork.PublicIPAddress{ + Location: to.Ptr(location), + Properties: &armnetwork.PublicIPAddressPropertiesFormat{ + PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4), + PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic), + }, + SKU: &armnetwork.PublicIPAddressSKU{ + Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandard), + Tier: to.Ptr(armnetwork.PublicIPAddressSKUTierRegional), + }, + }, nil) + Expect(err).NotTo(HaveOccurred()) + resp, err := poller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + pipResource = &resp.PublicIPAddress + loadBalancersClient = networkClientFactory.NewLoadBalancersClient() + lbpoller, err := loadBalancersClient.BeginCreateOrUpdate(ctx, resourceGroupName, lbName, armnetwork.LoadBalancer{ + Location: to.Ptr(location), + Properties: &armnetwork.LoadBalancerPropertiesFormat{ + FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ + { + Name: to.Ptr("frontendConfig1"), + Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ + PublicIPAddress: pipResource, + }, + }, + }, + }, + SKU: &armnetwork.LoadBalancerSKU{ + Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), + Tier: to.Ptr(armnetwork.LoadBalancerSKUTierRegional), + }, + }, nil) + Expect(err).NotTo(HaveOccurred()) + lbresp, err := lbpoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + lbResource = &lbresp.LoadBalancer + + vnetClient = networkClientFactory.NewVirtualNetworksClient() + vnetpoller, err := vnetClient.BeginCreateOrUpdate(ctx, resourceGroupName, vnetName, armnetwork.VirtualNetwork{ + Location: to.Ptr(location), + Properties: &armnetwork.VirtualNetworkPropertiesFormat{ + AddressSpace: &armnetwork.AddressSpace{ + AddressPrefixes: []*string{ + to.Ptr("10.1.0.0/16"), + }, + }, + Subnets: []*armnetwork.Subnet{ + { + Name: to.Ptr("subnet1"), + Properties: &armnetwork.SubnetPropertiesFormat{ + AddressPrefix: to.Ptr("10.1.0.0/24"), + PrivateEndpointNetworkPolicies: to.Ptr(armnetwork.VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), + PrivateLinkServiceNetworkPolicies: to.Ptr(armnetwork.VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), + }, + }, + }, + }, + }, nil) + Expect(err).NotTo(HaveOccurred()) + vnetresp, err := vnetpoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + vnetResource = &vnetresp.VirtualNetwork + + privatelinkserviceClient = networkClientFactory.NewPrivateLinkServicesClient() + plsPoller, err := privatelinkserviceClient.BeginCreateOrUpdate(ctx, resourceGroupName, plsName, armnetwork.PrivateLinkService{ + Location: to.Ptr(location), + Properties: &armnetwork.PrivateLinkServiceProperties{ + IPConfigurations: []*armnetwork.PrivateLinkServiceIPConfiguration{ + { + Name: to.Ptr("ipConfig1"), + Properties: &armnetwork.PrivateLinkServiceIPConfigurationProperties{ + Subnet: vnetResource.Properties.Subnets[0], + Primary: to.Ptr(true), + PrivateIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4), + }, + }, + }, + LoadBalancerFrontendIPConfigurations: lbResource.Properties.FrontendIPConfigurations, + }, + }, nil) + Expect(err).NotTo(HaveOccurred()) + plsresp, err := plsPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + plsResource = &plsresp.PrivateLinkService + + privateEndpoint = &armnetwork.PrivateEndpoint{ + Location: to.Ptr(location), + Properties: &armnetwork.PrivateEndpointProperties{ + Subnet: vnetResource.Properties.Subnets[0], + PrivateLinkServiceConnections: []*armnetwork.PrivateLinkServiceConnection{ + { + Name: to.Ptr("plsConnection1"), + Properties: &armnetwork.PrivateLinkServiceConnectionProperties{ + PrivateLinkServiceID: plsResource.ID, + }, + }, + }, + }, + } + privateendpointclient = networkClientFactory.NewPrivateEndpointsClient() + peendointPoller, err := privateendpointclient.BeginCreateOrUpdate(ctx, resourceGroupName, resourceName, *privateEndpoint, nil) + Expect(err).NotTo(HaveOccurred()) + peresp, err := peendointPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + privateEndpoint = &peresp.PrivateEndpoint + parentResourceName = *privateEndpoint.Name + privateZone = &armprivatedns.PrivateZone{ + Name: to.Ptr("privatezone1.testzone.local"), + Location: to.Ptr("global"), + Properties: &armprivatedns.PrivateZoneProperties{}, + } + privatezoneclient = privateDNSFactory.NewPrivateZonesClient() + privateZonePoller, err := privatezoneclient.BeginCreateOrUpdate(ctx, resourceGroupName, *privateZone.Name, *privateZone, nil) + Expect(err).NotTo(HaveOccurred()) + pzresp, err := privateZonePoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + privateZone = &pzresp.PrivateZone + + virtualnetworklink = &armprivatedns.VirtualNetworkLink{ + Name: to.Ptr(resourceName), + Location: to.Ptr("global"), + Properties: &armprivatedns.VirtualNetworkLinkProperties{ + RegistrationEnabled: to.Ptr(true), + VirtualNetwork: &armprivatedns.SubResource{ + ID: vnetResource.ID, + }, + }, + } + vnetLinkClient = privateDNSFactory.NewVirtualNetworkLinksClient() + vnetLinkPoller, err := vnetLinkClient.BeginCreateOrUpdate(ctx, resourceGroupName, *privateZone.Name, resourceName, *virtualnetworklink, nil) + Expect(err).NotTo(HaveOccurred()) + vnlresp, err := vnetLinkPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + virtualnetworklink = &vnlresp.VirtualNetworkLink + + newResource = &armnetwork.PrivateDNSZoneGroup{ + Name: to.Ptr(resourceName), + Properties: &armnetwork.PrivateDNSZoneGroupPropertiesFormat{ + PrivateDNSZoneConfigs: []*armnetwork.PrivateDNSZoneConfig{ + { + Name: to.Ptr("zoneConfig1"), + Properties: &armnetwork.PrivateDNSZonePropertiesFormat{ + PrivateDNSZoneID: privateZone.ID, + }, + }, + }, + }, + } + } + afterAllFunc = func(ctx context.Context) { + vnetLinkPoller, err := vnetLinkClient.BeginDelete(ctx, resourceGroupName, *privateZone.Name, *virtualnetworklink.Name, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = vnetLinkPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + + privateZonePoller, err := privatezoneclient.BeginDelete(ctx, resourceGroupName, *privateZone.Name, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = privateZonePoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + + pepoller, err := privateendpointclient.BeginDelete(ctx, resourceGroupName, *privateEndpoint.Name, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = pepoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + + plsPoller, err := privatelinkserviceClient.BeginDelete(ctx, resourceGroupName, plsName, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = plsPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + lbPoller, err := loadBalancersClient.BeginDelete(ctx, resourceGroupName, lbName, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = lbPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + + pipPoller, err := pipClient.BeginDelete(ctx, resourceGroupName, pipName, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = pipPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + + vnetPoller, err := vnetClient.BeginDelete(ctx, resourceGroupName, vnetName, nil) + Expect(err).NotTo(HaveOccurred()) + _, err = vnetPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{Frequency: 1 * time.Second}) + Expect(err).NotTo(HaveOccurred()) + } +} diff --git a/pkg/azclient/privatednszonegroupclient/interface.go b/pkg/azclient/privatednszonegroupclient/interface.go new file mode 100644 index 0000000000..dda5cbc0fb --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/interface.go @@ -0,0 +1,31 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +azure:enableclientgen:=true +package privatednszonegroupclient + +import ( + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" +) + +// +azure:client:verbs=get;createorupdate;delete,resource=PrivateEndpoint,subResource=PrivateDNSZoneGroup,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6,packageAlias=armnetwork,clientName=PrivateDNSZoneGroupsClient,expand=false +type Interface interface { + utils.SubResourceGetFunc[armnetwork.PrivateDNSZoneGroup] + utils.SubResourceCreateOrUpdateFunc[armnetwork.PrivateDNSZoneGroup] + utils.SubResourceDeleteFunc[armnetwork.PrivateDNSZoneGroup] +} diff --git a/pkg/azclient/privatednszonegroupclient/mock_privatednszonegroupclient/interface.go b/pkg/azclient/privatednszonegroupclient/mock_privatednszonegroupclient/interface.go new file mode 100644 index 0000000000..3505dcdbb5 --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/mock_privatednszonegroupclient/interface.go @@ -0,0 +1,103 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ +// + +// Code generated by MockGen. DO NOT EDIT. +// Source: privatednszonegroupclient/interface.go +// +// Generated by this command: +// +// mockgen -package mock_privatednszonegroupclient -source privatednszonegroupclient/interface.go -copyright_file ../../hack/boilerplate/boilerplate.generatego.txt +// + +// Package mock_privatednszonegroupclient is a generated GoMock package. +package mock_privatednszonegroupclient + +import ( + context "context" + reflect "reflect" + + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + gomock "go.uber.org/mock/gomock" +) + +// MockInterface is a mock of Interface interface. +type MockInterface struct { + ctrl *gomock.Controller + recorder *MockInterfaceMockRecorder + isgomock struct{} +} + +// MockInterfaceMockRecorder is the mock recorder for MockInterface. +type MockInterfaceMockRecorder struct { + mock *MockInterface +} + +// NewMockInterface creates a new mock instance. +func NewMockInterface(ctrl *gomock.Controller) *MockInterface { + mock := &MockInterface{ctrl: ctrl} + mock.recorder = &MockInterfaceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { + return m.recorder +} + +// CreateOrUpdate mocks base method. +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, parentResourceName, resourceName string, resourceParam armnetwork.PrivateDNSZoneGroup) (*armnetwork.PrivateDNSZoneGroup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, parentResourceName, resourceName, resourceParam) + ret0, _ := ret[0].(*armnetwork.PrivateDNSZoneGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate. +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, parentResourceName, resourceName, resourceParam any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, parentResourceName, resourceName, resourceParam) +} + +// Delete mocks base method. +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, parentResourceName, resourceName string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, parentResourceName, resourceName) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, parentResourceName, resourceName any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, parentResourceName, resourceName) +} + +// Get mocks base method. +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, parentResourceName, resourceName string) (*armnetwork.PrivateDNSZoneGroup, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, parentResourceName, resourceName) + ret0, _ := ret[0].(*armnetwork.PrivateDNSZoneGroup) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, parentResourceName, resourceName any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, parentResourceName, resourceName) +} diff --git a/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_suite_test.go b/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_suite_test.go new file mode 100644 index 0000000000..dd4888b942 --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_suite_test.go @@ -0,0 +1,94 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ + +// Code generated by client-gen. DO NOT EDIT. +package privatednszonegroupclient + +import ( + "context" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" + "github.com/onsi/ginkgo/v2" + "github.com/onsi/gomega" + + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/recording" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" +) + +func TestClient(t *testing.T) { + gomega.RegisterFailHandler(ginkgo.Fail) + ginkgo.RunSpecs(t, "Client Suite") +} + +var resourceGroupName = "aks-cit-PrivateDNSZoneGroup" +var resourceName = "testResource" +var parentResourceName = "testParentResource" +var subscriptionID string +var location = "eastus" +var resourceGroupClient *armresources.ResourceGroupsClient +var err error +var recorder *recording.Recorder +var realClient Interface + +var _ = ginkgo.BeforeSuite(func(ctx context.Context) { + recorder, err = recording.NewRecorder("testdata/PrivateDNSZoneGroup") + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + subscriptionID = recorder.SubscriptionID() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + cred := recorder.TokenCredential() + resourceGroupClient, err = armresources.NewResourceGroupsClient(subscriptionID, cred, &arm.ClientOptions{ + ClientOptions: azcore.ClientOptions{ + Transport: recorder.HTTPClient(), + TracingProvider: utils.TracingProvider, + Telemetry: policy.TelemetryOptions{ + ApplicationID: "ccm-resource-group-client", + }, + }, + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + realClient, err = New(subscriptionID, recorder.TokenCredential(), &arm.ClientOptions{ + ClientOptions: azcore.ClientOptions{ + Transport: recorder.HTTPClient(), + TracingProvider: utils.TracingProvider, + Telemetry: policy.TelemetryOptions{ + ApplicationID: "ccm-PrivateDNSZoneGroup-client", + }, + }, + }) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + _, err = resourceGroupClient.CreateOrUpdate( + ctx, + resourceGroupName, + armresources.ResourceGroup{ + Location: to.Ptr(location), + }, + nil) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) +}) + +var _ = ginkgo.AfterSuite(func(ctx context.Context) { + poller, err := resourceGroupClient.BeginDelete(ctx, resourceGroupName, nil) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + _, err = poller.PollUntilDone(ctx, nil) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) + err = recorder.Stop() + gomega.Expect(err).ToNot(gomega.HaveOccurred()) +}) diff --git a/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_test.go b/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_test.go new file mode 100644 index 0000000000..d4494af6f7 --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/privatednszonegroupclient_test.go @@ -0,0 +1,86 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ + +// Code generated by client-gen. DO NOT EDIT. +package privatednszonegroupclient + +import ( + "context" + "strings" + + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + "github.com/onsi/ginkgo/v2" + "github.com/onsi/gomega" +) + +var beforeAllFunc func(context.Context) +var afterAllFunc func(context.Context) +var additionalTestCases func() +var newResource *armnetwork.PrivateDNSZoneGroup = &armnetwork.PrivateDNSZoneGroup{} + +var _ = ginkgo.Describe("PrivateDNSZoneGroupsClient", ginkgo.Ordered, func() { + + if beforeAllFunc != nil { + ginkgo.BeforeAll(beforeAllFunc) + } + + if additionalTestCases != nil { + additionalTestCases() + } + + ginkgo.When("creation requests are raised", func() { + ginkgo.It("should not return error", func(ctx context.Context) { + newResource, err := realClient.CreateOrUpdate(ctx, resourceGroupName, parentResourceName, resourceName, *newResource) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(newResource).NotTo(gomega.BeNil()) + gomega.Expect(strings.EqualFold(*newResource.Name, resourceName)).To(gomega.BeTrue()) + }) + }) + + ginkgo.When("get requests are raised", func() { + ginkgo.It("should not return error", func(ctx context.Context) { + newResource, err := realClient.Get(ctx, resourceGroupName, parentResourceName, resourceName) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(newResource).NotTo(gomega.BeNil()) + }) + }) + ginkgo.When("invalid get requests are raised", func() { + ginkgo.It("should return 404 error", func(ctx context.Context) { + newResource, err := realClient.Get(ctx, resourceGroupName, parentResourceName, resourceName+"notfound") + gomega.Expect(err).To(gomega.HaveOccurred()) + gomega.Expect(newResource).To(gomega.BeNil()) + }) + }) + + ginkgo.When("update requests are raised", func() { + ginkgo.It("should not return error", func(ctx context.Context) { + newResource, err := realClient.CreateOrUpdate(ctx, resourceGroupName, parentResourceName, resourceName, *newResource) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(newResource).NotTo(gomega.BeNil()) + }) + }) + + ginkgo.When("deletion requests are raised", func() { + ginkgo.It("should not return error", func(ctx context.Context) { + err = realClient.Delete(ctx, resourceGroupName, parentResourceName, resourceName) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + }) + + if afterAllFunc != nil { + ginkgo.AfterAll(afterAllFunc) + } +}) diff --git a/pkg/azclient/privatednszonegroupclient/testdata/PrivateDNSZoneGroup.yaml b/pkg/azclient/privatednszonegroupclient/testdata/PrivateDNSZoneGroup.yaml new file mode 100644 index 0000000000..7514f16636 --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/testdata/PrivateDNSZoneGroup.yaml @@ -0,0 +1,2401 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 21 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus"}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "21" + Content-Type: + - application/json + User-Agent: + - ccm-resource-group-clien azsdk-go-armresources/v1.2.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aks-cit-PrivateDNSZoneGroup?api-version=2021-04-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 251 + uncompressed: false + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup","name":"aks-cit-PrivateDNSZoneGroup","type":"Microsoft.Resources/resourceGroups","location":"eastus","properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "251" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 148 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","properties":{"publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static"},"sku":{"name":"Standard","tier":"Regional"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "148" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 594 + uncompressed: false + body: '{"name":"pip1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","location":"eastus","properties":{"provisioningState":"Updating","resourceGuid":"00000000-0000-0000-0000-000000000000","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "594" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 622 + uncompressed: false + body: '{"name":"pip1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","ipAddress":"52.170.58.30","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","idleTimeoutInMinutes":4,"ipTags":[],"ddosSettings":{"protectionMode":"VirtualNetworkInherited"}},"type":"Microsoft.Network/publicIPAddresses","sku":{"name":"Standard","tier":"Regional"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "622" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16498" + status: 200 OK + code: 200 + duration: 200ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 792 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","properties":{"frontendIPConfigurations":[{"name":"frontendConfig1","properties":{"publicIPAddress":{"etag":"W/\"00000000-0000-0000-0000-000000000000\"","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1","location":"eastus","name":"pip1","properties":{"ddosSettings":{"protectionMode":"VirtualNetworkInherited"},"idleTimeoutInMinutes":4,"ipAddress":"52.170.58.30","ipTags":[],"provisioningState":"Succeeded","publicIPAddressVersion":"IPv4","publicIPAllocationMethod":"Static","resourceGuid":"00000000-0000-0000-0000-000000000000"},"sku":{"name":"Standard","tier":"Regional"},"type":"Microsoft.Network/publicIPAddresses"}}}]},"sku":{"name":"Standard","tier":"Regional"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "792" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1163 + uncompressed: false + body: '{"name":"lb1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/loadBalancers","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","frontendIPConfigurations":[{"name":"frontendConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/frontendConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/loadBalancers/frontendIPConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","publicIPAddress":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1"}}}],"backendAddressPools":[],"loadBalancingRules":[],"probes":[],"inboundNatRules":[],"outboundRules":[],"inboundNatPools":[]},"sku":{"name":"Standard","tier":"Regional"}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1163" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1163 + uncompressed: false + body: '{"name":"lb1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/loadBalancers","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","frontendIPConfigurations":[{"name":"frontendConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/frontendConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/loadBalancers/frontendIPConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","publicIPAddress":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1"}}}],"backendAddressPools":[],"loadBalancingRules":[],"probes":[],"inboundNatRules":[],"outboundRules":[],"inboundNatPools":[]},"sku":{"name":"Standard","tier":"Regional"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1163" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 254 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","properties":{"addressSpace":{"addressPrefixes":["10.1.0.0/16"]},"subnets":[{"name":"subnet1","properties":{"addressPrefix":"10.1.0.0/24","privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Disabled"}}]}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "254" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1018 + uncompressed: false + body: '{"name":"vnet1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Updating","resourceGuid":"00000000-0000-0000-0000-000000000000","addressSpace":{"addressPrefixes":["10.1.0.0/16"]},"privateEndpointVNetPolicies":"Disabled","subnets":[{"name":"subnet1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","properties":{"provisioningState":"Updating","addressPrefix":"10.1.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Disabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1018" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1020 + uncompressed: false + body: '{"name":"vnet1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","addressSpace":{"addressPrefixes":["10.1.0.0/16"]},"privateEndpointVNetPolicies":"Disabled","subnets":[{"name":"subnet1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.1.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Disabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1020" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 1258 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","properties":{"ipConfigurations":[{"name":"ipConfig1","properties":{"primary":true,"privateIPAddressVersion":"IPv4","subnet":{"etag":"W/\"00000000-0000-0000-0000-000000000000\"","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","name":"subnet1","properties":{"addressPrefix":"10.1.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Disabled","provisioningState":"Succeeded"},"type":"Microsoft.Network/virtualNetworks/subnets"}}}],"loadBalancerFrontendIpConfigurations":[{"etag":"W/\"00000000-0000-0000-0000-000000000000\"","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/frontendConfig1","name":"frontendConfig1","properties":{"privateIPAllocationMethod":"Dynamic","provisioningState":"Succeeded","publicIPAddress":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1"}},"type":"Microsoft.Network/loadBalancers/frontendIPConfigurations"}]}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "1258" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1646 + uncompressed: false + body: '{"name":"pls1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateLinkServices","location":"eastus","properties":{"provisioningState":"Updating","resourceGuid":"00000000-0000-0000-0000-000000000000","fqdns":[],"alias":"pls1.00000000-0000-0000-0000-000000000000.eastus.azure.privatelinkservice","enableProxyProtocol":false,"loadBalancerFrontendIpConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/frontendConfig1"}],"ipConfigurations":[{"name":"ipConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1/ipConfigurations/ipConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateLinkServices/ipConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"},"primary":true,"privateIPAddressVersion":"IPv4"}}],"privateEndpointConnections":[],"networkInterfaces":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/networkInterfaces/pls1.nic.00000000-0000-0000-0000-000000000000"}]}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1646" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1647 + uncompressed: false + body: '{"name":"pls1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateLinkServices","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","fqdns":[],"alias":"pls1.00000000-0000-0000-0000-000000000000.eastus.azure.privatelinkservice","enableProxyProtocol":false,"loadBalancerFrontendIpConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/frontendConfig1"}],"ipConfigurations":[{"name":"ipConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1/ipConfigurations/ipConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateLinkServices/ipConfigurations","properties":{"provisioningState":"Succeeded","privateIPAllocationMethod":"Dynamic","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"},"primary":true,"privateIPAddressVersion":"IPv4"}}],"privateEndpointConnections":[],"networkInterfaces":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/networkInterfaces/pls1.nic.00000000-0000-0000-0000-000000000000"}]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1647" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 768 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"eastus","properties":{"privateLinkServiceConnections":[{"name":"plsConnection1","properties":{"privateLinkServiceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1"}}],"subnet":{"etag":"W/\"00000000-0000-0000-0000-000000000000\"","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","name":"subnet1","properties":{"addressPrefix":"10.1.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Disabled","provisioningState":"Succeeded"},"type":"Microsoft.Network/virtualNetworks/subnets"}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "768" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1682 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints","location":"eastus","properties":{"provisioningState":"Updating","resourceGuid":"00000000-0000-0000-0000-000000000000","privateLinkServiceConnections":[{"name":"plsConnection1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateLinkServiceConnections/plsConnection1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","properties":{"provisioningState":"Succeeded","privateLinkServiceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1","privateLinkServiceConnectionState":{"status":"Approved","description":"Auto Approved","actionsRequired":"None"}},"type":"Microsoft.Network/privateEndpoints/privateLinkServiceConnections"}],"manualPrivateLinkServiceConnections":[],"customNetworkInterfaceName":"","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"},"ipConfigurations":[],"networkInterfaces":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/networkInterfaces/testResource.nic.00000000-0000-0000-0000-000000000000"}],"customDnsConfigs":[],"isIPv6EnabledPrivateEndpoint":false}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1682" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1683 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"00000000-0000-0000-0000-000000000000","privateLinkServiceConnections":[{"name":"plsConnection1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateLinkServiceConnections/plsConnection1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","properties":{"provisioningState":"Succeeded","privateLinkServiceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1","privateLinkServiceConnectionState":{"status":"Approved","description":"Auto Approved","actionsRequired":"None"}},"type":"Microsoft.Network/privateEndpoints/privateLinkServiceConnections"}],"manualPrivateLinkServiceConnections":[],"customNetworkInterfaceName":"","subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"},"ipConfigurations":[],"networkInterfaces":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/networkInterfaces/testResource.nic.00000000-0000-0000-0000-000000000000"}],"customDnsConfigs":[],"isIPv6EnabledPrivateEndpoint":false}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1683" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 74 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"global","name":"privatezone1.testzone.local","properties":{}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "74" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local?api-version=2024-06-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 2 + uncompressed: false + body: '{}' + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtlODNlMDFiMC1mOTE0LTRiZTgtOGMwZC05Yjk3MDgwYWE3ZmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + Cache-Control: + - private + Content-Length: + - "2" + Content-Type: + - application/json; charset=utf-8 + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtlODNlMDFiMC1mOTE0LTRiZTgtOGMwZC05Yjk3MDgwYWE3ZmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 202 Accepted + code: 202 + duration: 200ms + - id: 16 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtlODNlMDFiMC1mOTE0LTRiZTgtOGMwZC05Yjk3MDgwYWE3ZmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - private + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 17 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local?api-version=2024-06-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 697 + uncompressed: false + body: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/aks-cit-privatednszonegroup\/providers\/Microsoft.Network\/privateDnsZones\/privatezone1.testzone.local","name":"privatezone1.testzone.local","type":"Microsoft.Network\/privateDnsZones","etag":"00000000-0000-0000-0000-000000000000","location":"global","properties":{"internalId":"SW1tdXRhYmxlWm9uZUlkZW50aXR5O2JmYjg1NGY5LWY4ZDItNDY5Ni05ZTY5LTFkZDliOTc3ZmYyYTsw","maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - private + Content-Length: + - "697" + Content-Type: + - application/json; charset=utf-8 + Etag: + - 00000000-0000-0000-0000-000000000000 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 18 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 256 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"location":"global","name":"testResource","properties":{"registrationEnabled":true,"virtualNetwork":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1"}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "256" + Content-Type: + - application/json + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local/virtualNetworkLinks/testResource?api-version=2024-06-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 2 + uncompressed: false + body: '{}' + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTIyYTA3N2MtZGUyYy00YWNmLThjNDctNzhhZDhjMjZkYTA3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + Cache-Control: + - private + Content-Length: + - "2" + Content-Type: + - application/json; charset=utf-8 + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTIyYTA3N2MtZGUyYy00YWNmLThjNDctNzhhZDhjMjZkYTA3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 202 Accepted + code: 202 + duration: 200ms + - id: 19 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTIyYTA3N2MtZGUyYy00YWNmLThjNDctNzhhZDhjMjZkYTA3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - private + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 20 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local/virtualNetworkLinks/testResource?api-version=2024-06-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 666 + uncompressed: false + body: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/aks-cit-privatednszonegroup\/providers\/Microsoft.Network\/privateDnsZones\/privatezone1.testzone.local\/virtualNetworkLinks\/testresource","name":"testresource","type":"Microsoft.Network\/privateDnsZones\/virtualNetworkLinks","etag":"\"00000000-0000-0000-0000-000000000000\"","location":"global","properties":{"provisioningState":"Succeeded","registrationEnabled":true,"virtualNetwork":{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/aks-cit-PrivateDNSZoneGroup\/providers\/Microsoft.Network\/virtualNetworks\/vnet1"},"virtualNetworkLinkState":"Completed"}}' + headers: + Cache-Control: + - private + Content-Length: + - "666" + Content-Type: + - application/json; charset=utf-8 + Etag: + - '"00000000-0000-0000-0000-000000000000"' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 21 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 290 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"name":"testResource","properties":{"privateDnsZoneConfigs":[{"name":"zoneConfig1","properties":{"privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local"}}]}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "290" + Content-Type: + - application/json + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1046 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups","properties":{"provisioningState":"Updating","privateDnsZoneConfigs":[{"name":"zoneConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource/privateDnsZoneConfigs/zoneConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs","properties":{"provisioningState":"Updating","privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local","recordSets":[]}}]}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1046" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 201 Created + code: 201 + duration: 200ms + - id: 22 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 23 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1048 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups","properties":{"provisioningState":"Succeeded","privateDnsZoneConfigs":[{"name":"zoneConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource/privateDnsZoneConfigs/zoneConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs","properties":{"provisioningState":"Succeeded","privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local","recordSets":[]}}]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1048" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 24 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1048 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups","properties":{"provisioningState":"Succeeded","privateDnsZoneConfigs":[{"name":"zoneConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource/privateDnsZoneConfigs/zoneConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs","properties":{"provisioningState":"Succeeded","privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local","recordSets":[]}}]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1048" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 25 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResourcenotfound?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 95 + uncompressed: false + body: '{"error":{"code":"NotFound","message":"Resource testResourcenotfound not found.","details":[]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "95" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 404 Not Found + code: 404 + duration: 200ms + - id: 26 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 290 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: '{"name":"testResource","properties":{"privateDnsZoneConfigs":[{"name":"zoneConfig1","properties":{"privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local"}}]}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "290" + Content-Type: + - application/json + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: PUT + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1048 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups","properties":{"provisioningState":"Succeeded","privateDnsZoneConfigs":[{"name":"zoneConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource/privateDnsZoneConfigs/zoneConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs","properties":{"provisioningState":"Succeeded","privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local","recordSets":[]}}]}}' + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "1048" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Writes: + - "11999" + status: 200 OK + code: 200 + duration: 200ms + - id: 27 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 1048 + uncompressed: false + body: '{"name":"testResource","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups","properties":{"provisioningState":"Succeeded","privateDnsZoneConfigs":[{"name":"zoneConfig1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource/privateDnsZoneConfigs/zoneConfig1","etag":"W/\"00000000-0000-0000-0000-000000000000\"","type":"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs","properties":{"provisioningState":"Succeeded","privateDnsZoneId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local","recordSets":[]}}]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "1048" + Content-Type: + - application/json; charset=utf-8 + Etag: + - W/"00000000-0000-0000-0000-000000000000" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 28 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource/privateDnsZoneGroups/testResource?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 29 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - ccm-PrivateDNSZoneGroup- azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 30 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local/virtualNetworkLinks/testresource?api-version=2024-06-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MTM1NWQ2ZWMtMGY2OC00ZGUzLThkZWMtYmQzMjU2YzM2MDE2XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + Cache-Control: + - private + Content-Length: + - "0" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MTM1NWQ2ZWMtMGY2OC00ZGUzLThkZWMtYmQzMjU2YzM2MDE2XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 202 Accepted + code: 202 + duration: 200ms + - id: 31 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MTM1NWQ2ZWMtMGY2OC00ZGUzLThkZWMtYmQzMjU2YzM2MDE2XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - private + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 32 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateDnsZones/privatezone1.testzone.local?api-version=2024-06-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTsyYjVkZTljYS0xMjM4LTRiYTMtYjFmMC1iN2VjZjQ4MWNlZDFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + Cache-Control: + - private + Content-Length: + - "0" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTsyYjVkZTljYS0xMjM4LTRiYTMtYjFmMC1iN2VjZjQ4MWNlZDFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 202 Accepted + code: 202 + duration: 200ms + - id: 33 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-privatednszonegroup/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTsyYjVkZTljYS0xMjM4LTRiYTMtYjFmMC1iN2VjZjQ4MWNlZDFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - private + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Powered-By: + - ASP.NET + status: 200 OK + code: 200 + duration: 200ms + - id: 34 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateEndpoints/testResource?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 35 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 36 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/privateLinkServices/pls1?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 37 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 38 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/loadBalancers/lb1?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 39 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 40 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/publicIPAddresses/pip1?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 41 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 42 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-PrivateDNSZoneGroup/providers/Microsoft.Network/virtualNetworks/vnet1?api-version=2024-03-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Azure-Asyncnotification: + - Enabled + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 43 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - azsdk-go-armnetwork/v6.1.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/00000000-0000-0000-0000-000000000000?api-version=2024-03-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 22 + uncompressed: false + body: '{"status":"Succeeded"}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "22" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms + - id: 44 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + Accept: + - application/json + User-Agent: + - ccm-resource-group-clien azsdk-go-armresources/v1.2.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aks-cit-PrivateDNSZoneGroup?api-version=2021-04-01 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BS1M6MkRDSVQ6MkRQUklWQVRFRE5TWk9ORUdST1VQLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2021-04-01&c=c&h=h&s=s&t=t + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Deletes: + - "11999" + status: 202 Accepted + code: 202 + duration: 200ms + - id: 45 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [] + trailer: {} + host: management.azure.com + remote_addr: "" + request_uri: "" + body: "" + form: {} + headers: + User-Agent: + - ccm-resource-group-clien azsdk-go-armresources/v1.2.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BS1M6MkRDSVQ6MkRQUklWQVRFRE5TWk9ORUdST1VQLUVBU1RVUyIsImpvYkxvY2F0aW9uIjoiZWFzdHVzIn0?api-version=2021-04-01&c=c&h=h&s=s&t=t + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [] + trailer: {} + content_length: 0 + uncompressed: false + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Cache: + - CONFIG_NOCACHE + X-Content-Type-Options: + - nosniff + X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: + - "16499" + status: 200 OK + code: 200 + duration: 200ms diff --git a/pkg/azclient/privatednszonegroupclient/zz_generated_client.go b/pkg/azclient/privatednszonegroupclient/zz_generated_client.go new file mode 100644 index 0000000000..964dd5b80b --- /dev/null +++ b/pkg/azclient/privatednszonegroupclient/zz_generated_client.go @@ -0,0 +1,101 @@ +// /* +// Copyright The Kubernetes Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// */ + +// Code generated by client-gen. DO NOT EDIT. +package privatednszonegroupclient + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing" + armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6" + + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/metrics" + "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" +) + +type Client struct { + *armnetwork.PrivateDNSZoneGroupsClient + subscriptionID string + tracer tracing.Tracer +} + +func New(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (Interface, error) { + if options == nil { + options = utils.GetDefaultOption() + } + tr := options.TracingProvider.NewTracer(utils.ModuleName, utils.ModuleVersion) + + client, err := armnetwork.NewPrivateDNSZoneGroupsClient(subscriptionID, credential, options) + if err != nil { + return nil, err + } + return &Client{ + PrivateDNSZoneGroupsClient: client, + subscriptionID: subscriptionID, + tracer: tr, + }, nil +} + +const GetOperationName = "PrivateDNSZoneGroupsClient.Get" + +// Get gets the PrivateDNSZoneGroup +func (client *Client) Get(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (result *armnetwork.PrivateDNSZoneGroup, err error) { + + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "get") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, GetOperationName, client.tracer, nil) + defer endSpan(err) + resp, err := client.PrivateDNSZoneGroupsClient.Get(ctx, resourceGroupName, parentResourceName, resourceName, nil) + if err != nil { + return nil, err + } + //handle statuscode + return &resp.PrivateDNSZoneGroup, nil +} + +const CreateOrUpdateOperationName = "PrivateDNSZoneGroupsClient.Create" + +// CreateOrUpdate creates or updates a PrivateDNSZoneGroup. +func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parentResourceName string, resource armnetwork.PrivateDNSZoneGroup) (result *armnetwork.PrivateDNSZoneGroup, err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "create_or_update") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, CreateOrUpdateOperationName, client.tracer, nil) + defer endSpan(err) + resp, err := utils.NewPollerWrapper(client.PrivateDNSZoneGroupsClient.BeginCreateOrUpdate(ctx, resourceGroupName, resourceName, parentResourceName, resource, nil)).WaitforPollerResp(ctx) + if err != nil { + return nil, err + } + if resp != nil { + return &resp.PrivateDNSZoneGroup, nil + } + return nil, nil +} + +const DeleteOperationName = "PrivateDNSZoneGroupsClient.Delete" + +// Delete deletes a PrivateDNSZoneGroup by name. +func (client *Client) Delete(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "PrivateDNSZoneGroup", "delete") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, DeleteOperationName, client.tracer, nil) + defer endSpan(err) + _, err = utils.NewPollerWrapper(client.BeginDelete(ctx, resourceGroupName, parentResourceName, resourceName, nil)).WaitforPollerResp(ctx) + return err +} diff --git a/pkg/azclient/virtualnetworklinkclient/custom_test.go b/pkg/azclient/virtualnetworklinkclient/custom_test.go index e07a551ce2..c73d2b25a3 100644 --- a/pkg/azclient/virtualnetworklinkclient/custom_test.go +++ b/pkg/azclient/virtualnetworklinkclient/custom_test.go @@ -102,16 +102,6 @@ func init() { } afterAllFunc = func(ctx context.Context) { - virtualNetworkLinksClient := privatednsClientFactory.NewVirtualNetworkLinksClient() - linkPoller, err := virtualNetworkLinksClient.BeginDelete(ctx, resourceGroupName, parentResourceName, resourceName, nil) - Expect(err).NotTo(HaveOccurred()) - _, err = linkPoller.PollUntilDone(ctx, &runtime.PollUntilDoneOptions{ - Frequency: 1 * time.Second, - }) - Expect(err).NotTo(HaveOccurred()) - if recorder.IsNewCassette() { - time.Sleep(10 * time.Second) - } privatednsClient = privatednsClientFactory.NewPrivateZonesClient() dnsPoller, err := privatednsClient.BeginDelete(ctx, resourceGroupName, parentResourceName, nil) Expect(err).NotTo(HaveOccurred()) diff --git a/pkg/azclient/virtualnetworklinkclient/interface.go b/pkg/azclient/virtualnetworklinkclient/interface.go index 3f4af5908c..fce7d42874 100644 --- a/pkg/azclient/virtualnetworklinkclient/interface.go +++ b/pkg/azclient/virtualnetworklinkclient/interface.go @@ -23,8 +23,9 @@ import ( "sigs.k8s.io/cloud-provider-azure/pkg/azclient/utils" ) -// +azure:client:verbs=get;createorupdate,resource=PrivateZone,subResource=VirtualNetworkLink,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns,packageAlias=armprivatedns,clientName=VirtualNetworkLinksClient,expand=false,rateLimitKey=virtualNetworkRateLimit +// +azure:client:verbs=get;createorupdate;delete,resource=PrivateZone,subResource=VirtualNetworkLink,packageName=github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns,packageAlias=armprivatedns,clientName=VirtualNetworkLinksClient,expand=false,rateLimitKey=virtualNetworkRateLimit type Interface interface { utils.SubResourceGetFunc[armprivatedns.VirtualNetworkLink] utils.SubResourceCreateOrUpdateFunc[armprivatedns.VirtualNetworkLink] + utils.SubResourceDeleteFunc[armprivatedns.VirtualNetworkLink] } diff --git a/pkg/azclient/virtualnetworklinkclient/mock_virtualnetworklinkclient/interface.go b/pkg/azclient/virtualnetworklinkclient/mock_virtualnetworklinkclient/interface.go index a603655a6a..3ca99be15e 100644 --- a/pkg/azclient/virtualnetworklinkclient/mock_virtualnetworklinkclient/interface.go +++ b/pkg/azclient/virtualnetworklinkclient/mock_virtualnetworklinkclient/interface.go @@ -73,6 +73,20 @@ func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, pare return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, parentResourceName, resourceName, resourceParam) } +// Delete mocks base method. +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, parentResourceName, resourceName string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, parentResourceName, resourceName) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, parentResourceName, resourceName any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, parentResourceName, resourceName) +} + // Get mocks base method. func (m *MockInterface) Get(ctx context.Context, resourceGroupName, parentResourceName, resourceName string) (*armprivatedns.VirtualNetworkLink, error) { m.ctrl.T.Helper() diff --git a/pkg/azclient/virtualnetworklinkclient/testdata/VirtualNetworkLink.yaml b/pkg/azclient/virtualnetworklinkclient/testdata/VirtualNetworkLink.yaml index 824d99d758..3ef7b38197 100644 --- a/pkg/azclient/virtualnetworklinkclient/testdata/VirtualNetworkLink.yaml +++ b/pkg/azclient/virtualnetworklinkclient/testdata/VirtualNetworkLink.yaml @@ -91,7 +91,7 @@ interactions: body: '{}' headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtmY2E1ZDMwNy0xOWQyLTRkMmYtYjRkZS04NDcxZDcxNGM5YzNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0MTUzODA2NS1hYjUxLTRhNDAtYjRhZS0wNmU1Yjg0YWYwMmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t Cache-Control: - private Content-Length: @@ -99,7 +99,7 @@ interactions: Content-Type: - application/json; charset=utf-8 Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtmY2E1ZDMwNy0xOWQyLTRkMmYtYjRkZS04NDcxZDcxNGM5YzNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0MTUzODA2NS1hYjUxLTRhNDAtYjRhZS0wNmU1Yjg0YWYwMmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Aspnet-Version: @@ -129,7 +129,7 @@ interactions: headers: User-Agent: - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTtmY2E1ZDMwNy0xOWQyLTRkMmYtYjRkZS04NDcxZDcxNGM5YzNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0MTUzODA2NS1hYjUxLTRhNDAtYjRhZS0wNmU1Yjg0YWYwMmNfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t method: GET response: proto: HTTP/2.0 @@ -186,7 +186,7 @@ interactions: trailer: {} content_length: 752 uncompressed: false - body: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/aks-cit-virtualnetworklink\/providers\/Microsoft.Network\/privateDnsZones\/aks-cit-privatednszone-cit.privatelink.global.azmk8s.io","name":"aks-cit-privatednszone-cit.privatelink.global.azmk8s.io","type":"Microsoft.Network\/privateDnsZones","etag":"00000000-0000-0000-0000-000000000000","location":"global","properties":{"internalId":"SW1tdXRhYmxlWm9uZUlkZW50aXR5O2QyYWY5ODkxLTU2Y2YtNGE4MS1hNDY0LWMyM2ZiMGJjNmI1Njsw","maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' + body: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/aks-cit-virtualnetworklink\/providers\/Microsoft.Network\/privateDnsZones\/aks-cit-privatednszone-cit.privatelink.global.azmk8s.io","name":"aks-cit-privatednszone-cit.privatelink.global.azmk8s.io","type":"Microsoft.Network\/privateDnsZones","etag":"00000000-0000-0000-0000-000000000000","location":"global","properties":{"internalId":"SW1tdXRhYmxlWm9uZUlkZW50aXR5O2Q2ZTI5Yzg3LWE5YjAtNDc0Yy1iMjc0LWRlZjRhMDFlYjMwYjsw","maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' headers: Cache-Control: - private @@ -403,7 +403,7 @@ interactions: body: '{}' headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTkwZGFlNjktNmYzYy00ZTQzLTk1ZDgtNzQ1ZDk0ZGI0NDRlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YWNjM2YyZjEtMTVjMi00NTRlLTg3MDktYzM5M2NlZDVmYjY5XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Cache-Control: - private Content-Length: @@ -411,7 +411,7 @@ interactions: Content-Type: - application/json; charset=utf-8 Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTkwZGFlNjktNmYzYy00ZTQzLTk1ZDgtNzQ1ZDk0ZGI0NDRlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YWNjM2YyZjEtMTVjMi00NTRlLTg3MDktYzM5M2NlZDVmYjY5XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Aspnet-Version: @@ -441,7 +441,7 @@ interactions: headers: User-Agent: - ccm-VirtualNetworkLink-c azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7OTkwZGFlNjktNmYzYy00ZTQzLTk1ZDgtNzQ1ZDk0ZGI0NDRlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YWNjM2YyZjEtMTVjMi00NTRlLTg3MDktYzM5M2NlZDVmYjY5XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t method: GET response: proto: HTTP/2.0 @@ -658,7 +658,7 @@ interactions: body: '{}' headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YjJlMmNkMmEtNmQ2YS00ZDJlLTg2MzYtMDM5M2I5ZDJlYWY3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7ZGRhNmFkOWQtYzBlMS00ZTFmLWE0MTktZWU5ZjZkMWZkMzhhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Cache-Control: - private Content-Length: @@ -666,7 +666,7 @@ interactions: Content-Type: - application/json; charset=utf-8 Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YjJlMmNkMmEtNmQ2YS00ZDJlLTg2MzYtMDM5M2I5ZDJlYWY3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7ZGRhNmFkOWQtYzBlMS00ZTFmLWE0MTktZWU5ZjZkMWZkMzhhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Aspnet-Version: @@ -696,7 +696,7 @@ interactions: headers: User-Agent: - ccm-VirtualNetworkLink-c azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7YjJlMmNkMmEtNmQ2YS00ZDJlLTg2MzYtMDM5M2I5ZDJlYWY3XzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRWaXJ0dWFsTmV0d29ya0xpbms7ZGRhNmFkOWQtYzBlMS00ZTFmLWE0MTktZWU5ZjZkMWZkMzhhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t method: GET response: proto: HTTP/2.0 @@ -793,7 +793,7 @@ interactions: Accept: - application/json User-Agent: - - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + - ccm-VirtualNetworkLink-c azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-VirtualNetworkLink/providers/Microsoft.Network/privateDnsZones/aks-cit-privatednszone-cit.privatelink.global.azmk8s.io/virtualNetworkLinks/testResource?api-version=2024-06-01 method: DELETE response: @@ -807,13 +807,13 @@ interactions: body: "" headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7ZGNlZmMwMDEtMmZkZi00NTAzLTgxMzEtOTcxYjI1N2EwYTFlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MWU0YzFjY2QtNGY0OS00YWNhLWIwY2ItNWQ0MmNiNzBhZjBhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Cache-Control: - private Content-Length: - "0" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7ZGNlZmMwMDEtMmZkZi00NTAzLTgxMzEtOTcxYjI1N2EwYTFlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MWU0YzFjY2QtNGY0OS00YWNhLWIwY2ItNWQ0MmNiNzBhZjBhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Aspnet-Version: @@ -842,8 +842,8 @@ interactions: form: {} headers: User-Agent: - - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7ZGNlZmMwMDEtMmZkZi00NTAzLTgxMzEtOTcxYjI1N2EwYTFlXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t + - ccm-VirtualNetworkLink-c azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVWaXJ0dWFsTmV0d29ya0xpbms7MWU0YzFjY2QtNGY0OS00YWNhLWIwY2ItNWQ0MmNiNzBhZjBhXzhlY2FkZmM5LWQxYTMtNGVhNC1iODQ0LTBkOWY4N2U0ZDdjOA==?api-version=2024-06-01&c=c&h=h&s=s&t=t method: GET response: proto: HTTP/2.0 @@ -905,13 +905,13 @@ interactions: body: "" headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs3NWY2MjRmOS0wYzNjLTQ5NGEtOTIzMS05ZDZjNWQ2NDU4YmFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs2NTYzNDExYi1hZWJkLTRhYWUtYjg0OC1mZTIyY2YzM2Q3MGJfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t Cache-Control: - private Content-Length: - "0" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs3NWY2MjRmOS0wYzNjLTQ5NGEtOTIzMS05ZDZjNWQ2NDU4YmFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs2NTYzNDExYi1hZWJkLTRhYWUtYjg0OC1mZTIyY2YzM2Q3MGJfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Aspnet-Version: @@ -941,7 +941,7 @@ interactions: headers: User-Agent: - azsdk-go-armprivatedns/v1.3.0 (go1.23.2; linux) - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs3NWY2MjRmOS0wYzNjLTQ5NGEtOTIzMS05ZDZjNWQ2NDU4YmFfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aks-cit-virtualnetworklink/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtEZWxldGVQcml2YXRlRG5zWm9uZTs2NTYzNDExYi1hZWJkLTRhYWUtYjg0OC1mZTIyY2YzM2Q3MGJfOGVjYWRmYzktZDFhMy00ZWE0LWI4NDQtMGQ5Zjg3ZTRkN2M4?api-version=2024-06-01&c=c&h=h&s=s&t=t method: GET response: proto: HTTP/2.0 diff --git a/pkg/azclient/virtualnetworklinkclient/virtualnetworklinkclient_test.go b/pkg/azclient/virtualnetworklinkclient/virtualnetworklinkclient_test.go index fa7ba2d510..39826b282d 100644 --- a/pkg/azclient/virtualnetworklinkclient/virtualnetworklinkclient_test.go +++ b/pkg/azclient/virtualnetworklinkclient/virtualnetworklinkclient_test.go @@ -73,6 +73,13 @@ var _ = ginkgo.Describe("VirtualNetworkLinksClient", ginkgo.Ordered, func() { }) }) + ginkgo.When("deletion requests are raised", func() { + ginkgo.It("should not return error", func(ctx context.Context) { + err = realClient.Delete(ctx, resourceGroupName, parentResourceName, resourceName) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + }) + if afterAllFunc != nil { ginkgo.AfterAll(afterAllFunc) } diff --git a/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go b/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go index ff6151c961..8e578f7b15 100644 --- a/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go +++ b/pkg/azclient/virtualnetworklinkclient/zz_generated_client.go @@ -87,3 +87,15 @@ func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName stri } return nil, nil } + +const DeleteOperationName = "VirtualNetworkLinksClient.Delete" + +// Delete deletes a VirtualNetworkLink by name. +func (client *Client) Delete(ctx context.Context, resourceGroupName string, parentResourceName string, resourceName string) (err error) { + metricsCtx := metrics.BeginARMRequest(client.subscriptionID, resourceGroupName, "VirtualNetworkLink", "delete") + defer func() { metricsCtx.Observe(ctx, err) }() + ctx, endSpan := runtime.StartSpan(ctx, DeleteOperationName, client.tracer, nil) + defer endSpan(err) + _, err = utils.NewPollerWrapper(client.BeginDelete(ctx, resourceGroupName, parentResourceName, resourceName, nil)).WaitforPollerResp(ctx) + return err +}