Merge pull request #390 from vahalik/tomasvahalik/add-sql-mi-refresh-external-governance-status

Add a new command for SQL Managed Instance
This commit is contained in:
necusjz 2024-03-11 14:07:41 +08:00 коммит произвёл GitHub
Родитель 51515b3baa b9d849f58d
Коммит 3fa16cfd1e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 119 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,16 @@
# [Command] _sql mi refresh-external-governance-status_
Refresh external governance enablement status.
## Versions
### [2023-05-01-preview](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcmVzb3VyY2Vncm91cHMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5zcWwvbWFuYWdlZGluc3RhbmNlcy97fS9yZWZyZXNoZXh0ZXJuYWxnb3Zlcm5hbmNlc3RhdHVz/2023-05-01-preview.xml) **Stable**
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus 2023-05-01-preview -->
#### examples
- Update external governance status on specific MI
```bash
sql mi refresh-external-governance-status --managed-instance-name managedInstance -g resourceGroup1 --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

Просмотреть файл

@ -18,3 +18,8 @@ Manage SQL managed instances.
- [server-configuration-option](/Commands/sql/mi/server-configuration-option/readme.md)
: Server configuration option management commands.
## Commands
- [refresh-external-governance-status](/Commands/sql/mi/_refresh-external-governance-status.md)
: Refresh external governance enablement status.

Просмотреть файл

@ -141783,6 +141783,38 @@
]
}
},
"commands": {
"refresh-external-governance-status": {
"help": {
"short": "Refresh external governance enablement status."
},
"names": [
"sql",
"mi",
"refresh-external-governance-status"
],
"versions": [
{
"examples": [
{
"commands": [
"sql mi refresh-external-governance-status --managed-instance-name managedInstance -g resourceGroup1 --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
],
"name": "Update external governance status on specific MI"
}
],
"name": "2023-05-01-preview",
"resources": [
{
"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus",
"plane": "mgmt-plane",
"version": "2023-05-01-preview"
}
]
}
]
}
},
"help": {
"short": "Manage SQL managed instances."
},

Просмотреть файл

@ -0,0 +1 @@
{"plane": "mgmt-plane", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus", "version": "2023-05-01-preview", "swagger": "mgmt-plane/sql/ResourceProviders/Microsoft.Sql/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMve21hbmFnZWRJbnN0YW5jZU5hbWV9L3JlZnJlc2hFeHRlcm5hbEdvdmVybmFuY2VTdGF0dXM=/V/MjAyMy0wNS0wMS1wcmV2aWV3"}], "commandGroups": [{"name": "sql mi", "commands": [{"name": "refresh-external-governance-status", "version": "2023-05-01-preview", "resources": [{"id": "/subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus", "version": "2023-05-01-preview", "swagger": "mgmt-plane/sql/ResourceProviders/Microsoft.Sql/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMve21hbmFnZWRJbnN0YW5jZU5hbWV9L3JlZnJlc2hFeHRlcm5hbEdvdmVybmFuY2VTdGF0dXM=/V/MjAyMy0wNS0wMS1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.managedInstanceName", "options": ["mi", "managed-instance-name"], "required": true, "group": "", "idPart": "name", "help": {"short": "The name of the managed instance."}}, {"type": "ResourceGroupName", "var": "$Path.resourceGroupName", "options": ["g", "resource-group"], "required": true, "group": "", "idPart": "resource_group", "help": {"short": "The name of the resource group."}}, {"type": "SubscriptionId", "var": "$Path.subscriptionId", "options": ["subscription"], "required": true, "group": "", "idPart": "subscription", "help": {"short": "The id of the subscription."}}]}], "operations": [{"longRunning": {"finalStateVia": "location"}, "operationId": "ManagedInstances_RefreshStatus", "http": {"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus", "request": {"method": "post", "path": {"params": [{"type": "string", "name": "managedInstanceName", "arg": "$Path.managedInstanceName", "required": true}, {"type": "string", "name": "resourceGroupName", "arg": "$Path.resourceGroupName", "required": true}, {"type": "string", "name": "subscriptionId", "arg": "$Path.subscriptionId", "required": true}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2023-05-01-preview"}, "type": "string", "name": "api-version", "required": true}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"readOnly": true, "type": "string", "name": "id"}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "props": [{"readOnly": true, "type": "string", "name": "errorMessage"}, {"readOnly": true, "type": "string", "name": "managedInstanceName"}, {"readOnly": true, "type": "string", "name": "queuedTime"}, {"readOnly": true, "type": "uuid", "name": "requestId"}, {"readOnly": true, "type": "string", "name": "requestType"}, {"readOnly": true, "type": "string", "name": "status"}], "clientFlatten": true}, {"readOnly": true, "type": "string", "name": "type"}]}}}}, {"statusCode": [202]}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "object", "ref": "$Instance", "clientFlatten": true}], "confirmation": ""}]}]}

Просмотреть файл

@ -0,0 +1,65 @@
<?xml version='1.0' encoding='utf-8'?>
<CodeGen plane="mgmt-plane">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus" version="2023-05-01-preview" swagger="mgmt-plane/sql/ResourceProviders/Microsoft.Sql/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMve21hbmFnZWRJbnN0YW5jZU5hbWV9L3JlZnJlc2hFeHRlcm5hbEdvdmVybmFuY2VTdGF0dXM=/V/MjAyMy0wNS0wMS1wcmV2aWV3"/>
<commandGroup name="sql mi">
<command name="refresh-external-governance-status" version="2023-05-01-preview" confirmation="">
<resource id="/subscriptions/{}/resourcegroups/{}/providers/microsoft.sql/managedinstances/{}/refreshexternalgovernancestatus" version="2023-05-01-preview" swagger="mgmt-plane/sql/ResourceProviders/Microsoft.Sql/Paths/L3N1YnNjcmlwdGlvbnMve3N1YnNjcmlwdGlvbklkfS9yZXNvdXJjZUdyb3Vwcy97cmVzb3VyY2VHcm91cE5hbWV9L3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL21hbmFnZWRJbnN0YW5jZXMve21hbmFnZWRJbnN0YW5jZU5hbWV9L3JlZnJlc2hFeHRlcm5hbEdvdmVybmFuY2VTdGF0dXM=/V/MjAyMy0wNS0wMS1wcmV2aWV3"/>
<argGroup name="">
<arg type="string" var="$Path.managedInstanceName" options="managed-instance-name mi" required="True" group="" idPart="name">
<help short="The name of the managed instance."/>
</arg>
<arg type="ResourceGroupName" var="$Path.resourceGroupName" options="resource-group g" required="True" group="" idPart="resource_group">
<help short="The name of the resource group."/>
</arg>
<arg type="SubscriptionId" var="$Path.subscriptionId" options="subscription" required="True" group="" idPart="subscription">
<help short="The id of the subscription."/>
</arg>
</argGroup>
<operation operationId="ManagedInstances_RefreshStatus">
<longRunning finalStateVia="location"/>
<http path="/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/refreshExternalGovernanceStatus">
<request method="post">
<path>
<param type="string" name="managedInstanceName" arg="$Path.managedInstanceName" required="True"/>
<param type="string" name="resourceGroupName" arg="$Path.resourceGroupName" required="True"/>
<param type="string" name="subscriptionId" arg="$Path.subscriptionId" required="True"/>
</path>
<query>
<const readOnly="True" const="True" type="string" name="api-version" required="True">
<default value="&quot;2023-05-01-preview&quot;"/>
</const>
</query>
</request>
<response statusCode="200">
<body>
<json var="$Instance">
<schema type="object">
<prop readOnly="True" type="string" name="id"/>
<prop readOnly="True" type="string" name="name"/>
<prop type="object" name="properties" clientFlatten="True">
<prop readOnly="True" type="string" name="errorMessage"/>
<prop readOnly="True" type="string" name="managedInstanceName"/>
<prop readOnly="True" type="string" name="queuedTime"/>
<prop readOnly="True" type="uuid" name="requestId"/>
<prop readOnly="True" type="string" name="requestType"/>
<prop readOnly="True" type="string" name="status"/>
</prop>
<prop readOnly="True" type="string" name="type"/>
</schema>
</json>
</body>
</response>
<response statusCode="202"/>
<response isError="True">
<body>
<json>
<schema type="@MgmtErrorFormat"/>
</json>
</body>
</response>
</http>
</operation>
<output type="object" ref="$Instance" clientFlatten="True"/>
</command>
</commandGroup>
</CodeGen>