Use este método para obtener la recomendación de análisis de seguridad agregado de la solución ioT Security. Esta agregación se realiza por nombre de recomendación.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/iotSecuritySolutions/{solutionName}/analyticsModels/default/aggregatedRecommendations/{aggregatedRecommendationName}?api-version=2019-08-01
Parámetros de identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
aggregatedRecommendationName
|
path |
True
|
string
|
Nombre de la recomendación agregada para esta consulta.
|
resourceGroupName
|
path |
True
|
string
|
Nombre del grupo de recursos dentro de la suscripción del usuario. El nombre no distingue mayúsculas de minúsculas.
Patrón de Regex: ^[-\w\._\(\)]+$
|
solutionName
|
path |
True
|
string
|
Nombre de la solución de seguridad de IoT.
|
subscriptionId
|
path |
True
|
string
|
Identificador de suscripción de Azure
Patrón de Regex: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$
|
api-version
|
query |
True
|
string
|
Versión de API para la operación
|
Respuestas
Seguridad
azure_auth
Flujo de OAuth2 de Azure Active Directory
Tipo:
oauth2
Flujo:
implicit
Dirección URL de autorización:
https://login.microsoftonline.com/common/oauth2/authorize
Ámbitos
Nombre |
Description |
user_impersonation
|
suplantar la cuenta de usuario
|
Ejemplos
Get the aggregated security analytics recommendation of yours IoT Security solution
Solicitud de ejemplo
GET https://management.azure.com/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/iotSecuritySolutions/default/analyticsModels/default/aggregatedRecommendations/OpenPortsOnDevice?api-version=2019-08-01
/**
* Samples for IotSecuritySolutionsAnalyticsRecommendation Get.
*/
public final class Main {
/*
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/
* IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json
*/
/**
* Sample code: Get the aggregated security analytics recommendation of yours IoT Security solution.
*
* @param manager Entry point to SecurityManager.
*/
public static void getTheAggregatedSecurityAnalyticsRecommendationOfYoursIoTSecuritySolution(
com.azure.resourcemanager.security.SecurityManager manager) {
manager.iotSecuritySolutionsAnalyticsRecommendations().getWithResponse("IoTEdgeResources", "default",
"OpenPortsOnDevice", com.azure.core.util.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
package armsecurity_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/security/armsecurity"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9ac34f238dd6b9071f486b57e9f9f1a0c43ec6f6/specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json
func ExampleIotSecuritySolutionsAnalyticsRecommendationClient_Get() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsecurity.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewIotSecuritySolutionsAnalyticsRecommendationClient().Get(ctx, "IoTEdgeResources", "default", "OpenPortsOnDevice", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.IoTSecurityAggregatedRecommendation = armsecurity.IoTSecurityAggregatedRecommendation{
// Name: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
// Type: to.Ptr("Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations"),
// ID: to.Ptr("/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice"),
// Properties: &armsecurity.IoTSecurityAggregatedRecommendationProperties{
// Description: to.Ptr("An allowed firewall policy was found in main firewall Chains (INPUT/OUTPUT). The policy should Deny all traffic by default define rules to allow necessary communication to/from the device"),
// DetectedBy: to.Ptr("Microsoft"),
// HealthyDevices: to.Ptr[int64](10000),
// LogAnalyticsQuery: to.Ptr("SecurityRecommendation | where tolower(AssessedResourceId) == tolower('/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Devices/IotHubs/t-ofdadu-hub') and tolower(RecommendationName) == tolower('OpenPortsOnDevice')"),
// RecommendationDisplayName: to.Ptr("Permissive firewall policy in one of the chains was found"),
// RecommendationName: to.Ptr("OpenPortsOnDevice"),
// RecommendationTypeID: to.Ptr("{20ff7fc3-e762-44dd-bd96-b71116dcdc23}"),
// RemediationSteps: to.Ptr(""),
// ReportedSeverity: to.Ptr(armsecurity.ReportedSeverityLow),
// UnhealthyDeviceCount: to.Ptr[int64](200),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SecurityCenter } = require("@azure/arm-security");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This aggregation is performed by recommendation name.
*
* @summary Use this method to get the aggregated security analytics recommendation of yours IoT Security solution. This aggregation is performed by recommendation name.
* x-ms-original-file: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json
*/
async function getTheAggregatedSecurityAnalyticsRecommendationOfYoursIoTSecuritySolution() {
const subscriptionId =
process.env["SECURITY_SUBSCRIPTION_ID"] || "075423e9-7d33-4166-8bdf-3920b04e3735";
const resourceGroupName = process.env["SECURITY_RESOURCE_GROUP"] || "IoTEdgeResources";
const solutionName = "default";
const aggregatedRecommendationName = "OpenPortsOnDevice";
const credential = new DefaultAzureCredential();
const client = new SecurityCenter(credential, subscriptionId);
const result = await client.iotSecuritySolutionsAnalyticsRecommendation.get(
resourceGroupName,
solutionName,
aggregatedRecommendationName,
);
console.log(result);
}
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.SecurityCenter;
// Generated from example definition: specification/security/resource-manager/Microsoft.Security/stable/2019-08-01/examples/IoTSecuritySolutionsAnalytics/GetIoTSecuritySolutionsSecurityRecommendation.json
// this example is just showing the usage of "IotSecuritySolutionsAnalyticsRecommendation_Get" 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 IotSecuritySolutionAnalyticsModelResource created on azure
// for more information of creating IotSecuritySolutionAnalyticsModelResource, please refer to the document of IotSecuritySolutionAnalyticsModelResource
string subscriptionId = "075423e9-7d33-4166-8bdf-3920b04e3735";
string resourceGroupName = "IoTEdgeResources";
string solutionName = "default";
ResourceIdentifier iotSecuritySolutionAnalyticsModelResourceId = IotSecuritySolutionAnalyticsModelResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, solutionName);
IotSecuritySolutionAnalyticsModelResource iotSecuritySolutionAnalyticsModel = client.GetIotSecuritySolutionAnalyticsModelResource(iotSecuritySolutionAnalyticsModelResourceId);
// get the collection of this IotSecurityAggregatedRecommendationResource
IotSecurityAggregatedRecommendationCollection collection = iotSecuritySolutionAnalyticsModel.GetIotSecurityAggregatedRecommendations();
// invoke the operation
string aggregatedRecommendationName = "OpenPortsOnDevice";
NullableResponse<IotSecurityAggregatedRecommendationResource> response = await collection.GetIfExistsAsync(aggregatedRecommendationName);
IotSecurityAggregatedRecommendationResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// the variable result 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
IotSecurityAggregatedRecommendationData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"id": "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice",
"name": "/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Security/IoTSecuritySolutions/Locations/eastus/default/OpenPortsOnDevice",
"type": "Microsoft.Security/iotSecuritySolutions/analyticsModels/aggregatedRecommendations",
"properties": {
"recommendationName": "OpenPortsOnDevice",
"recommendationDisplayName": "Permissive firewall policy in one of the chains was found",
"description": "An allowed firewall policy was found in main firewall Chains (INPUT/OUTPUT). The policy should Deny all traffic by default define rules to allow necessary communication to/from the device",
"recommendationTypeId": "{20ff7fc3-e762-44dd-bd96-b71116dcdc23}",
"detectedBy": "Microsoft",
"reportedSeverity": "Low",
"remediationSteps": "",
"healthyDevices": 10000,
"unhealthyDeviceCount": 200,
"logAnalyticsQuery": "SecurityRecommendation | where tolower(AssessedResourceId) == tolower('/subscriptions/075423e9-7d33-4166-8bdf-3920b04e3735/resourceGroups/IoTEdgeResources/providers/Microsoft.Devices/IotHubs/t-ofdadu-hub') and tolower(RecommendationName) == tolower('OpenPortsOnDevice')"
}
}
Definiciones
Nombre |
Description |
CloudError
|
Respuesta de error común para todas las API de Azure Resource Manager para devolver los detalles de error de las operaciones con errores. (Esto también sigue el formato de respuesta de error de OData).
|
CloudErrorBody
|
Detalle del error.
|
ErrorAdditionalInfo
|
Información adicional sobre el error de administración de recursos.
|
IoTSecurityAggregatedRecommendation
|
Información de recomendación de la solución de seguridad de IoT.
|
reportedSeverity
|
Gravedad de alerta evaluada.
|
CloudError
Respuesta de error común para todas las API de Azure Resource Manager para devolver los detalles de error de las operaciones con errores. (Esto también sigue el formato de respuesta de error de OData).
Nombre |
Tipo |
Description |
error.additionalInfo
|
ErrorAdditionalInfo[]
|
Información adicional del error.
|
error.code
|
string
|
Código de error.
|
error.details
|
CloudErrorBody[]
|
Detalles del error.
|
error.message
|
string
|
Mensaje de error.
|
error.target
|
string
|
Destino del error.
|
CloudErrorBody
Detalle del error.
Nombre |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Información adicional del error.
|
code
|
string
|
Código de error.
|
details
|
CloudErrorBody[]
|
Detalles del error.
|
message
|
string
|
Mensaje de error.
|
target
|
string
|
Destino del error.
|
ErrorAdditionalInfo
Información adicional sobre el error de administración de recursos.
Nombre |
Tipo |
Description |
info
|
object
|
Información adicional.
|
type
|
string
|
Tipo de información adicional.
|
IoTSecurityAggregatedRecommendation
Información de recomendación de la solución de seguridad de IoT.
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de recurso
|
name
|
string
|
Nombre del recurso
|
properties.description
|
string
|
Descripción de la vulnerabilidad sospechosa y el significado.
|
properties.detectedBy
|
string
|
Nombre de la organización que realizó la recomendación.
|
properties.healthyDevices
|
integer
|
Número de dispositivos correctos dentro de la solución De seguridad de IoT.
|
properties.logAnalyticsQuery
|
string
|
Consulta de Log Analytics para obtener la lista de dispositivos o alertas afectados.
|
properties.recommendationDisplayName
|
string
|
Nombre para mostrar del tipo de recomendación.
|
properties.recommendationName
|
string
|
Nombre de la recomendación.
|
properties.recommendationTypeId
|
string
|
GUID de tipo de recomendación.
|
properties.remediationSteps
|
string
|
Pasos recomendados para la corrección
|
properties.reportedSeverity
|
reportedSeverity
|
Gravedad de recomendación evaluada.
|
properties.unhealthyDeviceCount
|
integer
|
Número de dispositivos incorrectos dentro de la solución De seguridad de IoT.
|
tags
|
object
|
Etiquetas de recursos
|
type
|
string
|
Tipo de recurso
|
reportedSeverity
Gravedad de alerta evaluada.
Nombre |
Tipo |
Description |
High
|
string
|
|
Informational
|
string
|
|
Low
|
string
|
|
Medium
|
string
|
|