简体   繁体   中英

Azure Resource Provider concepts

I try to write my own Resource Provider to create a new Add-On to Azure MarketPlace, but I have got some not clear concepts about the Provider.

If the user wants to get details on a Resource, Azure will do a GET for that particular resource.

<provisioning_endpoint>/subscriptions/<subscription_id>/cloudservices/<cloud_service_name>/resources/<resource_type>/<resourceName>

I know that I can set up the Resource Type at the Publisher Portal under application services//Resource Provider. But what about the Resorce? If I want to create a new service (for example SendGrid did) I don't want to make a Virtual Machine or an Add-on, I want to create ex a Subscription in my Site. Azure will do a GET request to my provider and that request will include the name of the resource. But where/how can I set up the name of the Resource?

I think the Resource is the string that the user can enter in the Portal from "Purchase from Marketplace

I read that Resources are nested under a named entity called a CloudService. Where can I set the name of the CloudService? What could be a possible name of the CloudService in my case? Or I missunderstand the whole working of the Resource Provider?

<provisioning_endpoint>/subscriptions/<subscription_id>/cloudservices/<cloud_service_name>/resources/<resource_type>/<resourceName>

Azure will send you requests to your end point URL. When you split the URL into chunks you will get something like:

[1] => addon
[2] => azure
[3] => resources
[4] => subscriptions
[5] => 6163ffa8-4b05-4bc3-8c45-5656d279c87c
[6] => cloudservices
[7] => Azure-Stores-H4PFJULZHK3OKNFGJZTK5P3XGRVORLB7ZDAZVKEBLZLUVIGNJKGA-West-US
[8] => resources
[9] => marketing2-6460E175-C5B7-4571-9189-7A2630A4CE32
[10] => ContosoAPPSTAGED3

So looking at the line above from the doc and the received URL chunks the resourceName in this case is ContosoAPPSTAGED3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM