-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Closed
Copy link
Labels
ARMMgmtThis issue is related to a management package.This issue is related to a management package.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Library name and version
Azure.ResourceManager.Chaos 1.0.0-beta.1
Describe the bug
I'm trying to use the code below to set the Target and Capability for a VMSS, I'm able to create the Target, but I get a 404 when trying to create the Capability:
TokenCredential azureCredential = new DefaultAzureCredential();
ArmClient client = new ArmClient(azureCredential);
SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync();
ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync("<Resource Group Name>");
VirtualMachineScaleSetResource vmss = await resourceGroup.GetVirtualMachineScaleSetAsync("<Virtual Machine Scale Set Name>");
TargetCollection vmssTargets = resourceGroup.GetTargets(vmss.Id.ResourceType.Namespace, vmss.Id.ResourceType.Type, vmss.Id.Name);
TargetData targetData = new TargetData(new Dictionary<string, BinaryData>());
TargetResource vmssTarget = (await vmssTargets.CreateOrUpdateAsync(Azure.WaitUntil.Completed, "Microsoft-VirtualMachineScaleSet", targetData)).Value;
CapabilityCollection vmssTargetCapabilities = vmssTarget.GetCapabilities();
CapabilityData capabilityData = new CapabilityData();
CapabilityResource vmssCapability = (await vmssTargetCapabilities.CreateOrUpdateAsync(Azure.WaitUntil.Completed, "Shutdown-1.0", capabilityData)).Value;
Expected behavior
I expect to see this URL to set the capability:
Actual behavior
But capturing the call with Fiddler, I'm seeing that the first provider is set to Microsoft.Chaos, instead of Microsoft.Compute:
Reproduction Steps
Execute the code in "Describe the bug" using a C# Console application. I'm using .NET Framework 4.7.2.
Environment
No response
Metadata
Metadata
Assignees
Labels
ARMMgmtThis issue is related to a management package.This issue is related to a management package.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that