Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Az.Elastic Examples #17115

Merged
merged 1 commit into from
Mar 1, 2022
Merged
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
4 changes: 3 additions & 1 deletion src/Elastic/help/Get-AzElasticDeploymentInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Fetch information regarding Elastic cloud deployment corresponding to the Elasti

### Example 1: Fetch information regarding Elastic cloud deployment corresponding to the Elastic monitor resource
```powershell
PS C:\> Get-AzElasticDeploymentInfo -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v
Get-AzElasticDeploymentInfo -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v
```

```output
DiskCapacity MemoryCapacity Status Version
------------ -------------- ------ -------
491520 16384 Healthy 7.14.1
Expand Down
8 changes: 6 additions & 2 deletions src/Elastic/help/Get-AzElasticDetailVMIngestion.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ List the vm ingestion details that will be monitored by the Elastic monitor reso

### Example 1: List the vm ingestion details that will be monitored by the Elastic monitor resource
```powershell
PS C:\> Get-AzElasticDetailVMIngestion -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v
Get-AzElasticDetailVMIngestion -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v
```

```output
CloudId IngestionKey
------- ------------
elastic-rhqz1v:xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx
Expand All @@ -42,8 +44,10 @@ This command lists the vm ingestion details that will be monitored by the Elasti

### Example 2: List the vm ingestion details that will be monitored by the Elastic monitor resource by pipeline
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v | Get-AzElasticDetailVMIngestion
Get-AzElasticMonitor -ResourceGroupName elastic-rg-3eytki -Name elastic-rhqz1v | Get-AzElasticDetailVMIngestion
```

```output
CloudId IngestionKey
------- ------------
elastic-rhqz1v:xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx
Expand Down
16 changes: 12 additions & 4 deletions src/Elastic/help/Get-AzElasticMonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ Get the properties of a specific monitor resource.

### Example 1: List all elastic monitors under a subscription
```powershell
PS C:\> Get-AzElasticMonitor
Get-AzElasticMonitor
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
kk-elastictest02 ess-monthly-consumption_Monthly Enabled westus2 kk-rg
Expand All @@ -56,8 +58,10 @@ This command lists all elastic monitors under a subscription.

### Example 2: List all elastic monitors under a resource group
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName azure-elastic-test
Get-AzElasticMonitor -ResourceGroupName azure-elastic-test
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-portal01 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand All @@ -70,8 +74,10 @@ This command lists all elastic monitors under a resource group.

### Example 3: Get the properties of a specific monitor resource
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
Get-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand All @@ -81,8 +87,10 @@ This command gets the properties of a specific monitor resource.

### Example 4: Get the properties of a specific monitor resource by pipeline
```powershell
PS C:\> New-AzElasticMonitor -ResourceGroupName azps-elastic-test -Name elastic-pwsh02 -Location "westus2" -SkuName "ess-monthly-consumption_Monthly" -UserInfoEmailAddress 'xxx@microsoft.com' | Get-AzElasticMonitor
New-AzElasticMonitor -ResourceGroupName azps-elastic-test -Name elastic-pwsh02 -Location "westus2" -SkuName "ess-monthly-consumption_Monthly" -UserInfoEmailAddress 'xxx@microsoft.com' | Get-AzElasticMonitor
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand Down
3 changes: 1 addition & 2 deletions src/Elastic/help/Get-AzElasticMonitoredResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ List the resources currently being monitored by the Elastic monitor resource.

### Example 1: List the resources currently being monitored by the Elastic monitor resource
```powershell
PS C:\> Get-AzElasticMonitoredResource -ResourceGroupName azure-elastic-test -Name elastic-pwsh02

Get-AzElasticMonitoredResource -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
```

This command lists the resources currently being monitored by the Elastic monitor resource.
Expand Down
8 changes: 6 additions & 2 deletions src/Elastic/help/Get-AzElasticTagRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ Get a tag rule set for a given monitor resource.

### Example 1: Get a tag rule set for a given monitor resource
```powershell
PS C:\> Get-AzElasticTagRule -ResourceGroupName azure-elastic-test -MonitorName elastic-pwsh02
Get-AzElasticTagRule -ResourceGroupName azure-elastic-test -MonitorName elastic-pwsh02
```

```output
Name ProvisioningState ResourceGroupName
---- ----------------- -----------------
default Succeeded azure-elastic-test
Expand All @@ -41,8 +43,10 @@ This command gets a tag rule set for a given monitor resource.

### Example 2: Get a tag rule set for a given monitor resource by pipeline
```powershell
PS C:\> New-AzElasticTagRule -ResourceGroupName azps-elastic-test -MonitorName elastic-pwsh02 | Get-AzElasticTagRule
New-AzElasticTagRule -ResourceGroupName azps-elastic-test -MonitorName elastic-pwsh02 | Get-AzElasticTagRule
```

```output
Name ProvisioningState ResourceGroupName
---- ----------------- -----------------
default Succeeded azure-elastic-test
Expand Down
4 changes: 3 additions & 1 deletion src/Elastic/help/Get-AzElasticVMHost.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ List the vm resources currently being monitored by the Elastic monitor resource.

### Example 1: List the vm resources currently being monitored by the Elastic monitor resource
```powershell
PS C:\> Get-AzElasticVMHost -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
Get-AzElasticVMHost -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
```

```output
VMResourceId
------------
/subscriptions/xxxxxx-xxxxx-xxxx-xxxxxx/resourceGroups/vidhi-rg/providers/Microsoft.Compute/virtualMachines/vidhi-linuxOS
Expand Down
6 changes: 4 additions & 2 deletions src/Elastic/help/New-AzElasticFilteringTagObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ Create a in-memory object for FilteringTag

### Example 1: Create a in-memory object for FilteringTag used when creating tag rules
```powershell
PS C:\> $ft = New-AzElasticFilteringTagObject -Action Include -Name key -Value '1'
PS C:\> New-AzElasticTagRule -ResourceGroupName azure-elastic-test -MonitorName elastic-pwsh02 -LogRuleFilteringTag $ft
$ft = New-AzElasticFilteringTagObject -Action Include -Name key -Value '1'
New-AzElasticTagRule -ResourceGroupName azure-elastic-test -MonitorName elastic-pwsh02 -LogRuleFilteringTag $ft
```

```output
Name Type
---- ----
default microsoft.elastic/monitors/tagrules
Expand Down
4 changes: 3 additions & 1 deletion src/Elastic/help/New-AzElasticMonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ Create a monitor resource.

### Example 1: Create a monitor resource
```powershell
PS C:\> New-AzElasticMonitor -ResourceGroupName azps-elastic-test -Name elastic-pwsh02 -Location "westus2" -SkuName "ess-monthly-consumption_Monthly" -UserInfoEmailAddress 'xxx@microsoft.com'
New-AzElasticMonitor -ResourceGroupName azps-elastic-test -Name elastic-pwsh02 -Location "westus2" -SkuName "ess-monthly-consumption_Monthly" -UserInfoEmailAddress 'xxx@microsoft.com'
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand Down
4 changes: 3 additions & 1 deletion src/Elastic/help/New-AzElasticTagRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Create or update a tag rule set for a given monitor resource.

### Example 1: Create or update a tag rule set for a given monitor resource
```powershell
PS C:\> New-AzElasticTagRule -ResourceGroupName azps-elastic-test -MonitorName elastic-pwsh02 -LogRuleSendActivityLog
New-AzElasticTagRule -ResourceGroupName azps-elastic-test -MonitorName elastic-pwsh02 -LogRuleSendActivityLog
```

```output
Name ProvisioningState ResourceGroupName
---- ----------------- -----------------
default Succeeded azps-elastic-test
Expand Down
6 changes: 2 additions & 4 deletions src/Elastic/help/Remove-AzElasticMonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ Delete a monitor resource.

### Example 1: Delete a monitor resource
```powershell
PS C:\> Remove-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh02

Remove-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
```

This command delete a monitor resource.

### Example 2: Delete a monitor resource by pipeline
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh03 | Remove-AzElasticMonitor

Get-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh03 | Remove-AzElasticMonitor
```

This command delete a monitor resource by pipeline.
Expand Down
8 changes: 6 additions & 2 deletions src/Elastic/help/Update-AzElasticMonitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ Update a monitor resource.

### Example 1: Update a monitor resource
```powershell
PS C:\> Update-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 -Tag @{'key01' = '1'; 'key2' = '2'; 'key3' = '3'}
Update-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 -Tag @{'key01' = '1'; 'key2' = '2'; 'key3' = '3'}
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand All @@ -42,8 +44,10 @@ This command updates a monitor resource.

### Example 2: Update a monitor resource by pipeline
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 | Update-AzElasticMonitor -Tag @{'key01' = '1'; 'key2' = '2'; 'key3' = '3'}
Get-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 | Update-AzElasticMonitor -Tag @{'key01' = '1'; 'key2' = '2'; 'key3' = '3'}
```

```output
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-monthly-consumption_Monthly Enabled westus2 azure-elastic-test
Expand Down
6 changes: 2 additions & 4 deletions src/Elastic/help/Update-AzElasticVMCollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ Update the vm details that will be monitored by the Elastic monitor resource.

### Example 1: Update the vm details that will be monitored by the Elastic monitor resource
```powershell
PS C:\> Update-AzElasticVMCollection -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 -OperationName Add -VMResourceId '/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/VIDHI-RG/providers/Microsoft.Compute/virtualMachines/vidhi-linuxOS'

Update-AzElasticVMCollection -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 -OperationName Add -VMResourceId '/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/VIDHI-RG/providers/Microsoft.Compute/virtualMachines/vidhi-linuxOS'
```

This command updates the vm details that will be monitored by the Elastic monitor resource

### Example 2: Update the vm details that will be monitored by the Elastic monitor resource by pipeline
```powershell
PS C:\> Get-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 | Update-AzElasticVMCollection -OperationName Delete -VMResourceId '/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/VIDHI-RG/providers/Microsoft.Compute/virtualMachines/vidhi-linuxOS'

Get-AzElasticMonitor -ResourceGroupName lucas-elastic-test -Name elastic-pwsh02 | Update-AzElasticVMCollection -OperationName Delete -VMResourceId '/subscriptions/xxxxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx/resourceGroups/VIDHI-RG/providers/Microsoft.Compute/virtualMachines/vidhi-linuxOS'
```

This command updates the vm details that will be monitored by the Elastic monitor resource by pipeline.
Expand Down