Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/Datadog/Datadog.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Datadog")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

4 changes: 2 additions & 2 deletions src/Datadog/Datadog.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ For information on how to develop for `Az.Datadog`, see [how-to.md](how-to.md).
> see https://aka.ms/autorest

``` yaml
commit: 2e3f1e0c67ee7da1d681a26b6b23b888ce856695
commit: 84298cdc6b918812b002cc2ba05df0ec23f4e352
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/datadog.json
- https://github.com/Azure/azure-rest-api-specs/blob/main/specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/datadog.json

title: Datadog
module-version: 0.1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"resourceType": "monitors/monitoredSubscriptions",
"apiVersion": "2025-06-11",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
},
"commands": [
{
"name": "Get-AzDatadogMonitoredSubscription",
"description": "List the subscriptions currently being monitored by the Datadog monitor resource.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogmonitoredsubscription"
},
"parameterSets": [
{
"parameters": [
"-ConfigurationName <String>",
"-MonitorName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "List the subscriptions currently being monitored by the Datadog monitor resource.",
"parameters": [
{
"name": "-ConfigurationName",
"value": "[Path.configurationName]"
},
{
"name": "-MonitorName",
"value": "[Path.monitorName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzDatadogMonitoredSubscription",
"description": "Delete the subscriptions that are being monitored by the Datadog monitor resource",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog/remove-azdatadogmonitoredsubscription"
},
"parameterSets": [
{
"parameters": [
"-ConfigurationName <String>",
"-MonitorName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "delete the subscriptions that are being monitored by the Datadog monitor resource",
"parameters": [
{
"name": "-ConfigurationName",
"value": "[Path.configurationName]"
},
{
"name": "-MonitorName",
"value": "[Path.monitorName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "monitors/singleSignOnConfigurations",
"apiVersion": "2021-03-01",
"apiVersion": "2025-06-11",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "monitors/tagRules",
"apiVersion": "2021-03-01",
"apiVersion": "2025-06-11",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
},
Expand Down
40 changes: 39 additions & 1 deletion src/Datadog/Datadog.Autorest/UX/Microsoft.Datadog/monitors.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
{
"resourceType": "monitors",
"apiVersion": "2021-03-01",
"apiVersion": "2025-06-11",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog"
},
"commands": [
{
"name": "Get-AzDatadogBillingInfo",
"description": "Get marketplace and organization info mapped to the given monitor.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getBillingInfo",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.datadog/get-azdatadogbillinginfo"
},
"parameterSets": [
{
"parameters": [
"-MonitorName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get marketplace and organization info mapped to the given monitor.",
"parameters": [
{
"name": "-MonitorName",
"value": "[Path.monitorName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Get-AzDatadogMonitorDefaultKey",
"description": "Get the default api key.",
Expand Down
4 changes: 2 additions & 2 deletions src/Datadog/Datadog.Autorest/custom/Az.Datadog.custom.psm1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Datadog.private.dll')
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.Datadog.private.dll')

# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Datadog.internal.psm1'
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.Datadog.internal.psm1'
if(Test-Path $internalModulePath) {
$null = Import-Module -Name $internalModulePath
}
Expand Down
8 changes: 4 additions & 4 deletions src/Datadog/Datadog.Autorest/custom/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Custom
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.
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.

## Info
- Modifiable: yes
Expand All @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
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.

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

## Usage
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:
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:
- Break
- DefaultProfile
- HttpPipelineAppend
Expand All @@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Datadog`.
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.InternalExportAttribute`
- 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.
- 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.
- `Microsoft.Azure.PowerShell.Cmdlets.Datadog.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
33 changes: 27 additions & 6 deletions src/Datadog/Datadog.Autorest/docs/Az.Datadog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Datadog
Module Guid: 7e474a6d-4d29-4af2-9fee-07f3bd7af5fe
Module Guid: 936ca4f8-ca75-4cc5-9e9d-78bb6a5f8b16
Download Help Link: https://learn.microsoft.com/powershell/module/az.datadog
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -11,6 +11,12 @@ Locale: en-US
Microsoft Azure PowerShell: Datadog cmdlets

## Az.Datadog Cmdlets
### [Get-AzDatadogBillingInfo](Get-AzDatadogBillingInfo.md)
Get marketplace and organization info mapped to the given monitor.

### [Get-AzDatadogCreationSupported](Get-AzDatadogCreationSupported.md)
Informs if the current subscription is being already monitored for selected Datadog organization.

### [Get-AzDatadogMarketplaceAgreement](Get-AzDatadogMarketplaceAgreement.md)
List Datadog marketplace agreements in the subscription.

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

### [Get-AzDatadogMonitoredSubscription](Get-AzDatadogMonitoredSubscription.md)
List the subscriptions currently being monitored by the Datadog monitor resource.

### [Get-AzDatadogMonitorHost](Get-AzDatadogMonitorHost.md)
List the hosts for a given monitor resource.

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

### [Invoke-AzDatadogResubscribeOrganization](Invoke-AzDatadogResubscribeOrganization.md)
Reinstate integration with your Datadog organization by choosing one of the available subscription plans.

### [New-AzDatadogFilteringTagObject](New-AzDatadogFilteringTagObject.md)
Create an in-memory object for FilteringTag.

### [New-AzDatadogMarketplaceAgreement](New-AzDatadogMarketplaceAgreement.md)
create Datadog marketplace agreement in the subscription.
Create Datadog marketplace agreement in the subscription.

### [New-AzDatadogMonitor](New-AzDatadogMonitor.md)
create a monitor resource.
Create a monitor resource.

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

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

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

### [Remove-AzDatadogMonitoredSubscription](Remove-AzDatadogMonitoredSubscription.md)
Delete the subscriptions that are being monitored by the Datadog monitor resource

### [Set-AzDatadogMonitorDefaultKey](Set-AzDatadogMonitorDefaultKey.md)
Set the default api key.

### [Set-AzDatadogMonitoredSubscriptionCreateor](Set-AzDatadogMonitoredSubscriptionCreateor.md)
Add the subscriptions that should be monitored by the Datadog monitor resource.

### [Update-AzDatadogMonitor](Update-AzDatadogMonitor.md)
update a monitor resource.
Update a monitor resource.

### [Update-AzDatadogMonitoredSubscription](Update-AzDatadogMonitoredSubscription.md)
Update the subscriptions that are being monitored by the Datadog monitor resource

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

### [Update-AzDatadogTagRule](Update-AzDatadogTagRule.md)
update a tag rule set for a given monitor resource.
Update a tag rule set for a given monitor resource.

Loading