Library or service name.
Azure.FluentAPI.
What library or service is this request related to? ARM Deployments at Subscription Scope
Is your feature request related to a problem? Please describe.
I would like IAzure.Deployments.GetById() to work with a subscription level deployment, or for IAzure.Deployments.Inner.GetBy*() to return a richer output object.
Today, I am able to do an ARM Deployment at Subscription Scope using the Fluent API with the sample referenced here #13609. This works great, however the resultant object from this operation returns very little info, even when waiting for the deployment to complete.
For instance, when deploying an ARM Template to a Resource Group with the Fluent API, I receive an IDeployment object which contains a member of DeploymentOperations which contains a List() of all of the operations, including their ARM Resource ID, Name, ResourceName and ResourceType.
However, when I do a Subscription Level deployment using the Fluent API like so:
var deployment = azure.Deployments.Inner.BeginCreateOrUpdateAtSubscriptionScopeAsync("subScriptionDeploy", deploymentParam).Result;
The resultant object from this operation is an DeploymentExtendedInner object which does not have a list of Resource Operations at all.
If I fall back to using the non-fluent ResourceManagementClient classe' BeginCreateOrUpdateAtSubscriptionScopeAsync() method, which does the same operation but returns a DeploymentExtended object with a richer list of created or touched resources under Properties.OutputResources.
Microsoft.Azure.Management.ResourceManager bv3.7.3-preview
Azure App Service
Visual Studio 2019
azure.Deployments.Inner.BeginCreateOrUpdateAtSubscriptionScopeAsync and ResourceManagementClient.BeginCreateOrUpdateAtSubscriptionScopeAsync are exactly same method (only come from different chain of references). And hence the API referred from Inner is actually not Fluent API.
And hence you would have to stick with the non-Fluent API for deployment operations as well.
IPage<DeploymentOperationInner> operations = azure.Deployments.Manager.Inner.DeploymentOperations.ListAtSubscriptionScopeAsync("dpA").Result;
Thanks Wei, that was very quick!
Most helpful comment
azure.Deployments.Inner.BeginCreateOrUpdateAtSubscriptionScopeAsyncandResourceManagementClient.BeginCreateOrUpdateAtSubscriptionScopeAsyncare exactly same method (only come from different chain of references). And hence the API referred fromInneris actually not Fluent API.And hence you would have to stick with the non-Fluent API for deployment operations as well.