Skip to content

Commit b0d8d60

Browse files
Move Elastic to main (#26340)
Co-authored-by: azure-powershell-bot <[email protected]>
1 parent c27c11b commit b0d8d60

File tree

485 files changed

+67235
-3990
lines changed

Some content is hidden

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

485 files changed

+67235
-3990
lines changed

src/Elastic/Elastic.Autorest/Az.Elastic.format.ps1xml

Lines changed: 806 additions & 138 deletions
Large diffs are not rendered by default.

src/Elastic/Elastic.Autorest/Az.Elastic.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Elastic.private.dll'
1313
FormatsToProcess = './Az.Elastic.format.ps1xml'
14-
FunctionsToExport = 'Get-AzElasticDeploymentInfo', 'Get-AzElasticDetailVMIngestion', 'Get-AzElasticMonitor', 'Get-AzElasticMonitoredResource', 'Get-AzElasticTagRule', 'Get-AzElasticVMHost', 'New-AzElasticFilteringTagObject', 'New-AzElasticMonitor', 'New-AzElasticTagRule', 'Remove-AzElasticMonitor', 'Update-AzElasticMonitor', 'Update-AzElasticVMCollection', '*'
14+
FunctionsToExport = 'Get-AzElasticAllTrafficFilter', 'Get-AzElasticBillingInfo', 'Get-AzElasticConnectedPartnerResource', 'Get-AzElasticDeploymentInfo', 'Get-AzElasticDetailUpgradableVersion', 'Get-AzElasticDetailVMIngestion', 'Get-AzElasticListAssociatedTrafficFilter', 'Get-AzElasticMonitor', 'Get-AzElasticMonitoredResource', 'Get-AzElasticOpenAi', 'Get-AzElasticOpenAiStatus', 'Get-AzElasticOrganizationApiKey', 'Get-AzElasticOrganizationElasticToAzureSubscriptionMapping', 'Get-AzElasticTagRule', 'Get-AzElasticVersion', 'Get-AzElasticVMHost', 'Join-AzElasticAssociateTrafficFilter', 'New-AzElasticCreateAndAssociateIPFilter', 'New-AzElasticCreateAndAssociatePlFilter', 'New-AzElasticExternalUser', 'New-AzElasticFilteringTagObject', 'New-AzElasticMonitor', 'New-AzElasticOpenAi', 'New-AzElasticTagRule', 'Remove-AzElasticDetachAndDeleteTrafficFilter', 'Remove-AzElasticMonitor', 'Remove-AzElasticOpenAi', 'Remove-AzElasticTrafficFilter', 'Update-AzElasticDetachTrafficFilter', 'Update-AzElasticExternalUser', 'Update-AzElasticMonitor', 'Update-AzElasticVMCollection', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Elastic/Elastic.Autorest/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ For information on how to develop for `Az.Elastic`, see [how-to.md](how-to.md).
2828
2929
``` yaml
3030
# lock the commit
31-
commit: eee9cbba738edde2ea48ea0c826f84619e2561df
31+
commit: d38a2c3ce2e2dfc38053af2f6b5fc10cb6221961
32+
tag: package-2024-03-01
3233
require:
3334
- $(this-folder)/../../readme.azure.noprofile.md
34-
input-file:
35-
- $(repo)/specification/elastic/resource-manager/Microsoft.Elastic/stable/2020-07-01/elastic.json
35+
- $(repo)/specification/elastic/resource-manager/readme.md
36+
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
37+
# - (this-folder)/relative-path-to-your-local-readme.md
38+
39+
try-require:
40+
- $(repo)/specification/elastic/resource-manager/readme.powershell.md
3641

3742
title: Elastic
3843
module-version: 0.1.0
39-
subject-prefix: $(service-name)
44+
subject-prefix: $elastic
4045

4146
identity-correction-for-post: true
4247
resourcegroup-append: true
@@ -107,7 +112,7 @@ directive:
107112
parameter-description: The SKU depends on the Elasticsearch Plans available for your account and is a combination of PlanID_Term. \<br>For instance, if the plan ID is "planXYZ" and term is "Yearly", the SKU will be "planXYZ_Yearly". \<br>You may find your eligible plans [here](https://portal.azure.com/#view/Microsoft_Azure_Marketplace/GalleryItemDetailsBladeNopdl/id/elastic.ec-azure-pp/selectionMode~/false/resourceGroupId//resourceGroupLocation//dontDiscardJourney~/false/selectedMenuId/home/launchingContext~/%7B%22galleryItemId%22%3A%22elastic.ec-azure-ppess-consumption-2024%22%2C%22source%22%3A%5B%22GalleryFeaturedMenuItemPart%22%2C%22VirtualizedTileDetails%22%5D%2C%22menuItemId%22%3A%22home%22%2C%22subMenuItemId%22%3A%22Search%20results%22%2C%22telemetryId%22%3A%2262f8ce76-e5e4-4983-9d3e-5c608a0b2bff%22%7D/searchTelemetryId/cca0a8d3-f232-4156-948f-701a5d74a729) or in the online documentation [here](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/elastic.ec-azure-pp) for more details or in case of any issues with the SKU.
108113

109114
- where:
110-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
115+
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^UpgradeViaIdentityExpanded$
111116
subject: Monitor|VMCollection|TagRule
112117
remove: true
113118

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"resourceType": "monitors/openAIIntegrations",
3+
"apiVersion": "2024-03-01",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.elastic"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzElasticOpenAiStatus",
10+
"description": "Get OpenAI integration status for a given integration.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/openAIIntegrations/{integrationName}/getStatus",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticopenaistatus"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-IntegrationName <String>",
20+
"-MonitorName <String>",
21+
"-ResourceGroupName <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "Get OpenAI integration status for a given integration.",
30+
"parameters": [
31+
{
32+
"name": "-IntegrationName",
33+
"value": "[Path.integrationName]"
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": "Get-AzElasticOpenAi",
53+
"description": "Get OpenAI integration rule for a given monitor resource.",
54+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/openAIIntegrations/{integrationName}",
55+
"help": {
56+
"learnMore": {
57+
"url": "https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticopenai"
58+
},
59+
"parameterSets": [
60+
{
61+
"parameters": [
62+
"-IntegrationName <String>",
63+
"-MonitorName <String>",
64+
"-ResourceGroupName <String>",
65+
"[-SubscriptionId <String[]>]"
66+
]
67+
}
68+
]
69+
},
70+
"examples": [
71+
{
72+
"description": "Get OpenAI integration rule for a given monitor resource.",
73+
"parameters": [
74+
{
75+
"name": "-IntegrationName",
76+
"value": "[Path.integrationName]"
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+
"name": "Remove-AzElasticOpenAi",
96+
"description": "Delete OpenAI integration rule for a given monitor resource.",
97+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/openAIIntegrations/{integrationName}",
98+
"help": {
99+
"learnMore": {
100+
"url": "https://learn.microsoft.com/powershell/module/az.elastic/remove-azelasticopenai"
101+
},
102+
"parameterSets": [
103+
{
104+
"parameters": [
105+
"-IntegrationName <String>",
106+
"-MonitorName <String>",
107+
"-ResourceGroupName <String>",
108+
"[-SubscriptionId <String>]"
109+
]
110+
}
111+
]
112+
},
113+
"examples": [
114+
{
115+
"description": "Delete OpenAI integration rule for a given monitor resource.",
116+
"parameters": [
117+
{
118+
"name": "-IntegrationName",
119+
"value": "[Path.integrationName]"
120+
},
121+
{
122+
"name": "-MonitorName",
123+
"value": "[Path.monitorName]"
124+
},
125+
{
126+
"name": "-ResourceGroupName",
127+
"value": "[Path.resourceGroupName]"
128+
},
129+
{
130+
"name": "-SubscriptionId",
131+
"value": "[Path.subscriptionId]"
132+
}
133+
]
134+
}
135+
]
136+
}
137+
]
138+
}

src/Elastic/Elastic.Autorest/UX/Microsoft.Elastic/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": "2020-07-01",
3+
"apiVersion": "2024-03-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elastic"
66
},

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

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,86 @@
11
{
22
"resourceType": "monitors",
3-
"apiVersion": "2020-07-01",
3+
"apiVersion": "2024-03-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.elastic"
66
},
77
"commands": [
8+
{
9+
"name": "Get-AzElasticBillingInfo",
10+
"description": "Get marketplace and organization info mapped to the given monitor.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/getBillingInfo",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticbillinginfo"
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+
},
46+
{
47+
"name": "Get-AzElasticDetailUpgradableVersion",
48+
"description": "List of upgradable versions for a given monitor resource.",
49+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Elastic/monitors/{monitorName}/listUpgradableVersions",
50+
"help": {
51+
"learnMore": {
52+
"url": "https://learn.microsoft.com/powershell/module/az.elastic/get-azelasticdetailupgradableversion"
53+
},
54+
"parameterSets": [
55+
{
56+
"parameters": [
57+
"-MonitorName <String>",
58+
"-ResourceGroupName <String>",
59+
"[-SubscriptionId <String[]>]"
60+
]
61+
}
62+
]
63+
},
64+
"examples": [
65+
{
66+
"description": "List of upgradable versions for a given monitor resource.",
67+
"parameters": [
68+
{
69+
"name": "-MonitorName",
70+
"value": "[Path.monitorName]"
71+
},
72+
{
73+
"name": "-ResourceGroupName",
74+
"value": "[Path.resourceGroupName]"
75+
},
76+
{
77+
"name": "-SubscriptionId",
78+
"value": "[Path.subscriptionId]"
79+
}
80+
]
81+
}
82+
]
83+
},
884
{
985
"name": "Get-AzElasticDetailVMIngestion",
1086
"description": "List the vm ingestion details that will be monitored by the Elastic monitor resource.",

src/Elastic/Elastic.Autorest/build-module.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -67,6 +67,8 @@ if(-not $Isolated -and -not $Debugger) {
6767
$binFolder = Join-Path $PSScriptRoot 'bin'
6868
$objFolder = Join-Path $PSScriptRoot 'obj'
6969

70+
$isAzure = [System.Convert]::ToBoolean('true')
71+
7072
if(-not $Debugger) {
7173
Write-Host -ForegroundColor Green 'Cleaning build folders...'
7274
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
@@ -143,7 +145,7 @@ if($NoDocs) {
143145
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144146
}
145147
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
148+
$addComplexInterfaceInfo = !$isAzure
147149
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
148150
}
149151

@@ -169,4 +171,13 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169171
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170172
}
171173

172-
Write-Host -ForegroundColor Green '-------------Done-------------'
174+
if (-not $DisableAfterBuildTasks){
175+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
176+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
177+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
178+
Write-Host -ForegroundColor Green 'Running after build tasks...'
179+
. $afterBuildTasksPath @afterBuildTasksArgs
180+
}
181+
}
182+
183+
Write-Host -ForegroundColor Green '-------------Done-------------'

src/Elastic/Elastic.Autorest/create-model-cmdlets.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ function CreateModelCmdlet {
6868
$ObjectType = $Model
6969
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
7070
# remove duplicated module name
71-
if ($ObjectType.StartsWith('Elastic')) {
71+
if ($ObjectType.StartsWith('$elastic')) {
7272
$ModulePrefix = ''
7373
} else {
74-
$ModulePrefix = 'Elastic'
74+
$ModulePrefix = '$elastic'
7575
}
7676
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7777

src/Elastic/Elastic.Autorest/custom/New-AzElasticFilteringTagObject.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
Create a in-memory object for FilteringTag
2121
2222
.Outputs
23-
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20200701.FilteringTag
23+
Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.FilteringTag
2424
.Link
2525
https://learn.microsoft.com/powershell/module/az.Elastic/new-AzElasticFilteringTagObject
2626
#>
2727
function New-AzElasticFilteringTagObject {
28-
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20200701.FilteringTag')]
28+
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.FilteringTag')]
2929
[CmdletBinding(PositionalBinding=$false)]
3030
Param(
3131

@@ -42,7 +42,7 @@
4242
)
4343

4444
process {
45-
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20200701.FilteringTag]::New()
45+
$Object = [Microsoft.Azure.PowerShell.Cmdlets.Elastic.Models.Api20240301.FilteringTag]::New()
4646

4747
$Object.Action = $Action
4848
$Object.Name = $Name
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### Example 1: Get the list of all traffic filters for the account.
2+
```powershell
3+
Get-AzElasticAllTrafficFilter -ResourceGroupName elastic-rg-3eytki -MonitorName elastic-rhqz1v
4+
```
5+
6+
This command will Get the list of all traffic filters for the account.

0 commit comments

Comments
 (0)