Obtiene todas las correcciones de un recurso.
GET https://management.azure.com/{resourceId}/providers/Microsoft.PolicyInsights/remediations?api-version=2021-10-01
With optional parameters:
GET https://management.azure.com/{resourceId}/providers/Microsoft.PolicyInsights/remediations?$top={$top}&$filter={$filter}&api-version=2021-10-01
Parámetros de identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
resourceId
|
path |
True
|
string
|
Identificador del recurso.
|
api-version
|
query |
True
|
string
|
Versión de api de cliente.
|
$filter
|
query |
|
string
|
Expresión de filtro de OData.
|
$top
|
query |
|
integer
int32
|
Número máximo de registros que se van a devolver.
|
Respuestas
Nombre |
Tipo |
Description |
200 OK
|
RemediationListResult
|
Las correcciones recuperadas.
|
Other Status Codes
|
ErrorResponse
|
Respuesta de error que describe el motivo del error de la operación.
|
Seguridad
azure_auth
Flujo OAuth2 de Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Nombre |
Description |
user_impersonation
|
suplantación de su cuenta de usuario
|
Ejemplos
Sample Request
GET https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/Microsoft.PolicyInsights/remediations?api-version=2021-10-01
import com.azure.core.util.Context;
/** Samples for Remediations ListForResource. */
public final class Main {
/*
* x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope.json
*/
/**
* Sample code: List remediations at individual resource scope.
*
* @param manager Entry point to PolicyInsightsManager.
*/
public static void listRemediationsAtIndividualResourceScope(
com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) {
manager
.remediations()
.listForResource(
"subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1",
null,
null,
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.policyinsights import PolicyInsightsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-policyinsights
# USAGE
python remediations_list_resource_scope.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PolicyInsightsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.remediations.list_for_resource(
resource_id="subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1",
)
for item in response:
print(item)
# x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpolicyinsights_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/policyinsights/armpolicyinsights"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/05a9cdab363b8ec824094ee73950c04594325172/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope.json
func ExampleRemediationsClient_NewListForResourcePager_listRemediationsAtIndividualResourceScope() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpolicyinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRemediationsClient().NewListForResourcePager("subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1", &armpolicyinsights.QueryOptions{Top: nil,
Filter: nil,
OrderBy: nil,
Select: nil,
From: nil,
To: nil,
Apply: nil,
SkipToken: nil,
Expand: nil,
}, nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.RemediationListResult = armpolicyinsights.RemediationListResult{
// Value: []*armpolicyinsights.Remediation{
// {
// Name: to.Ptr("790996e6-9871-4b1f-9cd9-ec42cd6ced1e"),
// Type: to.Ptr("Microsoft.PolicyInsights/remediations"),
// ID: to.Ptr("/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/microsoft.policyinsights/remediations/790996e6-9871-4b1f-9cd9-ec42cd6ced1e"),
// Properties: &armpolicyinsights.RemediationProperties{
// CorrelationID: to.Ptr("a14e1d60-dae9-4771-b4be-a556d69e77a6"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:51:09.075Z"); return t}()),
// DeploymentStatus: &armpolicyinsights.RemediationDeploymentSummary{
// FailedDeployments: to.Ptr[int32](0),
// SuccessfulDeployments: to.Ptr[int32](1),
// TotalDeployments: to.Ptr[int32](1),
// },
// FailureThreshold: &armpolicyinsights.RemediationPropertiesFailureThreshold{
// Percentage: to.Ptr[float32](0.1),
// },
// LastUpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:52:10.001Z"); return t}()),
// ParallelDeployments: to.Ptr[int32](6),
// PolicyAssignmentID: to.Ptr("/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5"),
// ProvisioningState: to.Ptr("Succeeded"),
// ResourceCount: to.Ptr[int32](42),
// ResourceDiscoveryMode: to.Ptr(armpolicyinsights.ResourceDiscoveryModeExistingNonCompliant),
// StatusMessage: to.Ptr("Remediation extended status"),
// },
// SystemData: &armpolicyinsights.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:49:16.463Z"); return t}()),
// CreatedBy: to.Ptr("b69a9388-9488-4534-b470-7ec6d41beef6"),
// CreatedByType: to.Ptr(armpolicyinsights.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:50:18.464Z"); return t}()),
// LastModifiedBy: to.Ptr("b69a9388-9488-4534-b470-7ec6d41beef6"),
// LastModifiedByType: to.Ptr(armpolicyinsights.CreatedByTypeUser),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PolicyInsightsClient } = require("@azure/arm-policyinsights");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets all remediations for a resource.
*
* @summary Gets all remediations for a resource.
* x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope.json
*/
async function listRemediationsAtIndividualResourceScope() {
const subscriptionId =
process.env["POLICYINSIGHTS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceId =
"subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1";
const credential = new DefaultAzureCredential();
const client = new PolicyInsightsClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.remediations.listForResource(resourceId)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.PolicyInsights;
// Generated from example definition: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope.json
// this example is just showing the usage of "Remediations_ListForResource" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ArmResource created on azure
// for more information of creating ArmResource, please refer to the document of ArmResource
// get the collection of this PolicyRemediationResource
string resourceId = "subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceId));
PolicyRemediationCollection collection = client.GetPolicyRemediations(scopeId);
// invoke the operation and iterate over the result
await foreach (PolicyRemediationResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PolicyRemediationData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"value": [
{
"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/790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
"name": "790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
"type": "Microsoft.PolicyInsights/remediations",
"systemData": {
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
"createdByType": "User",
"createdAt": "2018-09-13T21:49:16.4638131Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef6",
"lastModifiedByType": "User",
"lastModifiedAt": "2018-09-13T21:50:18.4647478Z"
}
}
]
}
Sample Request
GET https://management.azure.com/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/Microsoft.PolicyInsights/remediations?$top=1&$filter=PolicyAssignmentId eq '/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5'&api-version=2021-10-01
import com.azure.core.util.Context;
/** Samples for Remediations ListForResource. */
public final class Main {
/*
* x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope_WithQuery.json
*/
/**
* Sample code: List remediations at individual resource scope with query parameters.
*
* @param manager Entry point to PolicyInsightsManager.
*/
public static void listRemediationsAtIndividualResourceScopeWithQueryParameters(
com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) {
manager
.remediations()
.listForResource(
"subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1",
1,
"PolicyAssignmentId eq"
+ " '/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5'",
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.policyinsights import PolicyInsightsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-policyinsights
# USAGE
python remediations_list_resource_scope_with_query.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = PolicyInsightsClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.remediations.list_for_resource(
resource_id="subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1",
)
for item in response:
print(item)
# x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope_WithQuery.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armpolicyinsights_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/policyinsights/armpolicyinsights"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/05a9cdab363b8ec824094ee73950c04594325172/specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope_WithQuery.json
func ExampleRemediationsClient_NewListForResourcePager_listRemediationsAtIndividualResourceScopeWithQueryParameters() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armpolicyinsights.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewRemediationsClient().NewListForResourcePager("subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1", &armpolicyinsights.QueryOptions{Top: to.Ptr[int32](1),
Filter: to.Ptr("PolicyAssignmentId eq '/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5'"),
OrderBy: nil,
Select: nil,
From: nil,
To: nil,
Apply: nil,
SkipToken: nil,
Expand: nil,
}, nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.RemediationListResult = armpolicyinsights.RemediationListResult{
// Value: []*armpolicyinsights.Remediation{
// {
// Name: to.Ptr("790996e6-9871-4b1f-9cd9-ec42cd6ced1e"),
// Type: to.Ptr("Microsoft.PolicyInsights/remediations"),
// ID: to.Ptr("/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1/providers/microsoft.policyinsights/remediations/790996e6-9871-4b1f-9cd9-ec42cd6ced1e"),
// Properties: &armpolicyinsights.RemediationProperties{
// CorrelationID: to.Ptr("a14e1d60-dae9-4771-b4be-a556d69e77a6"),
// CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:51:09.075Z"); return t}()),
// DeploymentStatus: &armpolicyinsights.RemediationDeploymentSummary{
// FailedDeployments: to.Ptr[int32](0),
// SuccessfulDeployments: to.Ptr[int32](1),
// TotalDeployments: to.Ptr[int32](1),
// },
// FailureThreshold: &armpolicyinsights.RemediationPropertiesFailureThreshold{
// Percentage: to.Ptr[float32](0.1),
// },
// LastUpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:52:10.001Z"); return t}()),
// ParallelDeployments: to.Ptr[int32](6),
// PolicyAssignmentID: to.Ptr("/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5"),
// ProvisioningState: to.Ptr("Succeeded"),
// ResourceCount: to.Ptr[int32](42),
// ResourceDiscoveryMode: to.Ptr(armpolicyinsights.ResourceDiscoveryModeExistingNonCompliant),
// StatusMessage: to.Ptr("Remediation extended status"),
// },
// SystemData: &armpolicyinsights.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:51:09.075Z"); return t}()),
// CreatedBy: to.Ptr("b69a9388-9488-4534-b470-7ec6d41beef6"),
// CreatedByType: to.Ptr(armpolicyinsights.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-13T21:52:10.001Z"); return t}()),
// LastModifiedBy: to.Ptr("b69a9388-9488-4534-b470-7ec6d41beef6"),
// LastModifiedByType: to.Ptr(armpolicyinsights.CreatedByTypeUser),
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { PolicyInsightsClient } = require("@azure/arm-policyinsights");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets all remediations for a resource.
*
* @summary Gets all remediations for a resource.
* x-ms-original-file: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope_WithQuery.json
*/
async function listRemediationsAtIndividualResourceScopeWithQueryParameters() {
const subscriptionId =
process.env["POLICYINSIGHTS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceId =
"subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1";
const top = 1;
const filter =
"PolicyAssignmentId eq '/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/providers/microsoft.authorization/policyassignments/b101830944f246d8a14088c5'";
const options = { queryOptions: { top: top, filter: filter } };
const credential = new DefaultAzureCredential();
const client = new PolicyInsightsClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.remediations.listForResource(resourceId, options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.PolicyInsights;
// Generated from example definition: specification/policyinsights/resource-manager/Microsoft.PolicyInsights/stable/2021-10-01/examples/Remediations_ListResourceScope_WithQuery.json
// this example is just showing the usage of "Remediations_ListForResource" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ArmResource created on azure
// for more information of creating ArmResource, please refer to the document of ArmResource
// get the collection of this PolicyRemediationResource
string resourceId = "subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/resourcegroups/myResourceGroup/providers/microsoft.storage/storageaccounts/storAc1";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceId));
PolicyRemediationCollection collection = client.GetPolicyRemediations(scopeId);
// invoke the operation and iterate over the result
await foreach (PolicyRemediationResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
PolicyRemediationData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"value": [
{
"properties": {
"policyAssignmentId": "/subscriptions/35ee058e-5fa0-414c-8145-3ebb8d09b6e2/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/790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
"name": "790996e6-9871-4b1f-9cd9-ec42cd6ced1e",
"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"
}
}
]
}
Definiciones
createdByType
Tipo de identidad que creó el recurso.
Nombre |
Tipo |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorDefinition
Definición de error.
Nombre |
Tipo |
Description |
additionalInfo
|
TypedErrorInfo[]
|
Detalles adicionales del error específico del escenario.
|
code
|
string
|
Código de error específico del servicio que actúa como subestado para el código de error HTTP.
|
details
|
ErrorDefinition[]
|
Detalles internos del error.
|
message
|
string
|
Descripción del error.
|
target
|
string
|
Destino del error.
|
ErrorResponse
Respuesta de error.
FailureThreshold
Configuración del umbral de error de corrección
Nombre |
Tipo |
Description |
percentage
|
number
|
Número comprendido entre 0,0 y 1,0 que representa el umbral de error porcentual. Se producirá un error en la corrección si el porcentaje de operaciones de corrección con errores (es decir, implementaciones con errores) supera este umbral.
|
Definición de corrección.
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de la corrección.
|
name
|
string
|
Nombre de la corrección.
|
properties.correlationId
|
string
|
Identificador de correlación de corrección. Se puede usar para buscar eventos relacionados con la corrección en el registro de actividad.
|
properties.createdOn
|
string
|
Hora a la que se creó la corrección.
|
properties.deploymentStatus
|
RemediationDeploymentSummary
|
Resumen del estado de implementación de todas las implementaciones creadas por la corrección.
|
properties.failureThreshold
|
FailureThreshold
|
Configuración del umbral de error de corrección
|
properties.filters
|
RemediationFilters
|
Filtros que se aplicarán para determinar qué recursos corregir.
|
properties.lastUpdatedOn
|
string
|
Hora a la que se actualizó por última vez la corrección.
|
properties.parallelDeployments
|
integer
|
Determina cuántos recursos corregir en un momento dado. Se puede usar para aumentar o reducir el ritmo de la corrección. Si no se proporciona, se usa el valor predeterminado de implementaciones paralelas.
|
properties.policyAssignmentId
|
string
|
Identificador de recurso de la asignación de directiva que se debe corregir.
|
properties.policyDefinitionReferenceId
|
string
|
Identificador de referencia de definición de directiva de la definición individual que se debe corregir. Obligatorio cuando la asignación de directiva que se va a corregir asigna una definición de conjunto de directivas.
|
properties.provisioningState
|
string
|
Estado de la corrección. Esto hace referencia a toda la tarea de corrección, no a implementaciones individuales. Los valores permitidos son Evaluación, Cancelación, Error, Completado o Correcto.
|
properties.resourceCount
|
integer
|
Determina el número máximo de recursos que el trabajo de corrección puede corregir. Si no se proporciona, se usa el recuento de recursos predeterminado.
|
properties.resourceDiscoveryMode
|
ResourceDiscoveryMode
|
Se detecta la forma en que se detectan los recursos para corregirlos. El valor predeterminado es ExistingNonCompliant si no se especifica.
|
properties.statusMessage
|
string
|
Mensaje de estado de corrección. Proporciona detalles adicionales sobre el estado de la corrección.
|
systemData
|
systemData
|
Metadatos de Azure Resource Manager que contienen información sobre los valores de createdBy y modifiedBy.
|
type
|
string
|
Tipo de corrección.
|
Resumen del estado de implementación de todas las implementaciones creadas por la corrección.
Nombre |
Tipo |
Description |
failedDeployments
|
integer
|
Número de implementaciones requeridas por la corrección que han producido un error.
|
successfulDeployments
|
integer
|
Número de implementaciones requeridas por la corrección que se ha realizado correctamente.
|
totalDeployments
|
integer
|
Número de implementaciones requeridas por la corrección.
|
Filtros que se aplicarán para determinar qué recursos corregir.
Nombre |
Tipo |
Description |
locations
|
string[]
|
Las ubicaciones de recursos que se corregirán.
|
Lista de correcciones.
Nombre |
Tipo |
Description |
nextLink
|
string
|
Dirección URL para obtener el siguiente conjunto de resultados.
|
value
|
Remediation[]
|
Matriz de definiciones de corrección.
|
ResourceDiscoveryMode
Se detecta la forma en que se detectan los recursos para corregirlos. El valor predeterminado es ExistingNonCompliant si no se especifica.
Nombre |
Tipo |
Description |
ExistingNonCompliant
|
string
|
Corrija los recursos que ya se sabe que no son compatibles.
|
ReEvaluateCompliance
|
string
|
Vuelva a evaluar el estado de cumplimiento de los recursos y corrija los recursos encontrados como no compatibles.
|
systemData
Metadatos relacionados con la creación y la última modificación del recurso.
Nombre |
Tipo |
Description |
createdAt
|
string
|
Marca de tiempo de creación de recursos (UTC).
|
createdBy
|
string
|
Identidad que creó el recurso.
|
createdByType
|
createdByType
|
Tipo de identidad que creó el recurso.
|
lastModifiedAt
|
string
|
Marca de tiempo de la última modificación del recurso (UTC)
|
lastModifiedBy
|
string
|
Identidad que modificó por última vez el recurso.
|
lastModifiedByType
|
createdByType
|
Tipo de identidad que modificó por última vez el recurso.
|
TypedErrorInfo
Detalles de error específicos del escenario.
Nombre |
Tipo |
Description |
info
|
|
Detalles de error específicos del escenario.
|
type
|
string
|
Tipo de detalles de error incluidos.
|