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

Create AMG list-all-available-plugins #547

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions Commands/grafana/_list-available-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# [Command] _grafana list-available-plugin_

list all the available plugins

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we organize this command in a new 'az grafana plugins' subgroup? So something like 'az grafana plugins fetch' for this command

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, this is already in effect, so don't want to create a breaking change at this point


## Versions

### [2023-09-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5kYXNoYm9hcmQvZ3JhZmFuYS97fS9mZXRjaGF2YWlsYWJsZXBsdWdpbnM=/2023-09-01.xml) **Stable**

<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins 2023-09-01 -->
3 changes: 3 additions & 0 deletions Commands/grafana/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Commands to manage Azure Managed Grafana resources.
- [list](/Commands/grafana/_list.md)
: List all resources of workspaces for Grafana under the specified subscription.

- [list-available-plugin](/Commands/grafana/_list-available-plugin.md)
: list all the available plugins

- [show](/Commands/grafana/_show.md)
: Get the properties of a specific workspace for Grafana resource.

Expand Down
21 changes: 21 additions & 0 deletions Commands/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -46986,6 +46986,27 @@
}
]
},
"list-available-plugin": {
"help": {
"short": "list all the available plugins"
},
"names": [
"grafana",
"list-available-plugin"
],
"versions": [
{
"name": "2023-09-01",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins",
"plane": "mgmt-plane",
"version": "2023-09-01"
}
]
}
]
},
"show": {
"help": {
"short": "Get the properties of a specific workspace for Grafana resource."
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmE=/V/MjAyMy0wOS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription s" required="True" group="" idPart="subscription">
<help short=""/>
</arg>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
</argGroup>
<condition var="$Condition_Grafana_ListByResourceGroup">
<operator type="and">
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9/V/MjAyMy0wOS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription s" required="True" group="" idPart="subscription">
<help short=""/>
</arg>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.workspaceName" options="workspace-name name n" required="True" idPart="name">
<help short="The workspace name of Azure Managed Grafana."/>
</arg>
Expand Down Expand Up @@ -245,9 +243,7 @@
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9/V/MjAyMy0wOS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription s" required="True" group="" idPart="subscription">
<help short=""/>
</arg>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.workspaceName" options="workspace-name name n" required="True" idPart="name">
<help short="The workspace name of Azure Managed Grafana."/>
</arg>
Expand Down Expand Up @@ -293,9 +289,7 @@
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9/V/MjAyMy0wOS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription s" required="True" group="" idPart="subscription">
<help short=""/>
</arg>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.workspaceName" options="workspace-name name n" required="True" idPart="name">
<help short="The workspace name of Azure Managed Grafana."/>
</arg>
Expand Down Expand Up @@ -883,8 +877,7 @@
</argGroup>
<argGroup name="Smtp">
<arg type="boolean" var="$requestBodyParameters.properties.grafanaConfigurations.smtp.enabled" options="smtp-enabled smtp" group="Smtp">
<help short="Enable this to allow Grafana to send email. Default is false"/>
<default value="false"/>
<help short="Enable this to allow Grafana to send email."/>
</arg>
<arg type="string" var="$requestBodyParameters.properties.grafanaConfigurations.smtp.fromAddress" options="from-address" group="Smtp">
<help short="Address used when sending out emails&#13; https://pkg.go.dev/net/mail#Address"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins", "version": "2023-09-01", "swagger": "mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9L2ZldGNoQXZhaWxhYmxlUGx1Z2lucw==/V/MjAyMy0wOS0wMQ=="}], "commandGroups": [{"name": "grafana", "commands": [{"name": "list-available-plugin", "version": "2023-09-01", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins", "version": "2023-09-01", "swagger": "mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9L2ZldGNoQXZhaWxhYmxlUGx1Z2lucw==/V/MjAyMy0wOS0wMQ=="}], "argGroups": [{"name": "", "args": [{"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "idPart": "resource_group"}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "idPart": "subscription"}, {"type": "string", "var": "$Path.workspaceName", "options": ["n", "name", "workspace-name"], "required": true, "group": "", "idPart": "name", "help": {"short": "The workspace name of Azure Managed Grafana."}}]}], "operations": [{"operationId": "Grafana_FetchAvailablePlugins", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/fetchAvailablePlugins", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true, "format": {"maxLength": 90, "minLength": 1}}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true, "format": {"minLength": 1}}, {"type": "string", "name": "workspaceName", "arg": "$Path.workspaceName", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2023-09-01"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "item": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "name"}, {"readOnly": true, "type": "string", "name": "pluginId"}]}, "identifiers": ["pluginId"]}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}], "confirmation": ""}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9L2ZldGNoQXZhaWxhYmxlUGx1Z2lucw==/V/MjAyMy0wOS0wMQ=="/>
<commandGroup name="grafana">
<command name="list-available-plugin" version="2023-09-01" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.dashboard/grafana/{}/fetchavailableplugins" version="2023-09-01" swagger="mgmt-plane/dashboard/ResourceProviders/Microsoft.Dashboard/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGFzaGJvYXJkL2dyYWZhbmEve3dvcmtzcGFjZU5hbWV9L2ZldGNoQXZhaWxhYmxlUGx1Z2lucw==/V/MjAyMy0wOS0wMQ=="/>
<argGroup name="">
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" idPart="resource_group"/>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" idPart="subscription"/>
<arg type="string" var="$Path.workspaceName" options="workspace-name name n" required="True" group="" idPart="name">
<help short="The workspace name of Azure Managed Grafana."/>
</arg>
</argGroup>
<operation operationId="Grafana_FetchAvailablePlugins">
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/fetchAvailablePlugins">
<request method="post">
<path>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True">
<format maxLength="90" minLength="1"/>
</param>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True">
<format minLength="1"/>
</param>
<param type="string" name="workspaceName" arg="$Path.workspaceName" required="True"/>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2023-09-01&quot;"/>
<format minLength="1"/>
</const>
</query>
</request>
<response statusCode="200">
<body>
<json var="$Instance">
<schema type="object">
<prop type="string" name="nextLink"/>
<prop type="array<object>" name="value" identifiers="pluginId">
<item type="object">
<prop readOnly="True" type="string" name="name"/>
<prop readOnly="True" type="string" name="pluginId"/>
</item>
</prop>
</schema>
</json>
</body>
</response>
<response isError="True">
<body>
<json>
<schema type="@MgmtErrorFormat"/>
</json>
</body>
</response>
</http>
</operation>
<output type="object" ref="$Instance" clientFlatten="True"/>
</command>
</commandGroup>
</CodeGen>
Loading