Azure / azure-rest-api-specs-examples

SDK examples for azure-rest-api-specs
MIT License
21 stars 13 forks source link

Latest available armeventgrid SDK for Golang does not contain NewCaCertificatesClient #3239

Open jobeland opened 1 year ago

jobeland commented 1 year ago

Link to sample

https://learn.microsoft.com/en-us/rest/api/eventgrid/controlplane-version2023-06-01-preview/ca-certificates/create-or-update?tabs=Go

Library name and version

github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2 v2.1.1

Language of the Sample

Sample Issue Type

Issue details

The sample for uploading a CA Certificate to Event Grid Namespace shows to use the NewCaCertificatesClient() function. That function doesn't seem to exist in the latest (2.1.1) version of armeventgrid. From the linked source code (https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/resourcemanager/eventgrid/armeventgrid/client_factory.go) it appears to exist, but in 2.2.0-beta.1 version, which is not published or publicly available, and therefore unable to upload a certificate.

Expected behavior

Function to exist in latest package

Actual behavior

Function is undefined in latest package

Reproduction Steps

  1. go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/eventgrid/armeventgrid/v2
  2. Copy and paste sample
  3. go build

Environment

Windows 11, go1.18.2, vs code

Alancere commented 1 year ago

CaCertificates operation was introduced in Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json, and the Go SDK version generated based on this is v2.2.0-beta.1. Status is Beta