Skip to content
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

Liftr Dynatrace pwsh cmdlets for stable version 2023-04-27 #27241

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
996b0a7
Liftr Dynatrace pwsh cmdlets for stable version 2023-04-27
Feb 27, 2025
4a7e03c
update readme
Feb 27, 2025
0a7a901
update changelog and revert changes in autogenerated file
Feb 27, 2025
281d9ec
fix resolve-solution (#27240)
VeryEarly Feb 27, 2025
9b9dfaa
Add Powershell support for Subnet peering feature (#26906)
udivya73 Mar 1, 2025
1ccf118
[Eng] Create CIPlan.json in beginning of build for all triggers (#27245)
VeryEarly Mar 1, 2025
71142a8
address comments
Mar 2, 2025
7c03999
Fix client token credentials issue before Az.Account module is import…
vidai-msft Mar 3, 2025
859364f
Sync resourceManagement.yml according To ADO Wiki Page - Service Cont…
azure-powershell-bot Mar 4, 2025
6920200
Fix hpccache test playback issue. (#27270)
vidai-msft Mar 4, 2025
e626f7d
New workflow issue-sentinel (#27272)
isra-fel Mar 4, 2025
25dc8c6
Fix the issue that core tests are not included when TestsToRun equals…
vidai-msft Mar 4, 2025
95897f5
[SSH] Update ssh.helper generated code (#27222)
lijinpei2008 Mar 5, 2025
766d1c8
Restoring Az.CodeSigning (#27262)
janielMartell Mar 5, 2025
2b6b156
Remove the duplicate content in help file (#27236)
wyunchi-ms Mar 5, 2025
bd36884
Get-AzVmSize deprecation (#27109)
grizzlytheodore Mar 7, 2025
0d321c6
Network OOB Release (#27276)
azure-powershell-bot Mar 7, 2025
4d66f25
CodeSigning OOB Release (#27278)
azure-powershell-bot Mar 7, 2025
4c0b88e
[Eng] Support Typespec based module in pipelines (#27298)
VeryEarly Mar 7, 2025
e50e8ec
[ENG] Add log for version controller (#27292)
NoriZC Mar 7, 2025
497a50d
Fix AzDev module after redesign generation (#27258)
isra-fel Mar 7, 2025
3bd0497
Merge branch 'dynatrace/pwshStableVersionRelease' of https://github.c…
Mar 11, 2025
dfff688
record files again
Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@{
GUID = 'f889aadf-56ba-485c-8077-283219e39439'
RootModule = './Az.DynatraceObservability.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: DynatraceObservability cmdlets'
PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.DynatraceObservability.private.dll'
FormatsToProcess = './Az.DynatraceObservability.format.ps1xml'
FunctionsToExport = 'Get-AzDynatraceMonitor', 'Get-AzDynatraceMonitorAppService', 'Get-AzDynatraceMonitoredResource', 'Get-AzDynatraceMonitorHost', 'Get-AzDynatraceMonitorLinkableEnv', 'Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail', 'Get-AzDynatraceMonitorMetricStatus', 'Get-AzDynatraceMonitorSSOConfig', 'Get-AzDynatraceMonitorSSODetail', 'Get-AzDynatraceMonitorTagRule', 'Get-AzDynatraceMonitorVMHostPayload', 'New-AzDynatraceMonitor', 'New-AzDynatraceMonitorFilteringTagObject', 'New-AzDynatraceMonitorSSOConfig', 'New-AzDynatraceMonitorTagRule', 'Remove-AzDynatraceMonitor', 'Remove-AzDynatraceMonitorTagRule', 'Update-AzDynatraceMonitor', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DynatraceObservability'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This directory contains the PowerShell module for the DynatraceObservability service.

---
## Status
[![Az.DynatraceObservability](https://img.shields.io/powershellgallery/v/Az.DynatraceObservability.svg?style=flat-square&label=Az.DynatraceObservability "Az.DynatraceObservability")](https://www.powershellgallery.com/packages/Az.DynatraceObservability/)

## Info
- Modifiable: yes
- Generated: all
Expand All @@ -14,7 +17,7 @@ This directory contains the PowerShell module for the DynatraceObservability ser
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
Expand All @@ -27,11 +30,15 @@ For information on how to develop for `Az.DynatraceObservability`, see [how-to.m
> see https://aka.ms/autorest

``` yaml
commit: 8820fa48b53c2c5c6cada3d44046b879932893cd
commit: 099640c73c1af7f9410f184d204807f9d0da2edb
tag: package-2023-04-27
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/dynatrace.json
- $(repo)/specification/dynatrace/resource-manager/readme.md

try-require:
- $(repo)/specification/dynatrace/resource-manager/readme.powershell.md

title: DynatraceObservability
subject-prefix: Dynatrace

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "monitors/singleSignOnConfigurations",
"apiVersion": "2021-09-01",
"apiVersion": "2023-04-27",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dynatraceobservability"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "monitors/tagRules",
"apiVersion": "2021-09-01",
"apiVersion": "2023-04-27",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dynatraceobservability"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
{
"resourceType": "monitors",
"apiVersion": "2021-09-01",
"apiVersion": "2023-04-27",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dynatraceobservability"
},
"commands": [
{
"name": "Get-AzDynatraceMonitorMetricStatus",
"description": "Get metric status",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/getMetricStatus",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitormetricstatus"
},
"parameterSets": [
{
"parameters": [
"-MonitorName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get metric status",
"parameters": [
{
"name": "-MonitorName",
"value": "[Path.monitorName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Get-AzDynatraceMonitorVMHostPayload",
"description": "Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Create an in-memory object for FilteringTag.
Create an in-memory object for FilteringTag.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.FilteringTag
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.FilteringTag
#>
function New-AzDynatraceMonitorFilteringTagObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.FilteringTag')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.FilteringTag')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -41,7 +41,7 @@ function New-AzDynatraceMonitorFilteringTagObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.FilteringTag]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.FilteringTag]::New()

if ($PSBoundParameters.ContainsKey('Action')) {
$Object.Action = $Action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For `Az.DynatraceObservability` to use custom cmdlets, it does this two differen

For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.DynatraceObservability.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.

For script cmdlets, these are loaded via the `Az.DynatraceObservability.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
For script cmdlets, these are loaded via the `Az.DynatraceObservability.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.

## Purpose
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
Expand All @@ -32,10 +32,10 @@ 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.DynatraceObservability.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.
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
- `Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.DynatraceObservability`.
- `Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.DynatraceObservability`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.DynatraceObservability`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ Gets list of App Services with Dynatrace PaaS OneAgent enabled
List the resources currently being monitored by the Dynatrace monitor resource.

### [Get-AzDynatraceMonitorHost](Get-AzDynatraceMonitorHost.md)
List the compute resources currently being monitored by the Dynatrace resource.
List the VM/VMSS resources currently being monitored by the Dynatrace resource.

### [Get-AzDynatraceMonitorLinkableEnv](Get-AzDynatraceMonitorLinkableEnv.md)
Gets all the Dynatrace environments that a user can link a azure resource to

### [Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail](Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail.md)
Get Marketplace SaaS resource details of a tenant under a specific subscription

### [Get-AzDynatraceMonitorMetricStatus](Get-AzDynatraceMonitorMetricStatus.md)
Get metric status

### [Get-AzDynatraceMonitorSSOConfig](Get-AzDynatraceMonitorSSOConfig.md)
Get a DynatraceSingleSignOnResource

Expand Down Expand Up @@ -59,6 +65,3 @@ Delete a TagRule
### [Update-AzDynatraceMonitor](Update-AzDynatraceMonitor.md)
Update a MonitorResource

### [Update-AzDynatraceMonitorTagRule](Update-AzDynatraceMonitorTagRule.md)
Update a TagRule

Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ This command gets a dynatrace monitor by pipeline.
## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: System.Management.Automation.PSObject
Expand Down Expand Up @@ -181,9 +180,24 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.IMonitorResource
### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.IMonitorResource

## NOTES

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.


INPUTOBJECT <IDynatraceObservabilityIdentity>: Identity Parameter
- `[ConfigurationName <String>]`: Single Sign On Configuration Name
- `[Id <String>]`: Resource identity path
- `[MonitorName <String>]`: Monitor resource name
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[RuleSetName <String>]`: Monitor resource name
- `[SubscriptionId <String>]`: The ID of the target subscription.

## RELATED LINKS

Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ Gets list of App Services with Dynatrace PaaS OneAgent enabled
Get-AzDynatraceMonitorAppService -ResourceGroupName dyobrg -MonitorName dyob-pwsh01
```

```output
```

This command gets list of App Services with Dynatrace PaaS OneAgent enabled.

## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: System.Management.Automation.PSObject
Expand Down Expand Up @@ -100,9 +102,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.IAppServiceInfo
### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.IAppServiceInfo

## NOTES

ALIASES

## RELATED LINKS

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Get-AzDynatraceMonitorHost

## SYNOPSIS
List the compute resources currently being monitored by the Dynatrace resource.
List the VM/VMSS resources currently being monitored by the Dynatrace resource.

## SYNTAX

Expand All @@ -18,7 +18,7 @@ Get-AzDynatraceMonitorHost -MonitorName <String> -ResourceGroupName <String> [-S
```

## DESCRIPTION
List the compute resources currently being monitored by the Dynatrace resource.
List the VM/VMSS resources currently being monitored by the Dynatrace resource.

## EXAMPLES

Expand All @@ -27,13 +27,15 @@ List the compute resources currently being monitored by the Dynatrace resource.
Get-AzDynatraceMonitorHost -ResourceGroupName dyobrg -MonitorName dyob-pwsh01
```

```output
```

This command lists the compute resources currently being monitored by the Dynatrace resource.

## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: System.Management.Automation.PSObject
Expand Down Expand Up @@ -100,9 +102,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.IVMInfo
### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.IVMInfo

## NOTES

ALIASES

## RELATED LINKS

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Gets all the Dynatrace environments that a user can link a azure resource to
## SYNTAX

```
Get-AzDynatraceMonitorLinkableEnv -Name <String> -ResourceGroupName <String> [-SubscriptionId <String[]>]
[-Region <String>] [-TenantId <String>] [-UserPrincipal <String>] [-DefaultProfile <PSObject>]
Get-AzDynatraceMonitorLinkableEnv -Name <String> -ResourceGroupName <String> -Region <String>
-TenantId <String> -UserPrincipal <String> [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

Expand All @@ -28,13 +28,15 @@ Gets all the Dynatrace environments that a user can link a azure resource to
Get-AzDynatraceMonitorLinkableEnv -ResourceGroupName dyobrg -Name dyob-pwsh01 -Region 'East US' -UserPrincipal '[email protected]' -TenantId 'xxxxxxxx-xxxxx-xxxx-xxxx-xxxxx'
```

```output
```

This command gets all the Dynatrace environments that a user can link a azure resource.

## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: System.Management.Automation.PSObject
Expand Down Expand Up @@ -71,7 +73,7 @@ Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Expand Down Expand Up @@ -117,7 +119,7 @@ Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Expand All @@ -132,7 +134,7 @@ Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Expand All @@ -146,9 +148,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20210901.ILinkableEnvironmentResponse
### Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.Api20230427.ILinkableEnvironmentResponse

## NOTES

ALIASES

## RELATED LINKS

Loading
Loading