Skip to content

[Feature]: Get-AzResourceGroup: Include createdTime and changedTime, at least optionally #27865

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

Open
o-l-a-v opened this issue May 28, 2025 · 4 comments
Labels
ARM customer-reported feature-request This issue requires a new behavior in the product in order be resolved. Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@o-l-a-v
Copy link

o-l-a-v commented May 28, 2025

Description of the new feature

The ARM API supports $expand=createdTime,changedTime, both for GET and LIST for resource groups:

It'd be useful if Get-AzResourceGroup included this info, at least optionally. No possibility of that today:

Today one can do this:

# GET
ConvertFrom-Json -InputObject (
    (Invoke-AzRestMethod -Method 'Get' -Path (
        '{0}?$expand=createdTime,changedTime&api-version=2021-04-01' -f
        $ResourceGroupId
    )
).'Content'

# LIST
(
    ConvertFrom-Json -InputObject (
        Invoke-AzRestMethod -Method 'Get' -Path (
            '/subscriptions/resourceGroups?$expand=createdTime,changedTime&api-version=2021-04-01' -f
            $SubscriptionId
        )
    ).'Content'
).'value'

Proposed implementation details (optional)

Either:

  • Include by default.
  • Option to include said info.
    • Add -Expand someProperty,someOtherProperty option which translates to $expand=someProperty,someOtherProperty?
      • It's not that these change often, so can be hardcoded and checked before going to the ARM API?
        • "ERROR: "someProperty" is not a property that can be expanded on ResourceGroup.
    • -IncludeTimeInfo switch?
@o-l-a-v o-l-a-v added feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 28, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels May 28, 2025
Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

Powered by issue-sentinel

@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label May 28, 2025
Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

Powered by issue-sentinel

@o-l-a-v
Copy link
Author

o-l-a-v commented May 28, 2025

While #5814 is similar, this feature request includes GET too, not just LIST.

Resources can't include createdTime and changedTime on GET, only LIST. Unlike resource groups.

@dolauli dolauli added ARM Service Attention This issue is responsible by Azure service team. labels May 29, 2025
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM customer-reported feature-request This issue requires a new behavior in the product in order be resolved. Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants