Context
During adversarial review of PR LeanerCloud/cloud-commitments-cli#1208, all Azure service clients were found to use `"Shared"` as a raw string literal for the `appliedScopeType` field in reservation purchase request bodies.
The Azure SDK defines a typed enum for this:
```go
armreservations.AppliedScopeTypeShared // = "Shared"
armreservations.AppliedScopeTypeSingle // = "Single"
```
Files affected
All service clients that build a purchase request body:
- `providers/azure/services/cache/client.go`
- `providers/azure/services/compute/client.go`
- `providers/azure/services/cosmosdb/client.go`
- `providers/azure/services/database/client.go`
- `providers/azure/services/managedredis/client.go`
- `providers/azure/services/search/client.go`
- `providers/azure/services/synapse/client.go`
Fix
Replace `"appliedScopeType": "Shared"` with `"appliedScopeType": string(armreservations.AppliedScopeTypeShared)` in each client's `PurchaseCommitment` method (7 occurrences, one per service).
Note
This is a code-quality / forward-safety improvement only. The current literal `"Shared"` is the correct value and matches the SDK constant; there is no live bug here. The risk is that a typo in a future edit would not be caught at compile time.
This is a follow-up to PR LeanerCloud/cloud-commitments-cli#1208 which fixed the higher-priority `reservedResourceType` enum correctness bugs.
Context
During adversarial review of PR LeanerCloud/cloud-commitments-cli#1208, all Azure service clients were found to use `"Shared"` as a raw string literal for the `appliedScopeType` field in reservation purchase request bodies.
The Azure SDK defines a typed enum for this:
```go
armreservations.AppliedScopeTypeShared // = "Shared"
armreservations.AppliedScopeTypeSingle // = "Single"
```
Files affected
All service clients that build a purchase request body:
Fix
Replace `"appliedScopeType": "Shared"` with `"appliedScopeType": string(armreservations.AppliedScopeTypeShared)` in each client's `PurchaseCommitment` method (7 occurrences, one per service).
Note
This is a code-quality / forward-safety improvement only. The current literal `"Shared"` is the correct value and matches the SDK constant; there is no live bug here. The risk is that a typo in a future edit would not be caught at compile time.
This is a follow-up to PR LeanerCloud/cloud-commitments-cli#1208 which fixed the higher-priority `reservedResourceType` enum correctness bugs.