Closed ghost closed 6 years ago
Thank you for the report of this issue, assigning to the area owner
@cbroussa Apologize for the delay here. The MSDN article you linked in the comment above is for creating a hosted service (exposed as cloud service in management portal) in Azure. The CloudServiceManagement client is used to create a "cloud service" that is only meant to be internally used by Azure Resource Providers, like Scheduler for instance. More info on this is here: https://msdn.microsoft.com/en-us/library/azure/dn528943.aspx
To create the above cloud service using CloudServiceManagementClient, use this as an example:
CertificateCloudCredentials certCloudCredentials = new CertificateCloudCredentials("subId", new System.Security.Cryptography.X509Certificates.X509Certificate2("MyManagemetCert.pfx", "[redacted]", X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable));
CloudServiceManagementClient csmClient = new CloudServiceManagementClient(certCloudCredentials);
please reopen if this is still an issue.
Just installed this Git package and tried to create a CloudService. Using the provided example for creating a storage account I inferred what would be required for CloudService creation and wrote the following:
Unfortunately I get an error back stating that the etag is not satisfied. I have a few questions that hopefully someone can answer: 1) How does one determine what conditions are in place by this etag and how to meet them? 2) Why does the PUT body of the XML that's sent with this request not contain the cloudServiceName parameter that I've passed in?
Also for what its worth I wrote a quick app to directly invoke the REST API via the documentation here (http://msdn.microsoft.com/en-us/library/gg441304.aspx) and I'm a bit confused why the documentation is so different from what the library is actually doing. For instance the MSDN article says send a POST to /[subscription-id]/services/hostedservices where as the library is sending a PUT to /[subscription-id]/CloudServices. Another key difference is the XML that's being sent. Per the MSDN article I've posted
And the library puts
Any help here would be greatly appreciated.