-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
ARMMgmtThis issue is related to a management package.This issue is related to a management package.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.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.DeviceRegistry 1.0.0-beta.1
Describe the bug
I tried calling the Assets (IoT Operations) using the C# DeviceRegistry-Library, but it failed.
Expected behavior
I expected to get my assets.
Actual behavior
The exception is the following:
Azure.RequestFailedException: 'Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.
Status: 412 (Precondition Failed)
ErrorCode: HttpResponsePayloadAPISpecValidationFailed
Content:
{"error":{"code":"HttpResponsePayloadAPISpecValidationFailed","target":"","message":"Failed to create HTTP response as per the API specification with one or more errors. Please see details for more information. Consider to retry operation with api-versions ''.","details":[{"code":"ObjectMissingRequiredProperty","message":"Missing required property: assetEndpointProfileUri. Paths in payload: '$.value[0].properties.assetEndpointProfileUri'"}]}}
Headers:
Cache-Control: no-cache
Pragma: no-cache
x-ms-ratelimit-remaining-subscription-resource-requests: REDACTED
x-ms-providerhub-traffic: REDACTED
mise-correlation-id: REDACTED
x-envoy-upstream-service-time: REDACTED
Strict-Transport-Security: REDACTED
x-ms-failure-cause: REDACTED
x-ms-request-id: ce75e155-4c0f-4bd5-8f63-236501fe1891
x-ms-correlation-request-id: REDACTED
x-ms-client-request-id: 5c654a0f-ce3a-4ae5-8591-4624b654e872
x-ms-routing-request-id: REDACTED
X-Content-Type-Options: REDACTED
X-Cache: REDACTED
X-MSEdge-Ref: REDACTED
Date: Fri, 22 Nov 2024 11:35:06 GMT
Content-Length: 446
Content-Type: application/json
Expires: -1
'
Reproduction Steps
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.DeviceRegistry;
string subscriptionId = ...;
string resourceGroupName = ...;
ArmClient client = new ArmClient(new AzureCliCredential(), subscriptionId);
SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync();
ResourceGroupCollection resourceGroups = subscription.GetResourceGroups();
ResourceGroupResource resourceGroup = await resourceGroups.GetAsync(resourceGroupName);
await foreach (DeviceRegistryAssetResource asset in resourceGroup.GetDeviceRegistryAssets()) // <-- fails
Environment
No response
Metadata
Metadata
Assignees
Labels
ARMMgmtThis issue is related to a management package.This issue is related to a management package.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.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