你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Recommended Actions - Get

从顾问检索建议的作。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/recommendedActions/{recommendedActionName}?api-version=2018-06-01

URI 参数

名称 必需 类型 说明
advisorName
path True

string

建议作的顾问名称。

recommendedActionName
path True

string

建议的作名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

serverName
path True

string

服务器的名称。

subscriptionId
path True

string

minLength: 1

目标订阅的 ID。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

响应

名称 类型 说明
200 OK

RecommendationAction

还行

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

RecommendedActionsGet

示例请求

GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.DBforMySQL/servers/testServerName/advisors/Index/recommendedActions/Index-1?api-version=2018-06-01

示例响应

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testResourceGroupName/providers/Microsoft.Sql/servers/testServerName/advisors/Index/recommendedActions/Index-1",
  "name": "Index-1",
  "type": "Microsoft.DBforMySQL/servers/advisors/recommendedActions",
  "properties": {
    "advisorName": "Index",
    "sessionId": "c63c2114-e2a4-4c7a-98c1-85577d1a5d50",
    "actionId": 1,
    "createdTime": "2019-05-01T23:43:24Z",
    "expirationTime": "2019-05-08T23:43:24Z",
    "reason": "Column `movies_genres`.`movie_id` appear in Join On clause(s).",
    "recommendationType": "Add",
    "details": {
      "engine": "InnoDB",
      "script": "alter table `movies`.`movies_genres` add index `idx_movie_id` (`movie_id`)",
      "queryIds": "779",
      "indexName": "idx_movie_id",
      "indexType": "BTREE",
      "tableName": "movies_genres",
      "schemaName": "movies",
      "indexColumns": "`movies_genres`.`movie_id`",
      "parentTableName": "movies_genres"
    }
  }
}

定义

RecommendationAction

表示建议作。

名称 类型 说明
id

string

资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.actionId

integer (int32)

建议作标识符。

properties.advisorName

string

顾问名称。

properties.createdTime

string (date-time)

建议作创建时间。

properties.details

object

建议作详细信息。

properties.expirationTime

string (date-time)

建议作过期时间。

properties.reason

string

建议作原因。

properties.recommendationType

string

建议作类型。

properties.sessionId

string

建议作会话标识符。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”