diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.format.ps1xml b/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.format.ps1xml
index b0a1fde78753..dc9fa30b379b 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.format.ps1xml
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.format.ps1xml
@@ -11,6 +11,9 @@
+
+
+
@@ -21,6 +24,9 @@
AccountId
+
+ CompanyName
+
RegionId
@@ -121,6 +127,78 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ConnectedResourcesCountResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ConnectedResourcesCountResponse#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ ConnectedResourcesCount
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.CreateResourceSupportedProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.CreateResourceSupportedProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreationSupported
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.CreateResourceSupportedResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.CreateResourceSupportedResponse#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.DynatraceEnvironmentProperties
@@ -153,6 +231,9 @@
+
+
+
@@ -172,6 +253,9 @@
ConfigurationName
+
+ DynatraceEnvironmentId
+
MonitorName
@@ -551,6 +635,56 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Action
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManagedServiceIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManagedServiceIdentity#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalId
+
+
+ TenantId
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MarketplaceSaaSResourceDetailsRequest
@@ -583,6 +717,9 @@
+
+
+
@@ -596,6 +733,9 @@
MarketplaceSaaSResourceId
+
+ MarketplaceSaaSResourceName
+
MarketplaceSubscriptionStatus
@@ -607,6 +747,28 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MarketplaceSubscriptionIdRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MarketplaceSubscriptionIdRequest#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ MarketplaceSubscriptionId
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MetricRules
@@ -691,6 +853,90 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+ Status
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscriptionProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscriptionProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscriptionPropertiesList
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscriptionPropertiesList#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoringTagRulesProperties
@@ -726,6 +972,9 @@
+
+
+
@@ -745,6 +994,9 @@
LiftrResourcePreference
+
+ MarketplaceSaasAutoRenew
+
MarketplaceSubscriptionStatus
@@ -1007,6 +1259,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1014,6 +1284,24 @@
Name
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
@@ -1097,6 +1385,34 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.SubscriptionList
+
+ Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.SubscriptionList#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Operation
+
+
+ ProvisioningState
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.SystemData
@@ -1221,6 +1537,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1231,6 +1565,24 @@
Name
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
Location
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.psd1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.psd1
index 8e487d51cb33..b9fded990796 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.psd1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/Az.DynatraceObservability.psd1
@@ -11,7 +11,7 @@
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', 'Update-AzDynatraceMonitorSSOConfig', 'Update-AzDynatraceMonitorTagRule'
+ FunctionsToExport = 'Get-AzDynatraceMonitor', 'Get-AzDynatraceMonitorAppService', 'Get-AzDynatraceMonitoredResource', 'Get-AzDynatraceMonitoredSubscription', 'Get-AzDynatraceMonitorHost', 'Get-AzDynatraceMonitorLinkableEnv', 'Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail', 'Get-AzDynatraceMonitorMetricStatus', 'Get-AzDynatraceMonitorSSOConfig', 'Get-AzDynatraceMonitorSSODetail', 'Get-AzDynatraceMonitorTagRule', 'Get-AzDynatraceMonitorVMHostPayload', 'Invoke-AzDynatraceManageMonitorAgentInstallation', 'New-AzDynatraceMonitor', 'New-AzDynatraceMonitoredSubscription', 'New-AzDynatraceMonitorFilteringTagObject', 'New-AzDynatraceMonitorSSOConfig', 'New-AzDynatraceMonitorTagRule', 'Remove-AzDynatraceMonitor', 'Remove-AzDynatraceMonitoredSubscription', 'Remove-AzDynatraceMonitorTagRule', 'Update-AzDynatraceMonitor', 'Update-AzDynatraceMonitorPlan', 'Update-AzDynatraceMonitorSSOConfig', 'Update-AzDynatraceMonitorTagRule'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DynatraceObservability'
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/Properties/AssemblyInfo.cs b/generated/DynatraceObservability/DynatraceObservability.Autorest/Properties/AssemblyInfo.cs
index 0cd5f0e72f41..3c8e8a3122b1 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/Properties/AssemblyInfo.cs
@@ -20,8 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DynatraceObservability")]
-[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")]
-[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.3.0")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.3.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
-
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitor.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitor.ps1
index 516f05c19e0c..30011a49b215 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitor.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitor.ps1
@@ -39,11 +39,12 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitor
#>
@@ -73,6 +74,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorAppService.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorAppService.ps1
index 490f8b488539..73fe7464aa83 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorAppService.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorAppService.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorHost.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorHost.ps1
index 7ea70417b754..018022587d7b 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorHost.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorHost.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorLinkableEnv.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorLinkableEnv.ps1
index 90caca33bead..8091b714b647 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorLinkableEnv.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorLinkableEnv.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='ListExpanded', Mandatory)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail.ps1
index 27835f983f9d..15eb64c5b25c 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-Get Marketplace SaaS resource details of a tenant under a specific subscription
+Get Marketplace SaaS resource details
.Description
-Get Marketplace SaaS resource details of a tenant under a specific subscription
+Get Marketplace SaaS resource details
.Example
Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail -TenantId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
@@ -45,6 +45,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMetricStatus.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMetricStatus.ps1
index 95d90933ff07..86b567f40689 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMetricStatus.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorMetricStatus.ps1
@@ -24,6 +24,8 @@ Get-AzDynatraceMonitorMetricStatus -MonitorName dyob4hzw1d -ResourceGroupName dy
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricStatusRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricsStatusResponse
.Notes
@@ -33,25 +35,35 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+
+REQUEST : Request for getting metric status for given monitored resource Ids
+ [MonitoredResourceId >]: List of azure resource Id of monitored resources for which we get the metric status
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitormetricstatus
#>
function Get-AzDynatraceMonitorMetricStatus {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricsStatusResponse])]
-[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[CmdletBinding(DefaultParameterSetName='GetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
- # Name of the Monitor resource
+ # Name of the Monitors resource
${MonitorName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# The name of the resource group.
@@ -59,18 +71,50 @@ param(
${ResourceGroupName},
[Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetExpanded')]
+ [Parameter(ParameterSetName='GetViaJsonFilePath')]
+ [Parameter(ParameterSetName='GetViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
# Identity Parameter
${InputObject},
+ [Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricStatusRequest]
+ # Request for getting metric status for given monitored resource Ids
+ ${Request},
+
+ [Parameter(ParameterSetName='GetExpanded')]
+ [Parameter(ParameterSetName='GetViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # List of azure resource Id of monitored resources for which we get the metric status
+ ${MonitoredResourceId},
+
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Get operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Get operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -156,9 +200,13 @@ begin {
$mapping = @{
Get = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_Get';
+ GetExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetExpanded';
GetViaIdentity = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaIdentity';
+ GetViaIdentityExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaIdentityExpanded';
+ GetViaJsonFilePath = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaJsonFilePath';
+ GetViaJsonString = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaJsonString';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if (('Get', 'GetExpanded', 'GetViaJsonFilePath', 'GetViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSOConfig.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSOConfig.ps1
index efd76b997bbc..fa5cae7c7d20 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSOConfig.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSOConfig.ps1
@@ -35,19 +35,21 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitorssoconfig
#>
@@ -73,6 +75,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSODetail.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSODetail.ps1
index dbee033c7569..c30c0e619a84 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSODetail.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorSSODetail.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetExpanded')]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorTagRule.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorTagRule.ps1
index 0b18594a569a..a1ff942690b7 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorTagRule.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorTagRule.ps1
@@ -36,19 +36,21 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitortagrule
#>
@@ -74,6 +76,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorVMHostPayload.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorVMHostPayload.ps1
index f913245c7ea2..f17ed4cd7b8f 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorVMHostPayload.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitorVMHostPayload.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredResource.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredResource.ps1
index aed9985d4796..6ceb26f99bea 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredResource.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredResource.ps1
@@ -22,14 +22,23 @@ List the resources currently being monitored by the Dynatrace monitor resource.
.Example
Get-AzDynatraceMonitoredResource -ResourceGroupName dyobrg -MonitorName dyob-pwsh01
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ILogStatusRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredResource
+.Notes
+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.
+
+REQUEST : Request for getting log status for given monitored resource Ids
+ [MonitoredResourceId >]: List of azure resource Id of monitored resources for which we get the log status
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitoredresource
#>
function Get-AzDynatraceMonitoredResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredResource])]
-[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
@@ -49,8 +58,34 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
+ [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ILogStatusRequest]
+ # Request for getting log status for given monitored resource Ids
+ ${Request},
+
+ [Parameter(ParameterSetName='ListExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # List of azure resource Id of monitored resources for which we get the log status
+ ${MonitoredResourceId},
+
+ [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the List operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ListViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the List operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -136,8 +171,11 @@ begin {
$mapping = @{
List = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_List';
+ ListExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListExpanded';
+ ListViaJsonFilePath = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListViaJsonFilePath';
+ ListViaJsonString = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListViaJsonString';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredSubscription.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredSubscription.ps1
new file mode 100644
index 000000000000..045afbaaa032
--- /dev/null
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Get-AzDynatraceMonitoredSubscription.ps1
@@ -0,0 +1,249 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+List the subscriptions currently being monitored by the Dynatrace monitor resource.
+.Description
+List the subscriptions currently being monitored by the Dynatrace monitor resource.
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor
+$subs | Select-Object Id, Name, Type
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$monitorObj | Get-AzDynatraceMonitoredSubscription | Select-Object -First 1 -Property Id, Name
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$all = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor
+($all[0] | Get-AzDynatraceMonitoredSubscription) | Format-List Id, Name, Type, Properties
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $currentSub = (Get-AzContext).Subscription.Id
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor | Where-Object { $_.Id -like "/subscriptions/$currentSub/*" }
+$subs | Select-Object Id, Name
+.Example
+$count = (Get-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor").Count
+Write-Host "Total monitored subscriptions: $count"
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -ErrorAction SilentlyContinue
+if (-not $subs -or $subs.Count -eq 0) { Write-Warning "No monitored subscriptions found." } else { $subs | Select-Object -First 5 }
+.Example
+Get-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor" |
+ Select-Object Id,@{n='SubscriptionGuid';e={ ($_).Id.Split('/')[2] }}, Name | Export-Csv -Path monitoredSubs.csv -NoTypeInformation
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties
+.Notes
+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 : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName ]: Monitor resource name
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitoredsubscription
+#>
+function Get-AzDynatraceMonitoredSubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${MonitorName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_Get';
+ GetViaIdentity = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_GetViaIdentity';
+ List = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Invoke-AzDynatraceManageMonitorAgentInstallation.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Invoke-AzDynatraceManageMonitorAgentInstallation.ps1
new file mode 100644
index 000000000000..18dd3e4083d3
--- /dev/null
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/Invoke-AzDynatraceManageMonitorAgentInstallation.ps1
@@ -0,0 +1,322 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Performs Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of resources.
+.Description
+Performs Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of resources.
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm01"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Action Install -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm01"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Action Uninstall -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm02"
+$listEntry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $listEntry.Id = $vmId
+$request = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest]::new()
+$request.Action = 'Install'
+$request.ManageAgentInstallationList = @($listEntry)
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Request $request -PassThru
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm03"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+$monitorObj | Invoke-AzDynatraceManageMonitorAgentInstallation -Action Install -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm04"
+$json = '{"action":"Install","manageAgentInstallationList":[{"id":"' + $vmId + '"}]}'
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -JsonString $json -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm05"
+$path = Join-Path $PWD 'agent-install.json'
+@{ action = 'Install'; manageAgentInstallationList = @(@{ id = $vmId }) } | ConvertTo-Json -Depth 4 | Set-Content -Path $path -Encoding UTF8
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -JsonFilePath $path -PassThru
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm09"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+$req = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest]::new(); $req.Action = 'Uninstall'; $req.ManageAgentInstallationList = @($entry)
+$monitorObj | Invoke-AzDynatraceManageMonitorAgentInstallation -Request $req -PassThru
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentInstallationRequest
+.Outputs
+System.Boolean
+.Notes
+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 : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName ]: Monitor resource name
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+
+MANAGEAGENTINSTALLATIONLIST : The list of resources.
+ [Id ]: The ARM id of the resource to install/uninstall agent.
+
+REQUEST : Request for performing Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of agent resources.
+ Action : Install/Uninstall action.
+ ManageAgentInstallationList >: The list of resources.
+ [Id ]: The ARM id of the resource to install/uninstall agent.
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/invoke-azdynatracemanagemonitoragentinstallation
+#>
+function Invoke-AzDynatraceManageMonitorAgentInstallation {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='ManageViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Manage', Mandatory)]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${MonitorName},
+
+ [Parameter(ParameterSetName='Manage', Mandatory)]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Manage')]
+ [Parameter(ParameterSetName='ManageExpanded')]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath')]
+ [Parameter(ParameterSetName='ManageViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='ManageViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Manage', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ManageViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentInstallationRequest]
+ # Request for performing Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of agent resources.
+ ${Request},
+
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Install", "Uninstall")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Install/Uninstall action.
+ ${Action},
+
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory)]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentList[]]
+ # The list of resources.
+ ${ManageAgentInstallationList},
+
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Manage operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Manage operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Manage = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_Manage';
+ ManageExpanded = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageExpanded';
+ ManageViaIdentity = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaIdentity';
+ ManageViaIdentityExpanded = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaIdentityExpanded';
+ ManageViaJsonFilePath = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaJsonFilePath';
+ ManageViaJsonString = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaJsonString';
+ }
+ if (('Manage', 'ManageExpanded', 'ManageViaJsonFilePath', 'ManageViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitor.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitor.ps1
index a95f85b60c80..20726bb858c1 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitor.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitor.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-create a MonitorResource
+Create a MonitorResource
.Description
-create a MonitorResource
+Create a MonitorResource
.Example
New-AzDynatraceMonitor -ResourceGroupName dyobrg -Name dyob-pwsh02 -Location eastus2euap -UserFirstName 'Lucas' -UserLastName 'Yao' -UserEmailAddress 'v-diya@microsoft.com' -PlanUsageType "COMMITTED" -PlanBillingCycle "Monthly" -PlanDetail "azureportalintegration_privatepreview@TIDhjdtn7tfnxcy" -SingleSignOnAadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
@@ -50,6 +50,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
@@ -67,14 +68,14 @@ param(
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Region in which the account is created
- ${AccountRegionId},
+ # Name of the customer account / company
+ ${AccountInfoCompanyName},
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.Management.Automation.SwitchParameter]
- # Determines whether to enable a system-assigned identity for the resource.
- ${EnableSystemAssignedIdentity},
+ [System.String]
+ # Region in which the account is created
+ ${AccountRegionId},
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
@@ -107,7 +108,21 @@ param(
${EnvironmentUserId},
[Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Active", "Suspended")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAndUserAssigned")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # The type of managed identity assigned to this resource.
+ ${IdentityType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("On", "Off")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Marketplace resource autorenew flag
+ ${MarketplaceSaasAutoRenew},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Active", "Suspended", "Unsubscribed")]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
# Marketplace subscription status.
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorSSOConfig.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorSSOConfig.ps1
index 57e52a4b7c94..9632d21ba3f4 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorSSOConfig.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorSSOConfig.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-create a DynatraceSingleSignOnResource
+Create a DynatraceSingleSignOnResource
.Description
-create a DynatraceSingleSignOnResource
+Create a DynatraceSingleSignOnResource
.Example
New-AzDynatraceMonitorSSOConfig -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -AadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
@@ -33,11 +33,12 @@ To create the parameters described below, construct a hash table containing the
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitorssoconfig
#>
@@ -69,6 +70,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorTagRule.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorTagRule.ps1
index 3c4720a89654..29e89d5ad5e9 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorTagRule.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitorTagRule.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-create a TagRule
+Create a TagRule
.Description
-create a TagRule
+Create a TagRule
.Example
$tagFilter = New-AzDynatraceMonitorFilteringTagObject -Action 'Include' -Name 'Environment' -Value 'Prod'
New-AzDynatraceMonitorTagRule -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -LogRuleFilteringTag $tagFilter
@@ -44,11 +44,12 @@ METRICRULEFILTERINGTAG : List of filtering tags to be used for
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitortagrule
#>
@@ -80,6 +81,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitoredSubscription.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitoredSubscription.ps1
new file mode 100644
index 000000000000..7dbc58b2eb21
--- /dev/null
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/New-AzDynatraceMonitoredSubscription.ps1
@@ -0,0 +1,302 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Add the subscriptions that should be monitored by the Dynatrace monitor resource.
+.Description
+Add the subscriptions that should be monitored by the Dynatrace monitor resource.
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+
+# Initiate monitoring relationship (AddBegin)
+$subs = @([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new())
+$subs[0].Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -MonitoredSubscriptionList $subs -Operation AddBegin
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subs = @([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new())
+$subs[0].Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -MonitoredSubscriptionList $subs -Operation AddComplete
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$json = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $subscriptionId + '"}],"operation":"AddBegin"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $json
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$path = Join-Path $PWD 'monitored-subscription.json'
+@{ monitoredSubscriptionList = @(@{ id = "/subscriptions/$subscriptionId" }); operation = 'AddBegin' } | ConvertTo-Json -Depth 5 | Set-Content -Path $path -Encoding UTF8
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonFilePath $path
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subObj = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new(); $subObj.Id = "/subscriptions/$subscriptionId"
+($monitorObj | New-AzDynatraceMonitoredSubscription -MonitoredSubscriptionList @($subObj) -Operation AddBegin)
+.Example
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subObj = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new(); $subObj.Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor" -MonitoredSubscriptionList @($subObj) -Operation AddBegin -WhatIf
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $sid = (Get-AzContext).Subscription.Id
+$jsonBegin = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $sid + '"}],"operation":"AddBegin"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $jsonBegin | Out-Null
+$jsonComplete = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $sid + '"}],"operation":"AddComplete"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $jsonComplete
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor | Select-Object -First 1 | Format-List Id,Name,Type
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties
+.Notes
+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.
+
+MONITOREDSUBSCRIPTIONLIST : List of subscriptions and the state of the monitoring.
+ SubscriptionId : The subscriptionId to be monitored.
+ [Error ]: The reason of not monitoring the subscription.
+ [LogRuleFilteringTag >]: List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
+ [Name ]: The name (also known as the key) of the tag.
+ [Value ]: The value of the tag.
+ [LogRuleSendAadLog ]: Flag specifying if AAD logs should be sent for the Monitor resource.
+ [LogRuleSendActivityLog ]: Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
+ [LogRuleSendSubscriptionLog ]: Flag specifying if subscription logs should be sent for the Monitor resource.
+ [MetricRuleFilteringTag >]: List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [MetricRuleSendingMetric ]: Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
+ [Status ]: The state of monitoring.
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitoredsubscription
+#>
+function New-AzDynatraceMonitoredSubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${MonitorName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscription[]]
+ # List of subscriptions and the state of the monitoring.
+ ${MonitoredSubscriptionList},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("AddBegin", "AddComplete", "DeleteBegin", "DeleteComplete", "Active")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # The operation for the patch on the resource.
+ ${Operation},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/ProxyCmdletDefinitions.ps1
index 8c6d3ca6c054..1c3b0f834063 100644
--- a/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/DynatraceObservability/DynatraceObservability.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -49,6 +49,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
@@ -205,14 +206,23 @@ List the resources currently being monitored by the Dynatrace monitor resource.
.Example
Get-AzDynatraceMonitoredResource -ResourceGroupName dyobrg -MonitorName dyob-pwsh01
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ILogStatusRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredResource
+.Notes
+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.
+
+REQUEST : Request for getting log status for given monitored resource Ids
+ [MonitoredResourceId >]: List of azure resource Id of monitored resources for which we get the log status
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitoredresource
#>
function Get-AzDynatraceMonitoredResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredResource])]
-[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
@@ -232,8 +242,34 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
+ [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ILogStatusRequest]
+ # Request for getting log status for given monitored resource Ids
+ ${Request},
+
+ [Parameter(ParameterSetName='ListExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # List of azure resource Id of monitored resources for which we get the log status
+ ${MonitoredResourceId},
+
+ [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the List operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ListViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the List operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -319,8 +355,245 @@ begin {
$mapping = @{
List = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_List';
+ ListExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListExpanded';
+ ListViaJsonFilePath = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListViaJsonFilePath';
+ ListViaJsonString = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredResource_ListViaJsonString';
}
- if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if (('List', 'ListExpanded', 'ListViaJsonFilePath', 'ListViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+List the subscriptions currently being monitored by the Dynatrace monitor resource.
+.Description
+List the subscriptions currently being monitored by the Dynatrace monitor resource.
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor
+$subs | Select-Object Id, Name, Type
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$monitorObj | Get-AzDynatraceMonitoredSubscription | Select-Object -First 1 -Property Id, Name
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$all = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor
+($all[0] | Get-AzDynatraceMonitoredSubscription) | Format-List Id, Name, Type, Properties
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $currentSub = (Get-AzContext).Subscription.Id
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor | Where-Object { $_.Id -like "/subscriptions/$currentSub/*" }
+$subs | Select-Object Id, Name
+.Example
+$count = (Get-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor").Count
+Write-Host "Total monitored subscriptions: $count"
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$subs = Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -ErrorAction SilentlyContinue
+if (-not $subs -or $subs.Count -eq 0) { Write-Warning "No monitored subscriptions found." } else { $subs | Select-Object -First 5 }
+.Example
+Get-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor" |
+ Select-Object Id,@{n='SubscriptionGuid';e={ ($_).Id.Split('/')[2] }}, Name | Export-Csv -Path monitoredSubs.csv -NoTypeInformation
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties
+.Notes
+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 : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName ]: Monitor resource name
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitoredsubscription
+#>
+function Get-AzDynatraceMonitoredSubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${MonitorName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_Get';
+ GetViaIdentity = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_GetViaIdentity';
+ List = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitoredSubscription_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -415,6 +688,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
@@ -598,6 +872,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='ListExpanded', Mandatory)]
@@ -780,9 +1055,9 @@ end {
<#
.Synopsis
-Get Marketplace SaaS resource details of a tenant under a specific subscription
+Get Marketplace SaaS resource details
.Description
-Get Marketplace SaaS resource details of a tenant under a specific subscription
+Get Marketplace SaaS resource details
.Example
Get-AzDynatraceMonitorMarketplaceSaaSResourceDetail -TenantId 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
@@ -809,6 +1084,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
@@ -994,6 +1270,8 @@ Get-AzDynatraceMonitorMetricStatus -MonitorName dyob4hzw1d -ResourceGroupName dy
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricStatusRequest
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricsStatusResponse
.Notes
@@ -1003,25 +1281,35 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+
+REQUEST : Request for getting metric status for given monitored resource Ids
+ [MonitoredResourceId >]: List of azure resource Id of monitored resources for which we get the metric status
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitormetricstatus
#>
function Get-AzDynatraceMonitorMetricStatus {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricsStatusResponse])]
-[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[CmdletBinding(DefaultParameterSetName='GetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
- # Name of the Monitor resource
+ # Name of the Monitors resource
${MonitorName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetExpanded', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# The name of the resource group.
@@ -1029,32 +1317,64 @@ param(
${ResourceGroupName},
[Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetExpanded')]
+ [Parameter(ParameterSetName='GetViaJsonFilePath')]
+ [Parameter(ParameterSetName='GetViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
# Identity Parameter
${InputObject},
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
+ [Parameter(ParameterSetName='Get', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMetricStatusRequest]
+ # Request for getting metric status for given monitored resource Ids
+ ${Request},
+
+ [Parameter(ParameterSetName='GetExpanded')]
+ [Parameter(ParameterSetName='GetViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # List of azure resource Id of monitored resources for which we get the metric status
+ ${MonitoredResourceId},
+
+ [Parameter(ParameterSetName='GetViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Get operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='GetViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Get operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
[Parameter(DontShow)]
[ValidateNotNull()]
@@ -1126,9 +1446,13 @@ begin {
$mapping = @{
Get = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_Get';
+ GetExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetExpanded';
GetViaIdentity = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaIdentity';
+ GetViaIdentityExpanded = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaIdentityExpanded';
+ GetViaJsonFilePath = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaJsonFilePath';
+ GetViaJsonString = 'Az.DynatraceObservability.private\Get-AzDynatraceMonitorMetricStatus_GetViaJsonString';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if (('Get', 'GetExpanded', 'GetViaJsonFilePath', 'GetViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -1209,19 +1533,21 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitorssoconfig
#>
@@ -1247,6 +1573,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
@@ -1447,6 +1774,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetExpanded')]
@@ -1637,19 +1965,21 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
MONITORINPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitortagrule
#>
@@ -1675,6 +2005,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
@@ -1875,6 +2206,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter()]
@@ -2048,11 +2380,12 @@ To create the parameters described below, construct a hash table containing the
INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
https://learn.microsoft.com/powershell/module/az.dynatraceobservability/get-azdynatracemonitor
#>
@@ -2082,6 +2415,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
@@ -2241,107 +2575,152 @@ end {
<#
.Synopsis
-create a DynatraceSingleSignOnResource
+Performs Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of resources.
.Description
-create a DynatraceSingleSignOnResource
+Performs Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of resources.
.Example
-New-AzDynatraceMonitorSSOConfig -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -AadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm01"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Action Install -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm01"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Action Uninstall -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm02"
+$listEntry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $listEntry.Id = $vmId
+$request = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest]::new()
+$request.Action = 'Install'
+$request.ManageAgentInstallationList = @($listEntry)
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -Request $request -PassThru
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm03"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+$monitorObj | Invoke-AzDynatraceManageMonitorAgentInstallation -Action Install -ManageAgentInstallationList @($entry) -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm04"
+$json = '{"action":"Install","manageAgentInstallationList":[{"id":"' + $vmId + '"}]}'
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -JsonString $json -PassThru
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/$rg/providers/Microsoft.Compute/virtualMachines/myVm05"
+$path = Join-Path $PWD 'agent-install.json'
+@{ action = 'Install'; manageAgentInstallationList = @(@{ id = $vmId }) } | ConvertTo-Json -Depth 4 | Set-Content -Path $path -Encoding UTF8
+Invoke-AzDynatraceManageMonitorAgentInstallation -ResourceGroupName $rg -MonitorName $monitor -JsonFilePath $path -PassThru
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor" | Select-Object -First 1
+$vmId = "/subscriptions/$(Get-AzContext).Subscription.Id/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVm09"
+$entry = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentList]::new(); $entry.Id = $vmId
+$req = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ManageAgentInstallationRequest]::new(); $req.Action = 'Uninstall'; $req.ManageAgentInstallationList = @($entry)
+$monitorObj | Invoke-AzDynatraceManageMonitorAgentInstallation -Request $req -PassThru
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentInstallationRequest
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceSingleSignOnResource
+System.Boolean
.Notes
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.
-MONITORINPUTOBJECT : Identity Parameter
+INPUTOBJECT : Identity Parameter
[ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
[Id ]: Resource identity path
[MonitorName ]: Monitor resource name
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+
+MANAGEAGENTINSTALLATIONLIST : The list of resources.
+ [Id ]: The ARM id of the resource to install/uninstall agent.
+
+REQUEST : Request for performing Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of agent resources.
+ Action : Install/Uninstall action.
+ ManageAgentInstallationList >: The list of resources.
+ [Id ]: The ARM id of the resource to install/uninstall agent.
.Link
-https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitorssoconfig
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/invoke-azdynatracemanagemonitoragentinstallation
#>
-function New-AzDynatraceMonitorSSOConfig {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceSingleSignOnResource])]
-[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+function Invoke-AzDynatraceManageMonitorAgentInstallation {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='ManageViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='Manage', Mandatory)]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# Monitor resource name
${MonitorName},
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='Manage', Mandatory)]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaJsonFilePath')]
- [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Parameter(ParameterSetName='Manage')]
+ [Parameter(ParameterSetName='ManageExpanded')]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath')]
+ [Parameter(ParameterSetName='ManageViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ManageViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
# Identity Parameter
- ${MonitorInputObject},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [AllowEmptyCollection()]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String[]]
- # array of Aad(azure active directory) domains
- ${AadDomain},
+ ${InputObject},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Parameter(ParameterSetName='Manage', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ManageViaIdentity', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Version of the Dynatrace agent installed on the VM.
- ${EnterpriseAppId},
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentInstallationRequest]
+ # Request for performing Dynatrace agent install/uninstall action through the Azure Dynatrace resource on the provided list of agent resources.
+ ${Request},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Initial", "Enable", "Disable", "Existing")]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Install", "Uninstall")]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # State of Single Sign On
- ${SingleSignOnState},
+ # Install/Uninstall action.
+ ${Action},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Parameter(ParameterSetName='ManageExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaIdentityExpanded', Mandatory)]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # The login URL specific to this Dynatrace Environment
- ${SingleSignOnUrl},
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IManageAgentList[]]
+ # The list of resources.
+ ${ManageAgentInstallationList},
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Path of Json file supplied to the Create operation
+ # Path of Json file supplied to the Manage operation
${JsonFilePath},
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='ManageViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Json string supplied to the Create operation
+ # Json string supplied to the Manage operation
${JsonString},
[Parameter()]
@@ -2353,12 +2732,6 @@ param(
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command as a job
- ${AsJob},
-
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
@@ -2382,8 +2755,8 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
- # Run the command asynchronously
- ${NoWait},
+ # Returns true when the command succeeds
+ ${PassThru},
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
@@ -2440,21 +2813,20 @@ begin {
}
$mapping = @{
- CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateExpanded';
- CreateViaIdentityMonitorExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaIdentityMonitorExpanded';
- CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaJsonFilePath';
- CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaJsonString';
- }
- if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ Manage = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_Manage';
+ ManageExpanded = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageExpanded';
+ ManageViaIdentity = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaIdentity';
+ ManageViaIdentityExpanded = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaIdentityExpanded';
+ ManageViaJsonFilePath = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaJsonFilePath';
+ ManageViaJsonString = 'Az.DynatraceObservability.private\Invoke-AzDynatraceManageMonitorAgentInstallation_ManageViaJsonString';
+ }
+ if (('Manage', 'ManageExpanded', 'ManageViaJsonFilePath', 'ManageViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
}
- if (('CreateExpanded', 'CreateViaIdentityMonitorExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name') ) {
- $PSBoundParameters['Name'] = "default"
- }
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
@@ -2510,131 +2882,118 @@ end {
<#
.Synopsis
-create a TagRule
+Add the subscriptions that should be monitored by the Dynatrace monitor resource.
.Description
-create a TagRule
+Add the subscriptions that should be monitored by the Dynatrace monitor resource.
.Example
-$tagFilter = New-AzDynatraceMonitorFilteringTagObject -Action 'Include' -Name 'Environment' -Value 'Prod'
-New-AzDynatraceMonitorTagRule -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -LogRuleFilteringTag $tagFilter
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+
+# Initiate monitoring relationship (AddBegin)
+$subs = @([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new())
+$subs[0].Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -MonitoredSubscriptionList $subs -Operation AddBegin
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subs = @([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new())
+$subs[0].Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -MonitoredSubscriptionList $subs -Operation AddComplete
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$json = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $subscriptionId + '"}],"operation":"AddBegin"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $json
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$path = Join-Path $PWD 'monitored-subscription.json'
+@{ monitoredSubscriptionList = @(@{ id = "/subscriptions/$subscriptionId" }); operation = 'AddBegin' } | ConvertTo-Json -Depth 5 | Set-Content -Path $path -Encoding UTF8
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonFilePath $path
+.Example
+$monitorObj = Get-AzDynatraceMonitor -ResourceGroupName "myResourceGroup" -Name "myDynatraceMonitor"
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subObj = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new(); $subObj.Id = "/subscriptions/$subscriptionId"
+($monitorObj | New-AzDynatraceMonitoredSubscription -MonitoredSubscriptionList @($subObj) -Operation AddBegin)
+.Example
+$subscriptionId = (Get-AzContext).Subscription.Id
+$subObj = [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.MonitoredSubscription]::new(); $subObj.Id = "/subscriptions/$subscriptionId"
+New-AzDynatraceMonitoredSubscription -ResourceGroupName "myResourceGroup" -MonitorName "myDynatraceMonitor" -MonitoredSubscriptionList @($subObj) -Operation AddBegin -WhatIf
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"; $sid = (Get-AzContext).Subscription.Id
+$jsonBegin = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $sid + '"}],"operation":"AddBegin"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $jsonBegin | Out-Null
+$jsonComplete = '{"monitoredSubscriptionList":[{"id":"/subscriptions/' + $sid + '"}],"operation":"AddComplete"}'
+New-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -JsonString $jsonComplete
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+Get-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor | Select-Object -First 1 | Format-List Id,Name,Type
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ITagRule
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties
.Notes
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.
-LOGRULEFILTERINGTAG : List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured.If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- [Name ]: The name (also known as the key) of the tag.
- [Value ]: The value of the tag.
-
-METRICRULEFILTERINGTAG : List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
- [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
- [Name ]: The name (also known as the key) of the tag.
- [Value ]: The value of the tag.
-
-MONITORINPUTOBJECT : Identity Parameter
- [ConfigurationName ]: Single Sign On Configuration Name
- [Id ]: Resource identity path
- [MonitorName ]: Monitor resource name
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [RuleSetName ]: Monitor resource name
- [SubscriptionId ]: The ID of the target subscription.
+MONITOREDSUBSCRIPTIONLIST : List of subscriptions and the state of the monitoring.
+ SubscriptionId : The subscriptionId to be monitored.
+ [Error ]: The reason of not monitoring the subscription.
+ [LogRuleFilteringTag >]: List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
+ [Name ]: The name (also known as the key) of the tag.
+ [Value ]: The value of the tag.
+ [LogRuleSendAadLog ]: Flag specifying if AAD logs should be sent for the Monitor resource.
+ [LogRuleSendActivityLog ]: Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
+ [LogRuleSendSubscriptionLog ]: Flag specifying if subscription logs should be sent for the Monitor resource.
+ [MetricRuleFilteringTag >]: List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [MetricRuleSendingMetric ]: Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
+ [Status ]: The state of monitoring.
.Link
-https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitortagrule
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitoredsubscription
#>
-function New-AzDynatraceMonitorTagRule {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ITagRule])]
+function New-AzDynatraceMonitoredSubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscriptionProperties])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# Monitor resource name
${MonitorName},
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaJsonFilePath')]
- [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
- # Identity Parameter
- ${MonitorInputObject},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [AllowEmptyCollection()]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IFilteringTag[]]
- # List of filtering tags to be used for capturing logs.
- # This only takes effect if SendActivityLogs flag is enabled.
- # If empty, all resources will be captured.If only Exclude action is specified, the rules will apply to the list of all available resources.
- # If Include actions are specified, the rules will only include resources with the associated tags.
- ${LogRuleFilteringTag},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Flag specifying if AAD logs should be sent for the Monitor resource.
- ${LogRuleSendAadLog},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
- ${LogRuleSendActivityLog},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Flag specifying if subscription logs should be sent for the Monitor resource.
- ${LogRuleSendSubscriptionLog},
-
[Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IFilteringTag[]]
- # List of filtering tags to be used for capturing metrics.
- # If empty, all resources will be captured.
- # If only Exclude action is specified, the rules will apply to the list of all available resources.
- # If Include actions are specified, the rules will only include resources with the associated tags.
- ${MetricRuleFilteringTag},
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitoredSubscription[]]
+ # List of subscriptions and the state of the monitoring.
+ ${MonitoredSubscriptionList},
[Parameter(ParameterSetName='CreateExpanded')]
- [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("AddBegin", "AddComplete", "DeleteBegin", "DeleteComplete", "Active")]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
- ${MetricRuleSendingMetric},
+ # The operation for the patch on the resource.
+ ${Operation},
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
@@ -2744,10 +3103,9 @@ begin {
}
$mapping = @{
- CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateExpanded';
- CreateViaIdentityMonitorExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaIdentityMonitorExpanded';
- CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaJsonFilePath';
- CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaJsonString';
+ CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitoredSubscription_CreateViaJsonString';
}
if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
@@ -2756,9 +3114,6 @@ begin {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
}
- if (('CreateExpanded', 'CreateViaIdentityMonitorExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name') ) {
- $PSBoundParameters['Name'] = "default"
- }
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
@@ -2814,218 +3169,1287 @@ end {
<#
.Synopsis
-create a MonitorResource
+Create a DynatraceSingleSignOnResource
.Description
-create a MonitorResource
+Create a DynatraceSingleSignOnResource
.Example
-New-AzDynatraceMonitor -ResourceGroupName dyobrg -Name dyob-pwsh02 -Location eastus2euap -UserFirstName 'Lucas' -UserLastName 'Yao' -UserEmailAddress 'v-diya@microsoft.com' -PlanUsageType "COMMITTED" -PlanBillingCycle "Monthly" -PlanDetail "azureportalintegration_privatepreview@TIDhjdtn7tfnxcy" -SingleSignOnAadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
+New-AzDynatraceMonitorSSOConfig -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -AadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitorResource
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceSingleSignOnResource
+.Notes
+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.
+
+MONITORINPUTOBJECT : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName ]: Monitor resource name
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
.Link
-https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitor
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitorssoconfig
#>
-function New-AzDynatraceMonitor {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitorResource])]
+function New-AzDynatraceMonitorSSOConfig {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceSingleSignOnResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(Mandatory)]
- [Alias('MonitorName')]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# Monitor resource name
- ${Name},
+ ${MonitorName},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter()]
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
+ # The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # The geo-location where the resource lives
- ${Location},
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
+ # Identity Parameter
+ ${MonitorInputObject},
[Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Account Id of the account this environment is linked to
- ${AccountId},
+ [System.String[]]
+ # array of Aad(azure active directory) domains
+ ${AadDomain},
[Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Region in which the account is created
- ${AccountRegionId},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.Management.Automation.SwitchParameter]
- # Determines whether to enable a system-assigned identity for the resource.
- ${EnableSystemAssignedIdentity},
+ # Version of the Dynatrace agent installed on the VM.
+ ${EnterpriseAppId},
[Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Initial", "Enable", "Disable", "Existing")]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Id of the environment created
- ${EnvironmentId},
+ # State of Single Sign On
+ ${SingleSignOnState},
[Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Ingestion key of the environment
- ${EnvironmentIngestionKey},
+ # The login URL specific to this Dynatrace Environment
+ ${SingleSignOnUrl},
- [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Landing URL for Dynatrace environment
- ${EnvironmentLandingUrl},
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
- [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
[System.String]
- # Ingestion endpoint used for sending logs
- ${EnvironmentLogsIngestionEndpoint},
+ # Json string supplied to the Create operation
+ ${JsonString},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # User id
- ${EnvironmentUserId},
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Active", "Suspended")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Marketplace subscription status.
- ${MarketplaceSubscriptionStatus},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Status of the monitor.
- ${MonitoringStatus},
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # different billing cycles like MONTHLY/WEEKLY.
- # this could be enum
- ${PlanBillingCycle},
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # plan id as published by Dynatrace
- ${PlanDetail},
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.DateTime]
- # date when plan was applied
- ${PlanEffectiveDate},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # different usage type like PAYG/COMMITTED.
- # this could be enum
- ${PlanUsageType},
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
- [Parameter(ParameterSetName='CreateExpanded')]
- [AllowEmptyCollection()]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String[]]
- # array of Aad(azure active directory) domains
- ${SingleSignOnAadDomain},
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # Version of the Dynatrace agent installed on the VM.
- ${SingleSignOnEnterpriseAppId},
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Initial", "Enable", "Disable", "Existing")]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # State of Single Sign On
- ${SingleSignOnState},
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
- [System.String]
- # The login URL specific to this Dynatrace Environment
- ${SingleSignOnUrl},
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateExpanded';
+ CreateViaIdentityMonitorExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaIdentityMonitorExpanded';
+ CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorSSOConfig_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ if (('CreateExpanded', 'CreateViaIdentityMonitorExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name') ) {
+ $PSBoundParameters['Name'] = "default"
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a TagRule
+.Description
+Create a TagRule
+.Example
+$tagFilter = New-AzDynatraceMonitorFilteringTagObject -Action 'Include' -Name 'Environment' -Value 'Prod'
+New-AzDynatraceMonitorTagRule -ResourceGroupName dyobrg -MonitorName dyob-pwsh01 -LogRuleFilteringTag $tagFilter
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ITagRule
+.Notes
+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.
+
+LOGRULEFILTERINGTAG : List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured.If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
+ [Name ]: The name (also known as the key) of the tag.
+ [Value ]: The value of the tag.
+
+METRICRULEFILTERINGTAG : List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.
+ [Action ]: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
+ [Name ]: The name (also known as the key) of the tag.
+ [Value ]: The value of the tag.
+
+MONITORINPUTOBJECT : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName ]: Monitor resource name
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitortagrule
+#>
+function New-AzDynatraceMonitorTagRule {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ITagRule])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${MonitorName},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaJsonFilePath')]
+ [Parameter(ParameterSetName='CreateViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity]
+ # Identity Parameter
+ ${MonitorInputObject},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IFilteringTag[]]
+ # List of filtering tags to be used for capturing logs.
+ # This only takes effect if SendActivityLogs flag is enabled.
+ # If empty, all resources will be captured.If only Exclude action is specified, the rules will apply to the list of all available resources.
+ # If Include actions are specified, the rules will only include resources with the associated tags.
+ ${LogRuleFilteringTag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Flag specifying if AAD logs should be sent for the Monitor resource.
+ ${LogRuleSendAadLog},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Flag specifying if activity logs from Azure resources should be sent for the Monitor resource.
+ ${LogRuleSendActivityLog},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Flag specifying if subscription logs should be sent for the Monitor resource.
+ ${LogRuleSendSubscriptionLog},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IFilteringTag[]]
+ # List of filtering tags to be used for capturing metrics.
+ # If empty, all resources will be captured.
+ # If only Exclude action is specified, the rules will apply to the list of all available resources.
+ # If Include actions are specified, the rules will only include resources with the associated tags.
+ ${MetricRuleFilteringTag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityMonitorExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Flag specifying if metrics from Azure resources should be sent for the Monitor resource.
+ ${MetricRuleSendingMetric},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateExpanded';
+ CreateViaIdentityMonitorExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaIdentityMonitorExpanded';
+ CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitorTagRule_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ if (('CreateExpanded', 'CreateViaIdentityMonitorExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name') ) {
+ $PSBoundParameters['Name'] = "default"
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Create a MonitorResource
+.Description
+Create a MonitorResource
+.Example
+New-AzDynatraceMonitor -ResourceGroupName dyobrg -Name dyob-pwsh02 -Location eastus2euap -UserFirstName 'Lucas' -UserLastName 'Yao' -UserEmailAddress 'v-diya@microsoft.com' -PlanUsageType "COMMITTED" -PlanBillingCycle "Monthly" -PlanDetail "azureportalintegration_privatepreview@TIDhjdtn7tfnxcy" -SingleSignOnAadDomain "mpliftrlogz20210811outlook.onmicrosoft.com"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitorResource
+.Link
+https://learn.microsoft.com/powershell/module/az.dynatraceobservability/new-azdynatracemonitor
+#>
+function New-AzDynatraceMonitor {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IMonitorResource])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('MonitorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # Monitor resource name
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ # The value must be an UUID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # The geo-location where the resource lives
+ ${Location},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Account Id of the account this environment is linked to
+ ${AccountId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Name of the customer account / company
+ ${AccountInfoCompanyName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Region in which the account is created
+ ${AccountRegionId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Id of the environment created
+ ${EnvironmentId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Ingestion key of the environment
+ ${EnvironmentIngestionKey},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Landing URL for Dynatrace environment
+ ${EnvironmentLandingUrl},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Ingestion endpoint used for sending logs
+ ${EnvironmentLogsIngestionEndpoint},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # User id
+ ${EnvironmentUserId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("SystemAssigned", "UserAssigned", "SystemAndUserAssigned")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # The type of managed identity assigned to this resource.
+ ${IdentityType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("On", "Off")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Marketplace resource autorenew flag
+ ${MarketplaceSaasAutoRenew},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Active", "Suspended", "Unsubscribed")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Marketplace subscription status.
+ ${MarketplaceSubscriptionStatus},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Enabled", "Disabled")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Status of the monitor.
+ ${MonitoringStatus},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # different billing cycles like MONTHLY/WEEKLY.
+ # this could be enum
+ ${PlanBillingCycle},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # plan id as published by Dynatrace
+ ${PlanDetail},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.DateTime]
+ # date when plan was applied
+ ${PlanEffectiveDate},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # different usage type like PAYG/COMMITTED.
+ # this could be enum
+ ${PlanUsageType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # array of Aad(azure active directory) domains
+ ${SingleSignOnAadDomain},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Version of the Dynatrace agent installed on the VM.
+ ${SingleSignOnEnterpriseAppId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.PSArgumentCompleterAttribute("Initial", "Enable", "Disable", "Existing")]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # State of Single Sign On
+ ${SingleSignOnState},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # The login URL specific to this Dynatrace Environment
+ ${SingleSignOnUrl},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String[]]
+ # The array of user assigned identities associated with the resource.
+ # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
+ ${UserAssignedIdentity},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Country of the user
+ ${UserCountry},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Email of the user used by Dynatrace for contacting them if needed
+ ${UserEmailAddress},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # First Name of the user
+ ${UserFirstName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Last Name of the user
+ ${UserLastName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Phone number of the user used by Dynatrace for contacting them if needed
+ ${UserPhoneNumber},
+
+ [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Create operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Body')]
+ [System.String]
+ # Json string supplied to the Create operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.DynatraceObservability.private\New-AzDynatraceMonitor_CreateExpanded';
+ CreateViaJsonFilePath = 'Az.DynatraceObservability.private\New-AzDynatraceMonitor_CreateViaJsonFilePath';
+ CreateViaJsonString = 'Az.DynatraceObservability.private\New-AzDynatraceMonitor_CreateViaJsonString';
+ }
+ if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Delete the subscriptions that are being monitored by the Dynatrace monitor resource
+.Description
+Delete the subscriptions that are being monitored by the Dynatrace monitor resource
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+Remove-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -WhatIf
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+Remove-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -Confirm:$false
+.Example
+$rg = "myResourceGroup"
+$monitor = "myDynatraceMonitor"
+Remove-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -Confirm:$false -ErrorAction SilentlyContinue
+.Example
+$rg = "myResourceGroup"; $monitor = "myDynatraceMonitor"
+try {
+ Remove-AzDynatraceMonitoredSubscription -ResourceGroupName $rg -MonitorName $monitor -Confirm:$false
+} catch {
+ Write-Warning "Deletion failed: $($_.Exception.Message). Retry after confirming the monitored subscription was fully created."
+}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DynatraceObservability.Models.IDynatraceObservabilityIdentity
+.Outputs
+System.Boolean
+.Notes
+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 : Identity Parameter
+ [ConfigurationName ]: Single Sign On Configuration Name
+ [DynatraceEnvironmentId ]: Dynatrace Environment Id
+ [Id ]: Resource identity path
+ [MonitorName ]: Monitor resource name
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [RuleSetName