-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no way to create a Subscription using this SDK. #23885
Comments
@saqib-ali-cof could you turn on logging by setting environment variable AZURE_SDK_GO_LOGGING to all and configure policy.LogOption to print the body of this call? Please help to check the details info in the raw response. |
@jliusan Perhaps I misunderstand you. I can turn on logging, but what exactly do you want me to run? |
first, you need to have an api management service. then you could use this api to create new subscription. the first two parameter is the resource group and service name of your api management service, the third parameter is just a name for the new subscription you want to create. |
@tadelesh thank you. But why do I need a Resource Group to create a subscription? Whats the relationship between the two? What if I don't have a resource group? Then I cannot create a subscription?? |
the resource group is where you create the api management service. it is only used to locate the api management service you use to create subscription. it is not related with the subscription you want to create. |
Hi @saqib-ali-cof. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @saqib-ali-cof, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
There appears to be no way to create a subscription using the Azure SDK for GoLang.
Here is sample code I found to do something similar:
However, this doesn't seem to work if the subscription doesn't already exist.
Since I want to create a brand new Subscription, what do I pass in for the first 3 arguments to
CreateOrUpdate()
?It needs a
resourceGroupName
, aserviceName
and anSID
.Those three values are used by
CreateOrUpdate()
to construct the following URL:urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}"
The text was updated successfully, but these errors were encountered: