Skip to content

Commit

Permalink
Change the name of sub-module
Browse files Browse the repository at this point in the history
  • Loading branch information
wyunchi-ms committed Apr 15, 2024
1 parent 3c852a4 commit b34c1ff
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Monitor/MetricsData.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ root-module-name: $(prefix).Monitor
title: Metricdata
module-version: 0.1.0
subject-prefix: ""
namespace: Microsoft.Azure.PowerShell.Cmdlets.Metric

directive:
- where:
Expand Down
8 changes: 4 additions & 4 deletions src/Monitor/MetricsData.Autorest/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ These provide functionality to our HTTP pipeline and other useful features. In s

### Attributes
For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.Metricdata.DescriptionAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.Metric.DescriptionAttribute`
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
- `Microsoft.Azure.PowerShell.Cmdlets.Metricdata.DoNotExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.Metric.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Metricdata`.
- `Microsoft.Azure.PowerShell.Cmdlets.Metricdata.InternalExportAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.Metric.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Metricdata`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.Metricdata.ProfileAttribute`
- `Microsoft.Azure.PowerShell.Cmdlets.Metric.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
13 changes: 6 additions & 7 deletions src/Monitor/MetricsData.Autorest/docs/Get-AzMetricsBatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Get-AzMetricsBatch -Endpoint <String> -Name <List<String>> -Namespace <String> [

### BatchViaIdentityExpanded
```
Get-AzMetricsBatch -Endpoint <String> -InputObject <IMetricIdentity> -Name <List<String>> -Namespace <String>
[-Aggregation <String>] [-EndTime <String>] [-Filter <String>] [-Interval <String>] [-Orderby <String>]
[-Rollupby <String>] [-StartTime <String>] [-Top <Int32>] [-ResourceId <String[]>]
Get-AzMetricsBatch -Endpoint <String> -InputObject <IMetricdataIdentity> -Name <List<String>>
-Namespace <String> [-Aggregation <String>] [-EndTime <String>] [-Filter <String>] [-Interval <String>]
[-Orderby <String>] [-Rollupby <String>] [-StartTime <String>] [-Top <Int32>] [-ResourceId <String[]>]
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

Expand Down Expand Up @@ -665,10 +665,9 @@ Accept wildcard characters: False
### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IMetricIdentity
Type: Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IMetricdataIdentity
Parameter Sets: BatchViaIdentityExpanded
Aliases:

Expand Down Expand Up @@ -702,7 +701,7 @@ Accept wildcard characters: False
The names of the metrics (comma separated) to retrieve.
```yaml
Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Type: System.Collections.Generic.List`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Parameter Sets: (All)
Aliases: MetricName

Expand Down Expand Up @@ -863,7 +862,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS
### Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IMetricIdentity
### Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IMetricdataIdentity
## OUTPUTS
Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/MetricsData.Autorest/test/loadEnv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) {
$env = @{}
if (Test-Path -Path $envFilePath) {
$env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json
$PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant}
$PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
param()
if ($env:AzPSAutorestTestPlaybackMode) {
$loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1'
. ($loadEnvPath)
return $env.SubscriptionId
}
return (Get-AzContext).Subscription.Id

0 comments on commit b34c1ff

Please sign in to comment.