Skip to content

Get-AzResource doesn't return subresource for Microsoft.Web/sites/instances #17992

Open
@ericcsinger

Description

@ericcsinger

Description

When running the command

Get-AzResource -ResourceType 'Microsoft.Web/sites/instances' -Name $($appPlanApps[0].Name) -ResourceGroupName $($appPlanApps[0].ResourceGroup) -Verbose -Debug

Nothing is returned to the command output.

The debug output shows the following URI being called

Absolute Uri:
https://management.azure.com/subscriptions/REDACTED/resourceGroups/REDACTED/resources?$filter=resourceType EQ 'Microsoft.Web/sites/instances'&api-version=2021-04-01

Now, when i run the same command but add the -ApiVersion '2018-02-01' I do get back the expected list of instances.

Issue script & Debug output

Absolute Uri:
https://management.azure.com/subscriptions/REDACTED/resourceGroups/REDACTED/resources?$filter=resourceType EQ 'Microsoft.Web/sites/instances'&api-version=2021-04-01

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : dbb2ffec-a4e4-434a-8cb7-e3c5033e86db
x-ms-correlation-request-id   : dbb2ffec-a4e4-434a-8cb7-e3c5033e86db
x-ms-routing-request-id       : CENTRALUS:20220426T233813Z:dbb2ffec-a4e4-434a-8cb7-e3c5033e86db
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Tue, 26 Apr 2022 23:38:12 GMT

Body:
{
  "value": []
}


DEBUG: AzureQoSEvent: Module: Az.Resources:5.6.0; CommandName: Get-AzResource; PSVersion: 7.2.2; IsSuccess: True; Duration: 00:00:00.5404264
DEBUG: Finish sending metric.
DEBUG: 7:38:13 PM - GetAzureResourceCmdlet end processing.

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

Name         Version
----         -------
Az.Accounts  2.7.6
Az.Resources 5.6.0
Az.Websites  2.10.0

Error output

None, blank

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARM - CoreService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions