Skip to content

Commit be0ea83

Browse files
Datadog update powershell commands to 2025-06-11 spec (#28832)
Co-authored-by: Bhanu Chand J <[email protected]>
1 parent 4a084e5 commit be0ea83

File tree

82 files changed

+6104
-835
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+6104
-835
lines changed

src/Datadog/Datadog.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Datadog")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]
27-

src/Datadog/Datadog.Autorest/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ For information on how to develop for `Az.Datadog`, see [how-to.md](how-to.md).
2727
> see https://aka.ms/autorest
2828
2929
``` yaml
30-
commit: 2e3f1e0c67ee7da1d681a26b6b23b888ce856695
30+
commit: 84298cdc6b918812b002cc2ba05df0ec23f4e352
3131
require:
3232
- $(this-folder)/../../readme.azure.noprofile.md
3333
input-file:
34-
- $(repo)/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/datadog.json
34+
- $(repo)/specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/datadog.json
3535

3636
title: Datadog
3737
module-version: 0.1.0
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"resourceType": "monitors/monitoredSubscriptions",
3+
"apiVersion": "2025-06-11",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzDatadogMonitoredSubscription",
10+
"description": "List the subscriptions currently being monitored by the Datadog monitor resource.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmonitoredsubscription"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-ConfigurationName <String>",
20+
"-MonitorName <String>",
21+
"-ResourceGroupName <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "List the subscriptions currently being monitored by the Datadog monitor resource.",
30+
"parameters": [
31+
{
32+
"name": "-ConfigurationName",
33+
"value": "[Path.configurationName]"
34+
},
35+
{
36+
"name": "-MonitorName",
37+
"value": "[Path.monitorName]"
38+
},
39+
{
40+
"name": "-ResourceGroupName",
41+
"value": "[Path.resourceGroupName]"
42+
},
43+
{
44+
"name": "-SubscriptionId",
45+
"value": "[Path.subscriptionId]"
46+
}
47+
]
48+
}
49+
]
50+
},
51+
{
52+
"name": "Remove-AzDatadogMonitoredSubscription",
53+
"description": "Delete the subscriptions that are being monitored by the Datadog monitor resource",
54+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
55+
"help": {
56+
"learnMore": {
57+
"url": "https://learn.microsoft.com/powershell/module/az.datadog/remove-azdatadogmonitoredsubscription"
58+
},
59+
"parameterSets": [
60+
{
61+
"parameters": [
62+
"-ConfigurationName <String>",
63+
"-MonitorName <String>",
64+
"-ResourceGroupName <String>",
65+
"[-SubscriptionId <String>]"
66+
]
67+
}
68+
]
69+
},
70+
"examples": [
71+
{
72+
"description": "delete the subscriptions that are being monitored by the Datadog monitor resource",
73+
"parameters": [
74+
{
75+
"name": "-ConfigurationName",
76+
"value": "[Path.configurationName]"
77+
},
78+
{
79+
"name": "-MonitorName",
80+
"value": "[Path.monitorName]"
81+
},
82+
{
83+
"name": "-ResourceGroupName",
84+
"value": "[Path.resourceGroupName]"
85+
},
86+
{
87+
"name": "-SubscriptionId",
88+
"value": "[Path.subscriptionId]"
89+
}
90+
]
91+
}
92+
]
93+
}
94+
]
95+
}

src/Datadog/Datadog.Autorest/UX/Microsoft.Datadog/monitors-singleSignOnConfigurations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "monitors/singleSignOnConfigurations",
3-
"apiVersion": "2021-03-01",
3+
"apiVersion": "2025-06-11",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
66
},

src/Datadog/Datadog.Autorest/UX/Microsoft.Datadog/monitors-tagRules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "monitors/tagRules",
3-
"apiVersion": "2021-03-01",
3+
"apiVersion": "2025-06-11",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
66
},

src/Datadog/Datadog.Autorest/UX/Microsoft.Datadog/monitors.json

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
11
{
22
"resourceType": "monitors",
3-
"apiVersion": "2021-03-01",
3+
"apiVersion": "2025-06-11",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
66
},
77
"commands": [
8+
{
9+
"name": "Get-AzDatadogBillingInfo",
10+
"description": "Get marketplace and organization info mapped to the given monitor.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getBillingInfo",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogbillinginfo"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-MonitorName <String>",
20+
"-ResourceGroupName <String>",
21+
"[-SubscriptionId <String[]>]"
22+
]
23+
}
24+
]
25+
},
26+
"examples": [
27+
{
28+
"description": "Get marketplace and organization info mapped to the given monitor.",
29+
"parameters": [
30+
{
31+
"name": "-MonitorName",
32+
"value": "[Path.monitorName]"
33+
},
34+
{
35+
"name": "-ResourceGroupName",
36+
"value": "[Path.resourceGroupName]"
37+
},
38+
{
39+
"name": "-SubscriptionId",
40+
"value": "[Path.subscriptionId]"
41+
}
42+
]
43+
}
44+
]
45+
},
846
{
947
"name": "Get-AzDatadogMonitorDefaultKey",
1048
"description": "Get the default api key.",

src/Datadog/Datadog.Autorest/custom/Az.Datadog.custom.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# region Generated
22
# Load the private module dll
3-
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Datadog.private.dll')
3+
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.Datadog.private.dll')
44

55
# Load the internal module
6-
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Datadog.internal.psm1'
6+
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.Datadog.internal.psm1'
77
if(Test-Path $internalModulePath) {
88
$null = Import-Module -Name $internalModulePath
99
}

src/Datadog/Datadog.Autorest/custom/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Custom
2-
This directory contains custom implementation for non-generated cmdlets for the `Az.Datadog` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Datadog.custom.psm1`. This file should not be modified.
2+
This directory contains custom implementation for non-generated cmdlets for the `Az.Datadog` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.Datadog.custom.psm1`. This file should not be modified.
33

44
## Info
55
- Modifiable: yes
@@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
1515
For script cmdlets, these are loaded via the `Az.Datadog.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
18-
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
18+
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
1919

2020
## Usage
21-
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
21+
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
2222
- Break
2323
- DefaultProfile
2424
- HttpPipelineAppend
@@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
3636
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Datadog`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Datadog`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Datadog`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/Datadog/Datadog.Autorest/docs/Az.Datadog.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Datadog
3-
Module Guid: 7e474a6d-4d29-4af2-9fee-07f3bd7af5fe
3+
Module Guid: 936ca4f8-ca75-4cc5-9e9d-78bb6a5f8b16
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.datadog
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -11,6 +11,12 @@ Locale: en-US
1111
Microsoft Azure PowerShell: Datadog cmdlets
1212

1313
## Az.Datadog Cmdlets
14+
### [Get-AzDatadogBillingInfo](Get-AzDatadogBillingInfo.md)
15+
Get marketplace and organization info mapped to the given monitor.
16+
17+
### [Get-AzDatadogCreationSupported](Get-AzDatadogCreationSupported.md)
18+
Informs if the current subscription is being already monitored for selected Datadog organization.
19+
1420
### [Get-AzDatadogMarketplaceAgreement](Get-AzDatadogMarketplaceAgreement.md)
1521
List Datadog marketplace agreements in the subscription.
1622

@@ -23,6 +29,9 @@ List the api keys for a given monitor resource.
2329
### [Get-AzDatadogMonitorDefaultKey](Get-AzDatadogMonitorDefaultKey.md)
2430
Get the default api key.
2531

32+
### [Get-AzDatadogMonitoredSubscription](Get-AzDatadogMonitoredSubscription.md)
33+
List the subscriptions currently being monitored by the Datadog monitor resource.
34+
2635
### [Get-AzDatadogMonitorHost](Get-AzDatadogMonitorHost.md)
2736
List the hosts for a given monitor resource.
2837

@@ -38,29 +47,41 @@ Gets the datadog single sign-on resource for the given Monitor.
3847
### [Get-AzDatadogTagRule](Get-AzDatadogTagRule.md)
3948
Get a tag rule set for a given monitor resource.
4049

50+
### [Invoke-AzDatadogResubscribeOrganization](Invoke-AzDatadogResubscribeOrganization.md)
51+
Reinstate integration with your Datadog organization by choosing one of the available subscription plans.
52+
4153
### [New-AzDatadogFilteringTagObject](New-AzDatadogFilteringTagObject.md)
4254
Create an in-memory object for FilteringTag.
4355

4456
### [New-AzDatadogMarketplaceAgreement](New-AzDatadogMarketplaceAgreement.md)
45-
create Datadog marketplace agreement in the subscription.
57+
Create Datadog marketplace agreement in the subscription.
4658

4759
### [New-AzDatadogMonitor](New-AzDatadogMonitor.md)
48-
create a monitor resource.
60+
Create a monitor resource.
4961

5062
### [New-AzDatadogSingleSignOnConfiguration](New-AzDatadogSingleSignOnConfiguration.md)
5163
Configures single-sign-on for this resource.
5264

5365
### [New-AzDatadogTagRule](New-AzDatadogTagRule.md)
54-
create a tag rule set for a given monitor resource.
66+
Create a tag rule set for a given monitor resource.
5567

5668
### [Remove-AzDatadogMonitor](Remove-AzDatadogMonitor.md)
5769
Delete a monitor resource.
5870

71+
### [Remove-AzDatadogMonitoredSubscription](Remove-AzDatadogMonitoredSubscription.md)
72+
Delete the subscriptions that are being monitored by the Datadog monitor resource
73+
5974
### [Set-AzDatadogMonitorDefaultKey](Set-AzDatadogMonitorDefaultKey.md)
6075
Set the default api key.
6176

77+
### [Set-AzDatadogMonitoredSubscriptionCreateor](Set-AzDatadogMonitoredSubscriptionCreateor.md)
78+
Add the subscriptions that should be monitored by the Datadog monitor resource.
79+
6280
### [Update-AzDatadogMonitor](Update-AzDatadogMonitor.md)
63-
update a monitor resource.
81+
Update a monitor resource.
82+
83+
### [Update-AzDatadogMonitoredSubscription](Update-AzDatadogMonitoredSubscription.md)
84+
Update the subscriptions that are being monitored by the Datadog monitor resource
6485

6586
### [Update-AzDatadogMonitorSetPasswordLink](Update-AzDatadogMonitorSetPasswordLink.md)
6687
Refresh the set password link and return a latest one.
@@ -69,5 +90,5 @@ Refresh the set password link and return a latest one.
6990
Configures single-sign-on for this resource.
7091

7192
### [Update-AzDatadogTagRule](Update-AzDatadogTagRule.md)
72-
update a tag rule set for a given monitor resource.
93+
Update a tag rule set for a given monitor resource.
7394

0 commit comments

Comments
 (0)