共用方式為


Remediations - Get At Resource

取得資源範圍的現有補救。

GET https://management.azure.com/{resourceId}/providers/Microsoft.PolicyInsights/remediations/{remediationName}?api-version=2024-10-01

URI 參數

名稱 位於 必要 類型 Description
remediationName
path True

string

補救的名稱。

resourceId
path True

string

資源標識碼。

api-version
query True

string

用戶端 API 版本。

回應

名稱 類型 Description
200 OK

Remediation

擷取的補救。

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Get remediation at individual resource scope

範例要求

GET https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/Microsoft.PolicyInsights/remediations/storageRemediation?api-version=2024-10-01

範例回覆

{
  "properties": {
    "policyAssignmentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5",
    "provisioningState": "Succeeded",
    "createdOn": "2018-09-13T21:51:09.075918Z",
    "lastUpdatedOn": "2018-09-13T21:52:10.0011706Z",
    "resourceDiscoveryMode": "ExistingNonCompliant",
    "deploymentStatus": {
      "totalDeployments": 1,
      "successfulDeployments": 1,
      "failedDeployments": 0
    },
    "statusMessage": "Remediation extended status",
    "correlationId": "a14e1d60-dae9-4771-b4be-a556d69e77a6",
    "resourceCount": 42,
    "parallelDeployments": 6,
    "failureThreshold": {
      "percentage": 0.1
    }
  },
  "id": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/microsoft.policyinsights/remediations/storageRemediation",
  "name": "storageRemediation",
  "type": "Microsoft.PolicyInsights/remediations",
  "systemData": {
    "createdBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
    "createdByType": "User",
    "createdAt": "2018-09-13T21:51:09.075918Z",
    "lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2018-09-13T21:52:10.0011706Z"
  }
}

定義

名稱 Description
createdByType

建立資源的身分識別類型。

ErrorDefinition

錯誤定義。

ErrorResponse

錯誤回應。

FailureThreshold

補救失敗閾值設定

Remediation

補救定義。

RemediationDeploymentSummary

補救所建立之所有部署的部署狀態摘要。

RemediationFilters

將套用以判斷要補救的資源的篩選條件。

ResourceDiscoveryMode

探索到補救資源的方式。 如果未指定,則預設為 ExistingNonCompliant。

systemData

與建立和上次修改資源相關的元數據。

TypedErrorInfo

案例特定錯誤詳細數據。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

ErrorDefinition

錯誤定義。

名稱 類型 Description
additionalInfo

TypedErrorInfo[]

其他案例特定錯誤詳細數據。

code

string

服務特定的錯誤碼,做為 HTTP 錯誤碼的子狀態。

details

ErrorDefinition[]

內部錯誤詳細數據。

message

string

錯誤的描述。

target

string

錯誤的目標。

ErrorResponse

錯誤回應。

名稱 類型 Description
error

ErrorDefinition

錯誤詳情

FailureThreshold

補救失敗閾值設定

名稱 類型 Description
percentage

number (float)

介於 0.0 到 1.0 之間的數位,代表失敗閾值的百分比。 如果失敗的補救作業百分比(也就是失敗的部署)超過此閾值,補救將會失敗。

Remediation

補救定義。

名稱 類型 Description
id

string

補救的標識碼。

name

string

補救的名稱。

properties.correlationId

string

補救相互關聯標識碼。可用來尋找與活動記錄中補救相關的事件。

properties.createdOn

string (date-time)

建立補救的時間。

properties.deploymentStatus

RemediationDeploymentSummary

補救所建立之所有部署的部署狀態摘要。

properties.failureThreshold

FailureThreshold

補救失敗閾值設定

properties.filters

RemediationFilters

將套用以判斷要補救的資源的篩選條件。

properties.lastUpdatedOn

string (date-time)

上次更新補救的時間。

properties.parallelDeployments

integer (int32)

決定在任何指定時間補救多少資源。 可用來增加或減少補救的步調。 如果未提供,則會使用預設的平行部署值。

properties.policyAssignmentId

string

應補救之原則指派的資源標識符。

properties.policyDefinitionReferenceId

string

應補救之個別定義的原則定義參考標識符。 當要補救的原則指派指派指派原則集定義時,即為必要專案。

properties.provisioningState

string

補救的狀態。 這是指整個補救工作,而不是個別部署。 允許的值是評估、取消、取消、失敗、完成或成功。

properties.resourceCount

integer (int32)

決定補救作業可補救的資源數目上限。 如果未提供,則會使用預設資源計數。

properties.resourceDiscoveryMode

ResourceDiscoveryMode

探索到補救資源的方式。 如果未指定,則預設為 ExistingNonCompliant。

properties.statusMessage

string

補救狀態消息。 提供有關補救狀態的其他詳細數據。

systemData

systemData

Azure Resource Manager 包含 createdBy 與 modifiedBy 資訊的元資料。

type

string

補救的類型。

RemediationDeploymentSummary

補救所建立之所有部署的部署狀態摘要。

名稱 類型 Description
failedDeployments

integer

補救失敗所需的部署數目。

successfulDeployments

integer

補救成功所需的部署數目。

totalDeployments

integer

補救所需的部署數目。

RemediationFilters

將套用以判斷要補救的資源的篩選條件。

名稱 類型 Description
locations

string[]

將補救的資源位置。

resourceIds

string[]

將補救之資源的標識碼。 最多可以指定 100 個識別碼。 當 ReEvaluateCompliance 設定為 ReEvaluateCompliance 時,無法使用此篩選條件,如果提供,則不能空白。

ResourceDiscoveryMode

探索到補救資源的方式。 如果未指定,則預設為 ExistingNonCompliant。

Description
ExistingNonCompliant

補救已知不符合規範的資源。

ReEvaluateCompliance

重新評估資源的合規性狀態,然後補救發現不符合規範的資源。 resourceIds 過濾器在此模式下無法使用。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。

TypedErrorInfo

案例特定錯誤詳細數據。

名稱 類型 Description
info

案例特定的錯誤詳細數據。

type

string

包含的錯誤詳細數據類型。