-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Recovery Services] Service URI's don't support being URI Encoded #2284
Comments
Hi @tombuildsstuff thanks for opening this issue. we will be reaching out to the Recovery Services Backup team. |
@tombuildsstuff Do you have request ids (x-ms-client-request-id header) for both scenarios? With that we can investigate in detail on service side. |
@DheerendraRathor not to hand unfortunately - although this should be visible by using the Go SDK (or presumably any of the other SDK's)? Thanks! |
@tombuildsstuff: We still need the request ids for both scenarios. Any idea if you can repro and get it? It would greatly help. Also, since you pointed out that this particular SDK is different, can you please share some of the standard/expected behaviors? I see that you have already mentioned two points.
Anything else to change? |
#customer-response-expected |
@pvrk we're mostly AFK this week - but will try and provide a couple next week |
@tombuildsstuff: Do we have an update? |
@tombuildsstuff : Another gentle reminder. Any update, please? |
Closing this bug since we didn't get an update. Can re-open if updates are available |
👋
So we've been working through adding support for Recovery Services Protected Items to Terraform using the
2016-06-01
SDK fromv18.0.0
.We've noticed an issue when calling methods in this SDK (currently CreateOrUpdate and Get, but presumably all of them are affected) - where the URI encoding used by AutoRest causes 404's to be returned. This particular API (and SDK) is considerably different from the other API's/SDK's available - such that the identifiers are separated by semi-colons.
We're using the following Go code to create the Protected Item (I've tweaked the SDK as explained below to get this to work, but we'll come to that):
Once the Protected Item exists we then obtain it via the Get SDK method using the values from above:
makes the following Request to the Get endpoint:
After some investigation we noticed the segments of the URI were being uri-encoded, which means the semi-colon's are encoded and thus don't come through correctly at the other API. Using this as a hunch - we tweaked the SDK not to uri-encode the
containerName
andprotectedItemName
values, like so (for both CreateOrUpdate and Deleted):which sent the following successful HTTP Request:
In general I'd expect the API to URI-decode the values as needed, but this API isn't doing that. It's also worth noting the ID's returned from this API are different to the other API's - where they're in the format:
whereas usually we'd expect the
Subscriptions
component to be in lower-case; and the segments to be single values, rather than comprised of multiple-components.Would it be possible for someone to take a look? In addition - given this API is so different to the other API's (specifically with the URI components), are there plans to standardise this API to match the conventions used by others in future?
Thanks!
The text was updated successfully, but these errors were encountered: