Azure / azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
https://docs.microsoft.com/azure/developer/go/
MIT License
1.63k stars 833 forks source link

Retrieve private link subresource and private dns zone via GO sdk #14248

Closed gowrisankar22 closed 3 years ago

gowrisankar22 commented 3 years ago

Hello,

Is there any possible way available to retrieve the subresource and private DNS Zone via golang SDK for the private endpoint creation?

Let me explain in detail.

  1. I have a Postgres created in subscription 1.

/subscriptions/xxxx/resourceGroups/rg1/providers/Microsoft.DBforPostgreSQL/servers/demopostgresql

  1. Creating a private endpoint from subscription 2 using golang SDK. To do that I need to pass the subresource for private endpoint creation. I need to retrieve this subresource in an automated way by looking into the service provided from subscription 1.

  2. Once the endpoint is created I need to know the right private DNS zone to create A record. This information also I need to retrieve in an automated way using gosdk by looking into the service provided from subscription 1.

this is really possible now or are there any alternatives?

For more info: https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns

BRs, Gowrisankar

ArcturusZhang commented 3 years ago

Hi @gowrisankar22 thanks for this issue.

These two functions might help you:

  1. https://github.com/Azure/azure-sdk-for-go/blob/e2799766f88d91bbf2b119e6fc9e7613aab4a4b7/services/postgresql/mgmt/2020-01-01/postgresql/privateendpointconnections.go#L52
  2. https://github.com/Azure/azure-sdk-for-go/blob/e2799766f88d91bbf2b119e6fc9e7613aab4a4b7/services/postgresql/mgmt/2020-01-01/postgresql/privatelinkresources.go#L53-L52
no-response[bot] commented 3 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.